[BACK]Return to value.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tip

Diff for /src/usr.bin/tip/Attic/value.c between version 1.15 and 1.16

version 1.15, 2007/02/20 01:44:16 version 1.16, 2007/02/20 16:59:24
Line 57 
Line 57 
 vinit(void)  vinit(void)
 {  {
         char file[FILENAME_MAX], *cp;          char file[FILENAME_MAX], *cp;
           int written;
         value_t *p;          value_t *p;
         FILE *fp;          FILE *fp;
   
Line 71 
Line 72 
          * Read the .tiprc file in the HOME directory           * Read the .tiprc file in the HOME directory
          *  for sets           *  for sets
          */           */
         if (strlen(value(HOME)) + sizeof("/.tiprc") > sizeof(file)) {          written = snprintf(file, sizeof(file), "%s/.tiprc", value(HOME));
           if (written < 0 || written >= sizeof(file)) {
                 (void)fprintf(stderr, "Home directory path too long: %s\n",                  (void)fprintf(stderr, "Home directory path too long: %s\n",
                     value(HOME));                      value(HOME));
         } else {          } else {
                 snprintf(file, sizeof file, "%s/.tiprc", value(HOME));  
                 if ((fp = fopen(file, "r")) != NULL) {                  if ((fp = fopen(file, "r")) != NULL) {
                         char *tp;                          char *tp;
   

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16