Main Page | Class List | Directories | File List | Class Members | File Members

eval.c File Reference

#include "cf.defs.h"
#include "cf.extern.h"

Go to the source code of this file.

Functions

int Day2Number (char *datestring)
void AddInstallable (char *classlist)
void AddMultipleClasses (char *classlist)
void AddTimeClass (char *str)
int Month2Number (char *string)
void AddClassToHeap (char *class)
void DeleteClassFromHeap (char *class)
void DeleteClassesFromContext (char *context)
int IsHardClass (char *sp)
int IsSpecialClass (char *class)
int IsExcluded (char *exception)
int IsDefinedClass (char *class)
int IsInstallable (char *class)
void AddCompoundClass (char *class)
void NegateCompoundClass (char *class, struct Item **heap)
int EvaluateORString (char *class, struct Item *list)
int EvaluateANDString (char *class, struct Item *list)
int GetORAtom (char *start, char *buffer)
int GetANDAtom (char *start, char *buffer)
int CountEvalAtoms (char *class)
enum actions ActionStringToCode (char *str)
int IsBracketed (char *s)

Variables

char * DAYTEXT []
char * MONTHTEXT []


Function Documentation

enum actions ActionStringToCode char *  str  ) 
 

Definition at line 846 of file eval.c.

References ACTIONID, FatalError(), i, none, sp, ToLower(), and yyerror().

00850 { char *sp;
00851   int i;
00852   enum actions action;
00853 
00854 action = none;
00855 
00856 for (sp = str; *sp != '\0'; sp++)
00857    {
00858    *sp = ToLower(*sp);
00859    if (*sp == ':')
00860       {
00861       *sp = '\0';
00862       }
00863    }
00864 
00865 for (i = 1; ACTIONID[i] != '\0'; i++)
00866    {
00867    if (strcmp(ACTIONID[i],str) == 0)
00868       {
00869       action = (enum actions) i;
00870       break;
00871       }
00872    }
00873 
00874 if (action == none)
00875   {
00876   yyerror("Indexed macro specified no action");
00877   FatalError("Could not compile action");
00878   }
00879 
00880 return (enum actions) i;
00881 }

void AddClassToHeap char *  class  ) 
 

Definition at line 302 of file eval.c.

References AppendItem(), CONTEXTID, Debug, IsItemIn(), and VHEAP.

Referenced by AddCompoundClass(), AddEditfileClasses(), AddMultipleClasses(), AddNetworkClass(), AddTimeClass(), CheckFileChanges(), CheckOpts(), CheckOptsAndInit(), CheckSystemVariables(), debian_version(), DoEditFile(), GetEnvironment(), GetInterfaceInfo(), GetNameInfo(), HandleGroupItem(), Initialize(), InstallLocalInfo(), linux_redhat_version(), SetDomainName(), and SetStrategies().

00306 {
00307 Debug("AddClassToHeap(%s)\n",class);
00308 
00309  if (IsItemIn(VHEAP,class))
00310    {
00311    return;
00312    }
00313 
00314 AppendItem(&VHEAP,class,CONTEXTID);
00315 }

void AddCompoundClass char *  class  ) 
 

Definition at line 485 of file eval.c.

References AddClassToHeap(), Debug1, FatalError(), IsHardClass(), maxvarsize, and sp.

Referenced by CheckOpts(), and InstallLocalInfo().

00489 { char *sp = class;
00490   char cbuff[maxvarsize];
00491 
00492 Debug1("AddCompoundClass(%s)",class);
00493 
00494 while(*sp != '\0')
00495    {
00496    sscanf(sp,"%[^.]",cbuff);
00497 
00498    while ((*sp != '\0') && (*sp !='.'))
00499       {
00500       sp++;
00501       }
00502 
00503    if (*sp == '.')
00504       {
00505       sp++;
00506       }
00507 
00508    if (IsHardClass(cbuff))
00509       {
00510       FatalError("cfengine: You cannot use -D to define a reserved class!");
00511       }
00512 
00513    AddClassToHeap(cbuff);
00514    }
00515 }

void AddInstallable char *  classlist  ) 
 

Definition at line 95 of file eval.c.

References AppendItem(), Debug, IsItemIn(), maxvarsize, NULL, sp, and VALLADDCLASSES.

Referenced by AddClassToStrategy(), AddEditAction(), AppendDisable(), AppendScript(), AppendToActionSequence(), HandleItem(), InstallFileListItem(), InstallImageItem(), InstallLinkChildrenItem(), InstallLinkItem(), InstallLocalInfo(), InstallMakePath(), InstallProcessItem(), InstallRequiredPath(), and PrependTidy().

00099 { char *sp, currentitem[maxvarsize];
00100 
00101 if (classlist == NULL)
00102    {
00103    return;
00104    }
00105 
00106 Debug("AddInstallable(%s)\n",classlist);
00107   
00108  for (sp = classlist; *sp != '\0'; sp++)
00109    {
00110    currentitem[0] = '\0';
00111 
00112    sscanf(sp,"%[^,:.]",currentitem);
00113 
00114    sp += strlen(currentitem);
00115 
00116    if (! IsItemIn(VALLADDCLASSES,currentitem))
00117       {
00118       AppendItem(&VALLADDCLASSES,currentitem,NULL);
00119       }
00120 
00121    if (*sp == '\0')
00122       {
00123       break;
00124       }
00125    }
00126 }

void AddMultipleClasses char *  classlist  ) 
 

Definition at line 130 of file eval.c.

References AddClassToHeap(), bzero, CanonifyName(), Debug, maxvarsize, NULL, and sp.

00134 { char *sp, currentitem[maxvarsize],local[maxvarsize];
00135  
00136 if ((classlist == NULL) || strlen(classlist) == 0)
00137    {
00138    return;
00139    }
00140 
00141 bzero(local,maxvarsize);
00142 strcpy(local,classlist);
00143 
00144 Debug("AddMultipleClasses(%s)\n",local);
00145 
00146 for (sp = local; *sp != '\0'; sp++)
00147    {
00148    bzero(currentitem,maxvarsize);
00149 
00150    sscanf(sp,"%250[^.:,]",currentitem);
00151 
00152    sp += strlen(currentitem);
00153 
00154    AddClassToHeap(CanonifyName(currentitem));
00155    }
00156 }

void AddTimeClass char *  str  ) 
 

Definition at line 160 of file eval.c.

References AddClassToHeap(), bzero, DAYTEXT, i, MONTHTEXT, VDAY, VHR, VMINUTE, VMONTH, and VYEAR.

Referenced by ScheduleRun(), and SetReferenceTime().

00164 { int i;
00165   char buf2[10], buf3[10], buf4[10], buf5[10], buf[10], out[10];
00166   
00167 for (i = 0; i < 7; i++)
00168    {
00169    if (strncmp(DAYTEXT[i],str,3)==0)
00170       {
00171       AddClassToHeap(DAYTEXT[i]);
00172       break;
00173       }
00174    }
00175 
00176 sscanf(str,"%*s %s %s %s %s",buf2,buf3,buf4,buf5);
00177 
00178 /* Hours */
00179 
00180 sscanf(buf4,"%[^:]",buf);
00181 sprintf(out,"Hr%s",buf);
00182 AddClassToHeap(out);
00183 bzero(VHR,3);
00184 strncpy(VHR,buf,2); 
00185 
00186 /* Minutes */
00187 
00188 sscanf(buf4,"%*[^:]:%[^:]",buf);
00189 sprintf(out,"Min%s",buf);
00190 AddClassToHeap(out);
00191 bzero(VMINUTE,3);
00192 strncpy(VMINUTE,buf,2); 
00193  
00194 sscanf(buf,"%d",&i);
00195 
00196 switch ((i / 5))
00197    {
00198    case 0: AddClassToHeap("Min00_05");
00199            break;
00200    case 1: AddClassToHeap("Min05_10");
00201            break;
00202    case 2: AddClassToHeap("Min10_15");
00203            break;
00204    case 3: AddClassToHeap("Min15_20");
00205            break;
00206    case 4: AddClassToHeap("Min20_25");
00207            break;
00208    case 5: AddClassToHeap("Min25_30");
00209            break;
00210    case 6: AddClassToHeap("Min30_35");
00211            break;
00212    case 7: AddClassToHeap("Min35_40");
00213            break;
00214    case 8: AddClassToHeap("Min40_45");
00215            break;
00216    case 9: AddClassToHeap("Min45_50");
00217            break;
00218    case 10: AddClassToHeap("Min50_55");
00219             break;
00220    case 11: AddClassToHeap("Min55_00");
00221             break;
00222    }
00223 
00224 /* Add quarters */ 
00225 
00226 switch ((i / 15))
00227    {
00228    case 0: AddClassToHeap("Q1");
00229            sprintf(out,"Hr%s_Q1",VHR);
00230            AddClassToHeap(out);
00231            break;
00232    case 1: AddClassToHeap("Q2");
00233            sprintf(out,"Hr%s_Q2",VHR);
00234            AddClassToHeap(out);
00235            break;
00236    case 2: AddClassToHeap("Q3");
00237            sprintf(out,"Hr%s_Q3",VHR);
00238            AddClassToHeap(out);
00239            break;
00240    case 3: AddClassToHeap("Q4");
00241            sprintf(out,"Hr%s_Q4",VHR);
00242            AddClassToHeap(out);
00243            break;
00244    }
00245  
00246 
00247 /* Day */
00248 
00249 sprintf(out,"Day%s",buf3);
00250 AddClassToHeap(out);
00251 bzero(VDAY,3);
00252 strncpy(VDAY,buf3,2);
00253  
00254 /* Month */
00255 
00256 for (i = 0; i < 12; i++)
00257    {
00258    if (strncmp(MONTHTEXT[i],buf2,3)==0)
00259       {
00260       AddClassToHeap(MONTHTEXT[i]);
00261       bzero(VMONTH,4);
00262       strncpy(VMONTH,MONTHTEXT[i],3);
00263       break;
00264       }
00265    }
00266 
00267 /* Year */
00268 
00269 strcpy(VYEAR,buf5); 
00270 
00271 sprintf(out,"Yr%s",buf5);
00272 AddClassToHeap(out);
00273 }

int CountEvalAtoms char *  class  ) 
 

Definition at line 805 of file eval.c.

References count, FatalError(), OUTPUT, sp, and yyerror().

Referenced by EvaluateANDString().

00809 { char *sp;
00810   int count = 0, bracklevel = 0;
00811   
00812 for (sp = class; *sp != '\0'; sp++)
00813    {
00814    if (*sp == '(')
00815       {
00816       bracklevel++;
00817       continue;
00818       }
00819 
00820    if (*sp == ')')
00821       {
00822       bracklevel--;
00823       continue;
00824       }
00825    
00826    if ((bracklevel == 0) && (*sp == '.'))
00827       {
00828       count++;
00829       }
00830    }
00831 
00832 if (bracklevel != 0)
00833    {
00834    sprintf(OUTPUT,"Bracket mismatch, in [class=%s], level = %d\n",class,bracklevel);
00835    yyerror(OUTPUT);;
00836    FatalError("Aborted");
00837    }
00838 
00839 return count+1;
00840 }

int Day2Number char *  datestring  ) 
 

Definition at line 76 of file eval.c.

References DAYTEXT, and i.

Referenced by UpdateDistributions().

00080 { int i = 0;
00081 
00082 for (i = 0; i < 7; i++)
00083    {
00084    if (strncmp(datestring,DAYTEXT[i],3) == 0)
00085       {
00086       return i;
00087       }
00088    }
00089 
00090 return -1;
00091 }

void DeleteClassesFromContext char *  context  ) 
 

Definition at line 329 of file eval.c.

References Item::classes, Debug, DeleteItem(), Item::name, Item::next, NULL, Verbose, and VHEAP.

Referenced by main().

00333 { struct Item *ip;
00334 
00335 Verbose("Purging private classes from context %s\n",context);
00336  
00337 for (ip = VHEAP; ip != NULL; ip=ip->next)
00338    {
00339    if (strcmp(ip->classes,context) == 0)
00340       {
00341       Debug("Deleting context private class %s from heap\n",ip->name);
00342       DeleteItem(&VHEAP,ip);
00343       }
00344    }
00345 }

void DeleteClassFromHeap char *  class  ) 
 

Definition at line 319 of file eval.c.

References DeleteItemLiteral(), and VHEAP.

Referenced by SetDomainName().

00323 {
00324 DeleteItemLiteral(&VHEAP,class);
00325 }

int EvaluateANDString char *  class,
struct Item list
 

Definition at line 611 of file eval.c.

References bufsize, bzero, count, CountEvalAtoms(), EvaluateORString(), GetANDAtom(), IsBracketed(), IsItemIn(), sp, VHEAP, and VNEGHEAP.

Referenced by EvaluateORString().

00616 { char *sp, *atom;
00617   char cbuff[bufsize];
00618   int count = 1;
00619   int negation = false;
00620 
00621 count = CountEvalAtoms(class);
00622 sp = class;
00623 
00624 while(*sp != '\0')
00625    {
00626    negation = false;
00627 
00628    while (*sp == '!')
00629       {
00630       negation = !negation;
00631       sp++;
00632       }
00633 
00634    bzero(cbuff,bufsize);
00635 
00636    sp += GetANDAtom(sp,cbuff) + 1;
00637 
00638    atom = cbuff;
00639 
00640      /* Test for parentheses */
00641    
00642    if (IsBracketed(cbuff))
00643       {
00644       atom = cbuff+1;
00645 
00646       cbuff[strlen(cbuff)-1] = '\0';
00647 
00648       if (EvaluateORString(atom,list))
00649          {
00650          if (negation)
00651             {
00652             return false;
00653             }
00654          else
00655             {
00656             count--;
00657             }
00658          }
00659       else
00660          {
00661          if (negation)
00662             {
00663             count--;
00664             }
00665          else
00666             {
00667             return false;
00668             }
00669          }
00670 
00671       continue;
00672       }
00673    else
00674       {
00675       atom = cbuff;
00676       }
00677    
00678    /* End of parenthesis check */
00679    
00680    if (*sp == '.')
00681       {
00682       sp++;
00683       }
00684 
00685    if (IsItemIn(VNEGHEAP,atom))
00686       {
00687       if (negation)
00688          {
00689          count--;
00690          }
00691       else
00692          {
00693          return false;
00694          }
00695       } 
00696    else if (IsItemIn(VHEAP,atom))
00697       {
00698       if (negation)
00699          {
00700          return false;
00701          }
00702       else
00703          {
00704          count--;
00705          }
00706       } 
00707    else if (IsItemIn(list,atom))
00708       {
00709       if (negation)
00710          {
00711          return false;
00712          }
00713       else
00714          {
00715          count--;
00716          }
00717       } 
00718    else if (negation)    /* ! (an undefined class) == true */
00719       {
00720       count--;
00721       }
00722    else
00723       {
00724       return false;
00725       }
00726    }
00727 
00728 if (count == 0)
00729    {
00730    return(true);
00731    }
00732 else
00733    {
00734    return(false);
00735    }
00736 }

int EvaluateORString char *  class,
struct Item list
 

Definition at line 558 of file eval.c.

References bufsize, bzero, EvaluateANDString(), GetORAtom(), IsBracketed(), NULL, and sp.

Referenced by EvaluateANDString(), FileObjectFilter(), FilterGroupMatch(), FilterOwnerMatch(), FilterTypeMatch(), IsDefinedClass(), IsInstallable(), and ProcessFilter().

00563 { char *sp, cbuff[bufsize];
00564   int result = false;
00565 
00566 if (class == NULL)
00567    {
00568    return false;
00569    }
00570 
00571 for (sp = class; *sp != '\0'; sp++)
00572    {
00573    while (*sp == '|')
00574       {
00575       sp++;
00576       }
00577 
00578    bzero(cbuff,bufsize);
00579 
00580    sp += GetORAtom(sp,cbuff);
00581 
00582    if (strlen(cbuff) == 0)
00583       {
00584       break;
00585       }
00586 
00587    if (IsBracketed(cbuff)) /* Strip brackets */
00588       {
00589       cbuff[strlen(cbuff)-1] = '\0';
00590 
00591       result |= EvaluateORString(cbuff+1,list);
00592       }
00593    else
00594       {
00595       result |= EvaluateANDString(cbuff,list);
00596       }
00597 
00598    if (*sp == '\0')
00599       {
00600       break;
00601       }
00602    }
00603 
00604 return result;
00605 }

int GetANDAtom char *  start,
char *  buffer
 

Definition at line 773 of file eval.c.

References sp.

Referenced by EvaluateANDString().

00777 { char *sp = start;
00778   char *spc = buffer;
00779   int bracklevel = 0, len = 0;
00780 
00781 while ((*sp != '\0') && !((*sp == '.') && (bracklevel == 0)))
00782    {
00783    if (*sp == '(')
00784       {
00785       bracklevel++;
00786       }
00787 
00788    if (*sp == ')')
00789       {
00790       bracklevel--;
00791       }
00792 
00793    *spc++ = *sp++;
00794 
00795    len++;
00796    }
00797 
00798 *spc = '\0';
00799 
00800 return len;
00801 }

int GetORAtom char *  start,
char *  buffer
 

Definition at line 740 of file eval.c.

References sp.

Referenced by EvaluateORString().

00744 { char *sp = start;
00745   char *spc = buffer;
00746   int bracklevel = 0, len = 0;
00747 
00748 while ((*sp != '\0') && !((*sp == '|') && (bracklevel == 0)))
00749    {
00750    if (*sp == '(')
00751       {
00752       bracklevel++;
00753       }
00754 
00755    if (*sp == ')')
00756       {
00757       bracklevel--;
00758       }
00759 
00760    *spc++ = *sp++;
00761    len++;
00762    }
00763 
00764 *spc = '\0';
00765 
00766 return len;
00767 }

int IsBracketed char *  s  ) 
 

Definition at line 885 of file eval.c.

References i.

Referenced by EvaluateANDString(), and EvaluateORString().

00892 { int i, level= 0;
00893 
00894 if (*s != '(')
00895    {
00896    return false;
00897    }
00898 
00899 for (i = 0; i < strlen(s)-1; i++)
00900    {
00901    if (s[i] == '(')
00902       {
00903       level++;
00904       }
00905    
00906    if (s[i] == ')')
00907       {
00908       level--;
00909       }
00910 
00911    if (level == 0)
00912       {
00913       return false;  /* premature ) */
00914       }
00915    }
00916 
00917 return true;
00918 }

int IsDefinedClass char *  class  ) 
 

Definition at line 440 of file eval.c.

References EvaluateORString(), NULL, and VADDCLASSES.

Referenced by AddAuthHostItem(), BuildClassEnvironment(), DoAlerts(), EditItemsInResolvConf(), HandleGroupItem(), HandleId(), HandlePath(), HandleWildcard(), InstallAuthPath(), InstallDefaultRouteItem(), InstallImageItem(), InstallLocalInfo(), InstallMountableItem(), IsExcluded(), MatchClasses(), and ScheduleRun().

00447 {
00448 if (class == NULL)
00449    {
00450    return true;
00451    }
00452  
00453 return EvaluateORString(class,VADDCLASSES);
00454 }

int IsExcluded char *  exception  ) 
 

Definition at line 424 of file eval.c.

References Debug2, and IsDefinedClass().

Referenced by AddEditfileClasses(), BinaryEditFile(), CheckEditSwitches(), CheckFiles(), CheckHome(), CheckHomeImages(), CheckPosixACE(), CheckProcesses(), CheckRequired(), DisableFiles(), DoEditFile(), DoEditHomeFiles(), DoTree(), GetHomeInfo(), IgnoreFile(), IsClassedItemIn(), IsWildItemIn(), MakeChildLinks(), MakeImages(), MakeLinks(), MakePaths(), ParseInputFiles(), Scripts(), TidyFiles(), TidyHomeFile(), TidyParticularFile(), and Unmount().

00428 {
00429 if (! IsDefinedClass(exception))
00430    {
00431    Debug2("%s is excluded!\n",exception);
00432    return true;
00433    }  
00434 
00435 return false;
00436 }

int IsHardClass char *  sp  ) 
 

Definition at line 349 of file eval.c.

References CLASSTEXT, DAYTEXT, and i.

Referenced by AddCompoundClass(), AppendToActionSequence(), EvaluateAction(), HandleId(), and NegateCompoundClass().

00353 { int i;
00354 
00355 for (i = 2; CLASSTEXT[i] != '\0'; i++)
00356    {
00357    if (strcmp(CLASSTEXT[i],sp) == 0)
00358       {
00359       return(true);
00360       }
00361    }
00362 
00363 for (i = 0; i < 7; i++)
00364    {
00365    if (strcmp(DAYTEXT[i],sp)==0)
00366       {
00367       return(false);
00368       }
00369    }
00370 
00371 return(false);
00372 }

int IsInstallable char *  class  ) 
 

Definition at line 459 of file eval.c.

References bufsize, EvaluateORString(), i, sp, VADDCLASSES, and VALLADDCLASSES.

Referenced by AddACE(), AddEditAction(), AddTidyItem(), AppendDisable(), AppendIgnore(), AppendImport(), AppendInterface(), AppendMiscMount(), AppendNameServer(), AppendScript(), AppendUmount(), InstallACL(), InstallBinserverItem(), InstallBroadcastItem(), InstallEditFile(), InstallFileListItem(), InstallFilter(), InstallFilterTest(), InstallHomeserverItem(), InstallImageItem(), InstallLinkChildrenItem(), InstallLinkItem(), InstallLocalInfo(), InstallMailserverPath(), InstallMakePath(), InstallProcessItem(), InstallRequiredPath(), InstallStrategy(), and InstallTidyPath().

00466 { char buffer[bufsize], *sp;
00467   int i = 0;
00468 
00469 for (sp = class; *sp != '\0'; sp++)
00470    {
00471    if (*sp == '!')
00472       {
00473       continue;         /* some actions might be presented as !class */
00474       }
00475    buffer[i++] = *sp; 
00476    }
00477 
00478 buffer[i] = '\0';
00479  
00480 return (EvaluateORString(buffer,VALLADDCLASSES)||EvaluateORString(class,VALLADDCLASSES)||EvaluateORString(class,VADDCLASSES));
00481 }

int IsSpecialClass char *  class  ) 
 

Definition at line 376 of file eval.c.

References PARSING, Silent, value, Verbose, VEXPIREAFTER, VIFELAPSED, and VPREFIX.

Referenced by AppendToActionSequence(), and EvaluateAction().

00380 { int value = -1;
00381 
00382 if (strncmp(class,"IfElapsed",strlen("IfElapsed")) == 0)
00383    {
00384    sscanf(class,"IfElapsed%d",&value);
00385 
00386    if (value < 0)
00387       {
00388       Silent("%s: silly IfElapsed parameter in action sequence, using default...\n",VPREFIX);
00389       return true;
00390       }
00391 
00392    if (!PARSING)
00393       {
00394       VIFELAPSED = value;
00395       
00396       Verbose("                  IfElapsed time: %d minutes\n",VIFELAPSED);
00397       return true;
00398       }
00399    }
00400 
00401 if (strncmp(class,"ExpireAfter",strlen("ExpireAfter")) == 0)
00402    {
00403    sscanf(class,"ExpireAfter%d",&value);
00404 
00405    if (value <= 0)
00406       {
00407       Silent("%s: silly ExpireAter parameter in action sequence, using default...\n",VPREFIX);
00408       return true;
00409       }
00410 
00411    if (!PARSING)
00412       {
00413       VEXPIREAFTER = value;
00414       Verbose("\n                  ExpireAfter time: %d minutes\n",VEXPIREAFTER); 
00415       return true;
00416       }
00417    }
00418 
00419 return false;
00420 }

int Month2Number char *  string  ) 
 

Definition at line 277 of file eval.c.

References i, MONTHTEXT, and NULL.

Referenced by FilterProcSTimeMatch().

00281 { int i;
00282 
00283 if (string == NULL)
00284    {
00285    return -1;
00286    }
00287  
00288 for (i = 0; i < 12; i++)
00289    {
00290    if (strncmp(MONTHTEXT[i],string,strlen(string))==0)
00291       {
00292       return i+1;
00293       break;
00294       }
00295    }
00296 
00297 return -1;
00298 }

void NegateCompoundClass char *  class,
struct Item **  heap
 

Definition at line 519 of file eval.c.

References AppendItem(), bufsize, Debug1, FatalError(), IsHardClass(), maxvarsize, NULL, sp, and yyerror().

Referenced by CheckForModule(), and CheckOpts().

00524 { char *sp = class;
00525   char cbuff[maxvarsize];
00526 
00527 Debug1("NegateCompoundClass(%s)",class);
00528 
00529 while(*sp != '\0')
00530    {
00531    sscanf(sp,"%[^.]",cbuff);
00532 
00533    while ((*sp != '\0') && (*sp !='.'))
00534       {
00535       sp++;
00536       }
00537 
00538    if (*sp == '.')
00539       {
00540       sp++;
00541       }
00542 
00543    if (IsHardClass(cbuff))
00544       { char err[bufsize];
00545       yyerror("Illegal exception");
00546       sprintf (err,"Cannot negate the reserved class [%s]\n",cbuff);
00547       FatalError(err);
00548       }
00549 
00550    AppendItem(heap,cbuff,NULL);
00551    }
00552 }


Variable Documentation

char* DAYTEXT[]
 

Initial value:

   {
   "Monday",
   "Tuesday",
   "Wednesday",
   "Thursday",
   "Friday",
   "Saturday",
   "Sunday"
   }

Definition at line 44 of file eval.c.

Referenced by AddTimeClass(), Day2Number(), and IsHardClass().

char* MONTHTEXT[]
 

Initial value:

   {
   "January",
   "February",
   "March",
   "April",
   "May",
   "June",
   "July",
   "August",
   "September",
   "October",
   "November",
   "December"
   }

Definition at line 55 of file eval.c.

Referenced by AddTimeClass(), and Month2Number().


© sourcejam.com 2005-2008