Show
Ignore:
Timestamp:
10/24/09 14:26:18 (5 months ago)
Author:
cristy
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • WizardsToolkit/trunk/wizard/mime.c

    r415 r445  
    126126static WizardBooleanType 
    127127  InitializeMimeList(ExceptionInfo *); 
    128  
    129 /* 
    130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    131 %                                                                             % 
    132 %                                                                             % 
    133 %                                                                             % 
    134 +   D e s t r o y M i m e C o m p o n e n t                                   % 
    135 %                                                                             % 
    136 %                                                                             % 
    137 %                                                                             % 
    138 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    139 % 
    140 %  DestroyMimeComponent() destroys the mime component. 
    141 % 
    142 %  The format of the DestroyMimeComponent method is: 
    143 % 
    144 %      DestroyMimeComponent(void) 
    145 % 
    146 */ 
    147  
    148 static void *DestroyMimeElement(void *mime_info) 
    149 { 
    150   register MimeInfo 
    151     *p; 
    152  
    153   p=(MimeInfo *) mime_info; 
    154   if (p->magic != (unsigned char *) NULL) 
    155     p->magic=(unsigned char *) RelinquishWizardMemory(p->magic); 
    156   if (p->pattern != (char *) NULL) 
    157     p->pattern=DestroyString(p->pattern); 
    158   if (p->description != (char *) NULL) 
    159     p->description=DestroyString(p->description); 
    160   if (p->type != (char *) NULL) 
    161     p->type=DestroyString(p->type); 
    162   if (p->path != (char *) NULL) 
    163     p->path=DestroyString(p->path); 
    164   p=(MimeInfo *) RelinquishWizardMemory(p); 
    165   return((void *) NULL); 
    166 } 
    167  
    168 WizardExport void DestroyMimeComponent(void) 
    169 { 
    170   AcquireSemaphoreInfo(&mime_semaphore); 
    171   if (mime_list != (LinkedListInfo *) NULL) 
    172     mime_list=DestroyLinkedList(mime_list,DestroyMimeElement); 
    173   instantiate_mime=WizardFalse; 
    174   RelinquishSemaphoreInfo(mime_semaphore); 
    175   DestroySemaphoreInfo(&mime_semaphore); 
    176 } 
    177128 
    178129/* 
     
    671622%                                                                             % 
    672623%                                                                             % 
    673 +   I n s t a n t i a t e M i m e C o m p o n e n t                           % 
    674 %                                                                             % 
    675 %                                                                             % 
    676 %                                                                             % 
    677 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    678 % 
    679 %  InstantiateMimeComponent() instantiates the mime component. 
    680 % 
    681 %  The format of the InstantiateMimeComponent method is: 
    682 % 
    683 %      WizardBooleanType InstantiateMimeComponent(void) 
    684 % 
    685 */ 
    686 WizardExport WizardBooleanType InstantiateMimeComponent(void) 
    687 { 
    688   AcquireSemaphoreInfo(&mime_semaphore); 
    689   RelinquishSemaphoreInfo(mime_semaphore); 
    690   return(WizardTrue); 
    691 } 
    692  
    693 /* 
    694 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    695 %                                                                             % 
    696 %                                                                             % 
    697 %                                                                             % 
    698624%  L i s t M i m e I n f o                                                    % 
    699625%                                                                             % 
     
    1057983%                                                                             % 
    1058984%                                                                             % 
     985+   M i m e C o m p o n e n t G e n e s i s                                   % 
     986%                                                                             % 
     987%                                                                             % 
     988%                                                                             % 
     989%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     990% 
     991%  MimeComponentGenesis() instantiates the mime component. 
     992% 
     993%  The format of the MimeComponentGenesis method is: 
     994% 
     995%      WizardBooleanType MimeComponentGenesis(void) 
     996% 
     997*/ 
     998WizardExport WizardBooleanType MimeComponentGenesis(void) 
     999{ 
     1000  AcquireSemaphoreInfo(&mime_semaphore); 
     1001  RelinquishSemaphoreInfo(mime_semaphore); 
     1002  return(WizardTrue); 
     1003} 
     1004 
     1005/* 
     1006%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     1007%                                                                             % 
     1008%                                                                             % 
     1009%                                                                             % 
     1010+   M i m e C o m p o n e n t T e r m i n u s                                 % 
     1011%                                                                             % 
     1012%                                                                             % 
     1013%                                                                             % 
     1014%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     1015% 
     1016%  MimeComponentTerminus() destroys the mime component. 
     1017% 
     1018%  The format of the MimeComponentTerminus method is: 
     1019% 
     1020%      MimeComponentTerminus(void) 
     1021% 
     1022*/ 
     1023 
     1024static void *DestroyMimeElement(void *mime_info) 
     1025{ 
     1026  register MimeInfo 
     1027    *p; 
     1028 
     1029  p=(MimeInfo *) mime_info; 
     1030  if (p->magic != (unsigned char *) NULL) 
     1031    p->magic=(unsigned char *) RelinquishWizardMemory(p->magic); 
     1032  if (p->pattern != (char *) NULL) 
     1033    p->pattern=DestroyString(p->pattern); 
     1034  if (p->description != (char *) NULL) 
     1035    p->description=DestroyString(p->description); 
     1036  if (p->type != (char *) NULL) 
     1037    p->type=DestroyString(p->type); 
     1038  if (p->path != (char *) NULL) 
     1039    p->path=DestroyString(p->path); 
     1040  p=(MimeInfo *) RelinquishWizardMemory(p); 
     1041  return((void *) NULL); 
     1042} 
     1043 
     1044WizardExport void MimeComponentTerminus(void) 
     1045{ 
     1046  AcquireSemaphoreInfo(&mime_semaphore); 
     1047  if (mime_list != (LinkedListInfo *) NULL) 
     1048    mime_list=DestroyLinkedList(mime_list,DestroyMimeElement); 
     1049  instantiate_mime=WizardFalse; 
     1050  RelinquishSemaphoreInfo(mime_semaphore); 
     1051  DestroySemaphoreInfo(&mime_semaphore); 
     1052} 
     1053 
     1054/* 
     1055%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     1056%                                                                             % 
     1057%                                                                             % 
     1058%                                                                             % 
    10591059+  W i z a r d T o M i m e                                                    % 
    10601060%                                                                             %