Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for dead/diplomovka/xgrafix/src/xginitvar.c between version 1.1 and 1.2

version 1.1, 2001/09/20 14:12:00 version 1.2, 2002/07/07 23:57:58
Line 11  void ReallocateSpecials()
Line 11  void ReallocateSpecials()
   
         if (theSpecialArray == NULL)          if (theSpecialArray == NULL)
                 theSpecialArray = (SpecialType *) malloc(sizeOfSpecialArray *                  theSpecialArray = (SpecialType *) malloc(sizeOfSpecialArray *
                                                                 sizeof(SpecialType));                                  sizeof(SpecialType));
         else          else
                 theSpecialArray = (SpecialType *) realloc(theSpecialArray,                  theSpecialArray = (SpecialType *) realloc(theSpecialArray,
                                                                 sizeOfSpecialArray * sizeof(SpecialType));                                  sizeOfSpecialArray * sizeof(SpecialType));
         if (theSpecialArray == NULL) {          if (theSpecialArray == NULL) {
                 printf("Not enough memory to allocate specials\n");                  printf("Not enough memory to allocate specials\n");
                 exit(1);                  exit(1);
Line 42  void SetUpNewVar(void *spvar, char *spna
Line 42  void SetUpNewVar(void *spvar, char *spna
                 SpTemp->Type = CHAR;                  SpTemp->Type = CHAR;
         else {          else {
                 printf("Unknown special type: %s.  "                  printf("Unknown special type: %s.  "
                                                                 "Must be 'integer', 'double', "                                  "Must be 'integer', 'double', "
                                                                 "'float', or 'char'.\n", type);                                  "'float', or 'char'.\n", type);
                 free(SpTemp);                  free(SpTemp);
                 return;                  return;
         }          }
Line 53  void SetUpNewVar(void *spvar, char *spna
Line 53  void SetUpNewVar(void *spvar, char *spna
   
         theSpecialArray[numberOfSpecials] = SpTemp;          theSpecialArray[numberOfSpecials] = SpTemp;
   
         sprintf(TclCommand,"SetUpNewVar %d \"%s\" \"%s\"\n",numberOfSpecials++,          if (snprintf(TclCommand, TclCommand_MAX,
                                                         spname,type);                                  "SetUpNewVar %d \"%s\" \"%s\"\n", numberOfSpecials++,
                                   spname,type) == -1) {
                   fprintf(stderr, "Warning: TclCommand truncated at %s:%d\n", __FILE__, __LINE__);
           }
         if (Tcl_Eval(interp,TclCommand)!=TCL_OK) {          if (Tcl_Eval(interp,TclCommand)!=TCL_OK) {
                 printf("Error setting up variable\n");                  printf("Error setting up variable\n");
                 printf("%s\n",interp->result);                  printf("%s\n",interp->result);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top