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

Diff for /src/usr.bin/mg/extend.c between version 1.32 and 1.33

version 1.32, 2005/03/10 16:58:57 version 1.33, 2005/04/03 02:09:28
Line 30 
Line 30 
 static int       bindkey(KEYMAP **, const char *, KCHAR *, int);  static int       bindkey(KEYMAP **, const char *, KCHAR *, int);
   
 /*  /*
  * Insert a string, mainly for use from macros (created by selfinsert)   * Insert a string, mainly for use from macros (created by selfinsert).
  */   */
 /* ARGSUSED */  /* ARGSUSED */
 int  int
Line 45 
Line 45 
                         for (count = 0; count < maclcur->l_used; count++) {                          for (count = 0; count < maclcur->l_used; count++) {
                                 if ((((c = maclcur->l_text[count]) == '\n')                                  if ((((c = maclcur->l_text[count]) == '\n')
                                     ? lnewline() : linsert(1, c)) != TRUE)                                      ? lnewline() : linsert(1, c)) != TRUE)
                                         return FALSE;                                          return (FALSE);
                         }                          }
                 }                  }
                 maclcur = maclcur->l_fp;                  maclcur = maclcur->l_fp;
                 return TRUE;                  return (TRUE);
         }          }
         if (n == 1)          if (n == 1)
                 /* CFINS means selfinsert can tack on the end */                  /* CFINS means selfinsert can tack on the end */
                 thisflag |= CFINS;                  thisflag |= CFINS;
 #endif /* !NO_MACRO */  #endif /* !NO_MACRO */
         if ((bufp = eread("Insert: ", buf, sizeof(buf), EFNEW)) == NULL)          if ((bufp = eread("Insert: ", buf, sizeof(buf), EFNEW)) == NULL)
                 return ABORT;                  return (ABORT);
         else if (bufp[0] == '\0')          else if (bufp[0] == '\0')
                 return FALSE;                  return (FALSE);
         while (--n >= 0) {          while (--n >= 0) {
                 cp = buf;                  cp = buf;
                 while (*cp) {                  while (*cp) {
                         if (((*cp == '\n') ? lnewline() : linsert(1, *cp))                          if (((*cp == '\n') ? lnewline() : linsert(1, *cp))
                             != TRUE)                              != TRUE)
                                 return FALSE;                                  return (FALSE);
                         cp++;                          cp++;
                 }                  }
         }          }
         return TRUE;          return (TRUE);
 }  }
   
 /*  /*
  * Bind a key to a function.  Cases range from the trivial (replacing an   * Bind a key to a function.  Cases range from the trivial (replacing an
  * existing binding) to the extremly complex (creating a new prefix in a   * existing binding) to the extremely complex (creating a new prefix in a
  * map_element that already has one, so the map_element must be split,   * map_element that already has one, so the map_element must be split,
  * but the keymap doesn't have enough room for another map_element, so   * but the keymap doesn't have enough room for another map_element, so
  * the keymap is reallocated).  No attempt is made to reclaim space no   * the keymap is reallocated).  No attempt is made to reclaim space no
Line 110 
Line 110 
                         if ((pfp = (PF *)malloc((c - ele->k_base + 1) *                          if ((pfp = (PF *)malloc((c - ele->k_base + 1) *
                             sizeof(PF))) == NULL) {                              sizeof(PF))) == NULL) {
                                 ewprintf("Out of memory");                                  ewprintf("Out of memory");
                                 return FALSE;                                  return (FALSE);
                         }                          }
                         nold = ele->k_num - ele->k_base + 1;                          nold = ele->k_num - ele->k_base + 1;
                         for (i = 0; i < nold; i++)                          for (i = 0; i < nold; i++)
Line 124 
Line 124 
                         if ((pfp = (PF *)malloc((ele->k_num - c + 1) *                          if ((pfp = (PF *)malloc((ele->k_num - c + 1) *
                             sizeof(PF))) == NULL) {                              sizeof(PF))) == NULL) {
                                 ewprintf("Out of memory");                                  ewprintf("Out of memory");
                                 return FALSE;                                  return (FALSE);
                         }                          }
                         nold = ele->k_num - ele->k_base + 1;                          nold = ele->k_num - ele->k_base + 1;
                         for (i = 0; i < nold; i++)                          for (i = 0; i < nold; i++)
Line 137 
Line 137 
                 } else {                  } else {
                         if (curmap->map_num >= curmap->map_max) {                          if (curmap->map_num >= curmap->map_max) {
                                 if ((newmap = reallocmap(curmap)) == NULL)                                  if ((newmap = reallocmap(curmap)) == NULL)
                                         return FALSE;                                          return (FALSE);
                                 curmap = newmap;                                  curmap = newmap;
                         }                          }
                         if ((pfp = malloc(sizeof(PF))) == NULL) {                          if ((pfp = malloc(sizeof(PF))) == NULL) {
                                 ewprintf("Out of memory");                                  ewprintf("Out of memory");
                                 return FALSE;                                  return (FALSE);
                         }                          }
                         pfp[0] = funct;                          pfp[0] = funct;
                         for (mep = &curmap->map_element[curmap->map_num];                          for (mep = &curmap->map_element[curmap->map_num];
Line 167 
Line 167 
                                         ewprintf("Out of memory");                                          ewprintf("Out of memory");
                                         ele->k_funcp[c - ele->k_base] =                                          ele->k_funcp[c - ele->k_base] =
                                             curmap->map_default;                                              curmap->map_default;
                                         return FALSE;                                          return (FALSE);
                                 }                                  }
                                 mp->map_num = 0;                                  mp->map_num = 0;
                                 mp->map_max = MAPINIT;                                  mp->map_max = MAPINIT;
Line 180 
Line 180 
                 if (ele->k_funcp[n1] == funct && (funct != NULL ||                  if (ele->k_funcp[n1] == funct && (funct != NULL ||
                     pref_map == NULL || pref_map == ele->k_prefmap))                      pref_map == NULL || pref_map == ele->k_prefmap))
                         /* no change */                          /* no change */
                         return TRUE;                          return (TRUE);
                 if (funct != NULL || ele->k_prefmap == NULL) {                  if (funct != NULL || ele->k_prefmap == NULL) {
                         if (ele->k_funcp[n1] == NULL)                          if (ele->k_funcp[n1] == NULL)
                                 ele->k_prefmap = NULL;                                  ele->k_prefmap = NULL;
Line 196 
Line 196 
                                                 ewprintf("Out of memory");                                                  ewprintf("Out of memory");
                                                 ele->k_funcp[c - ele->k_base] =                                                  ele->k_funcp[c - ele->k_base] =
                                                     curmap->map_default;                                                      curmap->map_default;
                                                 return FALSE;                                                  return (FALSE);
                                         }                                          }
                                         mp->map_num = 0;                                          mp->map_num = 0;
                                         mp->map_max = MAPINIT;                                          mp->map_max = MAPINIT;
Line 215 
Line 215 
                                 n2 &= ele->k_funcp[i] != NULL;                                  n2 &= ele->k_funcp[i] != NULL;
                         if (curmap->map_num >= curmap->map_max &&                          if (curmap->map_num >= curmap->map_max &&
                             (curmap = reallocmap(curmap)) == NULL)                              (curmap = reallocmap(curmap)) == NULL)
                                 return FALSE;                                  return (FALSE);
                         if ((pfp = malloc((ele->k_num - c + !n2) *                          if ((pfp = malloc((ele->k_num - c + !n2) *
                             sizeof(PF))) == NULL) {                              sizeof(PF))) == NULL) {
                                 ewprintf("Out of memory");                                  ewprintf("Out of memory");
                                 return FALSE;                                  return (FALSE);
                         }                          }
                         ele->k_funcp[n1] = NULL;                          ele->k_funcp[n1] = NULL;
                         for (i = n1 + n2; i <= ele->k_num - ele->k_base; i++)                          for (i = n1 + n2; i <= ele->k_num - ele->k_base; i++)
Line 243 
Line 243 
                                         ewprintf("Out of memory");                                          ewprintf("Out of memory");
                                         ele->k_funcp[c - ele->k_base] =                                          ele->k_funcp[c - ele->k_base] =
                                             curmap->map_default;                                              curmap->map_default;
                                         return FALSE;                                          return (FALSE);
                                 }                                  }
                                 mp->map_num = 0;                                  mp->map_num = 0;
                                 mp->map_max = MAPINIT;                                  mp->map_max = MAPINIT;
Line 253 
Line 253 
                                 ele->k_prefmap = pref_map;                                  ele->k_prefmap = pref_map;
                 }                  }
         }          }
         return TRUE;          return (TRUE);
 }  }
   
 /*  /*
Line 262 
Line 262 
 static KEYMAP *  static KEYMAP *
 reallocmap(KEYMAP *curmap)  reallocmap(KEYMAP *curmap)
 {  {
         MAPS *mps;          MAPS    *mps;
         KEYMAP  *mp;          KEYMAP  *mp;
         int      i;          int      i;
   
Line 270 
Line 270 
             (curmap->map_max + (MAPGROW - 1)) *              (curmap->map_max + (MAPGROW - 1)) *
             sizeof(MAP_ELEMENT)))) == NULL) {              sizeof(MAP_ELEMENT)))) == NULL) {
                 ewprintf("Out of memory");                  ewprintf("Out of memory");
                 return NULL;                  return (NULL);
         }          }
         mp->map_num = curmap->map_num;          mp->map_num = curmap->map_num;
         mp->map_max = curmap->map_max + MAPGROW;          mp->map_max = curmap->map_max + MAPGROW;
Line 288 
Line 288 
                         fixmap(curmap, mp, mps->p_map);                          fixmap(curmap, mp, mps->p_map);
         }          }
         ele = &mp->map_element[ele - &curmap->map_element[0]];          ele = &mp->map_element[ele - &curmap->map_element[0]];
         return mp;          return (mp);
 }  }
   
 /*  /*
Line 310 
Line 310 
 }  }
   
 /*  /*
  * do the input for local-set-key, global-set-key  and define-key   * Do the input for local-set-key, global-set-key  and define-key
  * then call remap to do the work.   * then call remap to do the work.
  */   */
 static int  static int
Line 318 
Line 318 
 {  {
         KEYMAP  *pref_map = NULL;          KEYMAP  *pref_map = NULL;
         PF       funct;          PF       funct;
         char     prompt[80], *bufp;          char     prompt[80], *bufp, *pep;
         char    *pep;  
         int      c, s, n;          int      c, s, n;
   
 #ifndef NO_MACRO  #ifndef NO_MACRO
Line 329 
Line 328 
                  * Would not work for function keys in any case.                   * Would not work for function keys in any case.
                  */                   */
                 ewprintf("Can't rebind key in macro");                  ewprintf("Can't rebind key in macro");
                 return FALSE;                  return (FALSE);
         }          }
 #ifndef NO_STARTUP  #ifndef NO_STARTUP
         if (inmacro) {          if (inmacro) {
Line 338 
Line 337 
                             != NULL) {                              != NULL) {
                                 if (remap(curmap, c, NULL, NULL)                                  if (remap(curmap, c, NULL, NULL)
                                     != TRUE)                                      != TRUE)
                                         return FALSE;                                          return (FALSE);
                         }                          }
                 }                  }
                 (void)doscan(curmap, c = maclcur->l_text[s], NULL);                  (void)doscan(curmap, c = maclcur->l_text[s], NULL);
Line 346 
Line 345 
         } else {          } else {
 #endif /* !NO_STARTUP */  #endif /* !NO_STARTUP */
 #endif /* !NO_MACRO */  #endif /* !NO_MACRO */
                 n = strlcpy(prompt, p, sizeof prompt);                  n = strlcpy(prompt, p, sizeof(prompt));
                 if (n >= sizeof prompt)                  if (n >= sizeof(prompt))
                         n = sizeof prompt - 1;                          n = sizeof(prompt) - 1;
                 pep = prompt + n;                  pep = prompt + n;
                 for (;;) {                  for (;;) {
                         ewprintf("%s", prompt);                          ewprintf("%s", prompt);
Line 368 
Line 367 
         else {          else {
                 if ((bufp = eread("%s to command: ", prompt, 80, EFFUNC | EFNEW,                  if ((bufp = eread("%s to command: ", prompt, 80, EFFUNC | EFNEW,
                     prompt)) == NULL)                      prompt)) == NULL)
                         return ABORT;                          return (ABORT);
                 else if (bufp[0] == '\0')                  else if (bufp[0] == '\0')
                         return FALSE;                          return (FALSE);
                 if (((funct = name_function(prompt)) == NULL) ?                  if (((funct = name_function(prompt)) == NULL) ?
                     (pref_map = name_map(prompt)) == NULL : funct == NULL) {                      (pref_map = name_map(prompt)) == NULL : funct == NULL) {
                         ewprintf("[No match]");                          ewprintf("[No match]");
                         return FALSE;                          return (FALSE);
                 }                  }
         }          }
         return remap(curmap, c, funct, pref_map);          return (remap(curmap, c, funct, pref_map));
 }  }
   
 /*  /*
Line 400 
Line 399 
         else if (((funct = name_function(fname)) == NULL) ?          else if (((funct = name_function(fname)) == NULL) ?
             (pref_map = name_map(fname)) == NULL : funct == NULL) {              (pref_map = name_map(fname)) == NULL : funct == NULL) {
                 ewprintf("[No match: %s]", fname);                  ewprintf("[No match: %s]", fname);
                 return FALSE;                  return (FALSE);
         }          }
         while (--kcount) {          while (--kcount) {
                 if (doscan(curmap, c = *keys++, &curmap) != NULL) {                  if (doscan(curmap, c = *keys++, &curmap) != NULL) {
                         if (remap(curmap, c, NULL, NULL) != TRUE)                          if (remap(curmap, c, NULL, NULL) != TRUE)
                                 return FALSE;                                  return (FALSE);
                         /*                          /*
                          * XXX - Bizzarreness. remap creates an empty KEYMAP                           * XXX - Bizzarreness. remap creates an empty KEYMAP
                          *       that the last key is supposed to point to.                           *       that the last key is supposed to point to.
Line 414 
Line 413 
                 }                  }
         }          }
         (void)doscan(curmap, c = *keys, NULL);          (void)doscan(curmap, c = *keys, NULL);
         return remap(curmap, c, funct, pref_map);          return (remap(curmap, c, funct, pref_map));
 }  }
   
 #ifdef FKEYS  #ifdef FKEYS
Line 465 
Line 464 
 int  int
 bindtokey(int f, int n)  bindtokey(int f, int n)
 {  {
         return dobind(fundamental_map, "Global set key: ", FALSE);          return (dobind(fundamental_map, "Global set key: ", FALSE));
 }  }
   
 /*  /*
Line 475 
Line 474 
 int  int
 localbind(int f, int n)  localbind(int f, int n)
 {  {
         return dobind(curbp->b_modes[curbp->b_nmodes]->p_map,          return (dobind(curbp->b_modes[curbp->b_nmodes]->p_map,
             "Local set key: ", FALSE);              "Local set key: ", FALSE));
 }  }
   
 /*  /*
Line 486 
Line 485 
 int  int
 define_key(int f, int n)  define_key(int f, int n)
 {  {
         static char buf[48];          static char      buf[48];
         char tmp[32], *bufp;          char             tmp[32], *bufp;
         KEYMAP *mp;          KEYMAP          *mp;
   
         strlcpy(buf, "Define key map: ", sizeof buf);          strlcpy(buf, "Define key map: ", sizeof(buf));
         if ((bufp = eread(buf, tmp, sizeof tmp, EFNEW)) == NULL)          if ((bufp = eread(buf, tmp, sizeof(tmp), EFNEW)) == NULL)
                 return ABORT;                  return (ABORT);
         else if (bufp[0] == '\0')          else if (bufp[0] == '\0')
                 return FALSE;                  return (FALSE);
         strlcat(buf, tmp, sizeof buf);          strlcat(buf, tmp, sizeof(buf));
         if ((mp = name_map(tmp)) == NULL) {          if ((mp = name_map(tmp)) == NULL) {
                 ewprintf("Unknown map %s", tmp);                  ewprintf("Unknown map %s", tmp);
                 return FALSE;                  return (FALSE);
         }          }
         strlcat(buf, "key: ", sizeof buf);          strlcat(buf, "key: ", sizeof(buf));
   
         return dobind(mp, buf, FALSE);          return (dobind(mp, buf, FALSE));
 }  }
   
 int  int
 unbindtokey(int f, int n)  unbindtokey(int f, int n)
 {  {
         return dobind(fundamental_map, "Global unset key: ", TRUE);          return (dobind(fundamental_map, "Global unset key: ", TRUE));
 }  }
   
 int  int
 localunbind(int f, int n)  localunbind(int f, int n)
 {  {
         return dobind(curbp->b_modes[curbp->b_nmodes]->p_map,          return (dobind(curbp->b_modes[curbp->b_nmodes]->p_map,
             "Local unset key: ", TRUE);              "Local unset key: ", TRUE));
 }  }
   
 /*  /*
Line 535 
Line 534 
         else          else
                 bufp = eread("%d M-x ", xname, NXNAME, EFNEW | EFFUNC, n);                  bufp = eread("%d M-x ", xname, NXNAME, EFNEW | EFFUNC, n);
         if (bufp == NULL)          if (bufp == NULL)
                 return ABORT;                  return (ABORT);
         else if (bufp[0] == '\0')          else if (bufp[0] == '\0')
                 return FALSE;                  return (FALSE);
         if ((funct = name_function(bufp)) != NULL) {          if ((funct = name_function(bufp)) != NULL) {
 #ifndef NO_MACRO  #ifndef NO_MACRO
                 if (macrodef) {                  if (macrodef) {
Line 548 
Line 547 
                         free((char *)lp);                          free((char *)lp);
                 }                  }
 #endif /* !NO_MACRO */  #endif /* !NO_MACRO */
                 return (*funct)(f, n);                  return ((*funct)(f, n));
         }          }
         ewprintf("[No match]");          ewprintf("[No match]");
         return FALSE;          return (FALSE);
 }  }
   
 #ifndef NO_STARTUP  #ifndef NO_STARTUP
Line 580 
Line 579 
         char     exbuf[128], *bufp;          char     exbuf[128], *bufp;
   
         if ((bufp = ereply("Eval: ", exbuf, sizeof(exbuf))) == NULL)          if ((bufp = ereply("Eval: ", exbuf, sizeof(exbuf))) == NULL)
                 return ABORT;                  return (ABORT);
         else if (bufp[0] == '\0')          else if (bufp[0] == '\0')
                 return FALSE;                  return (FALSE);
         return excline(exbuf);          return (excline(exbuf));
 }  }
   
 /*  /*
Line 601 
Line 600 
   
         for (lp = lforw(bp->b_linep); lp != bp->b_linep; lp = lforw(lp)) {          for (lp = lforw(bp->b_linep); lp != bp->b_linep; lp = lforw(lp)) {
                 if (llength(lp) >= 128)                  if (llength(lp) >= 128)
                         return FALSE;                          return (FALSE);
                 (void)strncpy(excbuf, ltext(lp), llength(lp));                  (void)strncpy(excbuf, ltext(lp), llength(lp));
   
                 /* make sure it's terminated */                  /* make sure it's terminated */
                 excbuf[llength(lp)] = '\0';                  excbuf[llength(lp)] = '\0';
                 if ((s = excline(excbuf)) != TRUE)                  if ((s = excline(excbuf)) != TRUE)
                         return s;                          return (s);
         }          }
         return TRUE;          return (TRUE);
 }  }
   
 /*  /*
Line 623 
Line 622 
         char     fname[NFILEN], *bufp;          char     fname[NFILEN], *bufp;
   
         if ((bufp = ereply("Load file: ", fname, NFILEN)) == NULL)          if ((bufp = ereply("Load file: ", fname, NFILEN)) == NULL)
                 return ABORT;                  return (ABORT);
         else if (bufp[0] == '\0')          else if (bufp[0] == '\0')
                 return FALSE;                  return (FALSE);
         return load(fname);          return (load(fname));
 }  }
   
 /*  /*
Line 641 
Line 640 
   
         if ((fname = adjustname(fname)) == NULL)          if ((fname = adjustname(fname)) == NULL)
                 /* just to be careful */                  /* just to be careful */
                 return FALSE;                  return (FALSE);
   
         if (ffropen(fname, NULL) != FIOSUC)          if (ffropen(fname, NULL) != FIOSUC)
                 return FALSE;                  return (FALSE);
   
         line = 0;          line = 0;
         while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) {          while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) {
Line 659 
Line 658 
         (void)ffclose(NULL);          (void)ffclose(NULL);
         excbuf[nbytes] = '\0';          excbuf[nbytes] = '\0';
         if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE))          if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE))
                 return FALSE;                  return (FALSE);
         return TRUE;          return (TRUE);
 }  }
   
 /*  /*
  * excline - run a line from a load file or eval-expression.  if FKEYS is   * excline - run a line from a load file or eval-expression.  If FKEYS is
  * defined, duplicate functionallity of dobind so function key values don't   * defined, duplicate functionality of dobind so function key values don't
  * have to fit in type char.   * have to fit in type char.
  */   */
 int  int
Line 693 
Line 692 
   
         if (macrodef || inmacro) {          if (macrodef || inmacro) {
                 ewprintf("Not now!");                  ewprintf("Not now!");
                 return FALSE;                  return (FALSE);
         }          }
         f = 0;          f = 0;
         n = 1;          n = 1;
         funcp = skipwhite(line);          funcp = skipwhite(line);
         if (*funcp == '\0')          if (*funcp == '\0')
                 return TRUE;    /* No error on blank lines */                  return (TRUE);  /* No error on blank lines */
         line = parsetoken(funcp);          line = parsetoken(funcp);
         if (*line != '\0') {          if (*line != '\0') {
                 *line++ = '\0';                  *line++ = '\0';
Line 713 
Line 712 
                 f = FFARG;                  f = FFARG;
                 nl = strtol(argp, &tmp, 10);                  nl = strtol(argp, &tmp, 10);
                 if (*tmp != '\0')                  if (*tmp != '\0')
                         return FALSE;                          return (FALSE);
                 if (nl >= INT_MAX || nl <= INT_MIN)                  if (nl >= INT_MAX || nl <= INT_MIN)
                         return FALSE;                          return (FALSE);
                 n = (int)nl;                  n = (int)nl;
         }          }
         if ((fp = name_function(funcp)) == NULL) {          if ((fp = name_function(funcp)) == NULL) {
                 ewprintf("Unknown function: %s", funcp);                  ewprintf("Unknown function: %s", funcp);
                 return FALSE;                  return (FALSE);
         }          }
 #ifdef  FKEYS  #ifdef  FKEYS
         if (fp == bindtokey || fp == unbindtokey) {          if (fp == bindtokey || fp == unbindtokey) {
Line 736 
Line 735 
 #endif /* FKEYS */  #endif /* FKEYS */
         /* Pack away all the args now... */          /* Pack away all the args now... */
         if ((np = lalloc(0)) == FALSE)          if ((np = lalloc(0)) == FALSE)
                 return FALSE;                  return (FALSE);
         np->l_fp = np->l_bp = maclcur = np;          np->l_fp = np->l_bp = maclcur = np;
         while (*line != '\0') {          while (*line != '\0') {
                 argp = skipwhite(line);                  argp = skipwhite(line);
Line 771 
Line 770 
                                 }                                  }
                                 lp->l_used = 0;                                  lp->l_used = 0;
 #ifdef  FKEYS  #ifdef  FKEYS
                         } else {                          } else
                                 key.k_count = 0;                                  key.k_count = 0;
                         }  
 #endif /* FKEYS */  #endif /* FKEYS */
                         while (*argp != '"' && *argp != '\0') {                          while (*argp != '"' && *argp != '\0') {
                                 if (*argp != '\\')                                  if (*argp != '\\')
Line 890 
Line 888 
                         lp->l_text[lp->l_used] = '\0';                          lp->l_text[lp->l_used] = '\0';
                         status = bindkey(&curmap, lp->l_text, key.k_chars,                          status = bindkey(&curmap, lp->l_text, key.k_chars,
                             key.k_count);                              key.k_count);
                 } else {                  } else
                         status = bindkey(&curmap, NULL, key.k_chars,                          status = bindkey(&curmap, NULL, key.k_chars,
                             key.k_count);                              key.k_count);
                 }  
                 break;                  break;
         case BINDNO:          case BINDNO:
 #endif /* FKEYS */  #endif /* FKEYS */
Line 912 
Line 909 
                 lp = np;                  lp = np;
         }          }
         free((char *)lp);          free((char *)lp);
         return status;          return (status);
 }  }
   
 /*  /*
Line 925 
Line 922 
                 s++;                  s++;
         if (*s == ';')          if (*s == ';')
                 *s = '\0';                  *s = '\0';
         return s;          return (s);
 }  }
   
 static char *  static char *
Line 945 
Line 942 
                         if (*s == '\\')                          if (*s == '\\')
                                 ++s;                                  ++s;
                 } while (*++s != '"' && *s != '\0');                  } while (*++s != '"' && *s != '\0');
         return s;          return (s);
 }  }
 #endif /* !NO_STARTUP */  #endif /* !NO_STARTUP */

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33