home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume13 / perl / patches6-10 / patch6 < prev    next >
Encoding:
Internet Message Format  |  1988-01-30  |  3.0 KB

  1. Path: bbn.com!bbn!husc6!cmcl2!beta!hc!ames!elroy!devvax!lroot
  2. From: lroot@devvax.JPL.NASA.GOV (The Superuser)
  3. Newsgroups: comp.sources.bugs
  4. Subject: perl 1.0 patch #6
  5. Summary: This is an official patch for perl 1.0.  Please apply it.
  6. Message-ID: <1156@devvax.JPL.NASA.GOV>
  7. Date: 26 Jan 88 20:35:04 GMT
  8. Organization: Jet Propulsion Laboratory, Pasadena, CA
  9. Lines: 97
  10.  
  11. System: perl version 1.0
  12. Patch #: 6
  13. Priority: LOW
  14. Subject: printf doesn't finish processing format string when out of args.
  15. From: isis!aburt (Andrew Burt)
  16.  
  17. Description:
  18.     printf "%% %d %%", 1;  produces "% 1 %%", which is counterintuitive.
  19.  
  20. Fix:    From rn, say "| patch -d DIR", where DIR is your perl source
  21.     directory.  Outside of rn, say "cd DIR; patch <thisarticle".
  22.     If you don't have the patch program, apply the following by hand,
  23.     or get patch.
  24.  
  25.     If patch indicates that patchlevel is the wrong version, you may need
  26.     to apply one or more previous patches, or the patch may already
  27.     have been applied.  See the patchlevel.h file to find out what has or
  28.     has not been applied.  In any event, don't continue with the patch.
  29.  
  30.     If you are missing previous patches they can be obtained from me:
  31.  
  32.     Larry Wall
  33.     lwall@jpl-devvax.jpl.nasa.gov
  34.  
  35.     If you send a mail message of the following form it will greatly speed
  36.     processing:
  37.  
  38.     Subject: Command
  39.     @SH mailpatch PATH perl 1.0 LIST
  40.            ^ note the c
  41.  
  42.     where PATH is a return path FROM ME TO YOU in Internet notation, and
  43.     LIST is the number of one or more patches you need, separated by spaces,
  44.     commas, and/or hyphens.  Saying 35- says everything from 35 to the end.
  45.  
  46.     You can also get the patches via anonymous FTP from
  47.     jpl-devvax.jpl.nasa.gov (128.149.8.43).
  48.  
  49. Index: patchlevel.h
  50. Prereq: 5
  51. 1c1
  52. < #define PATCHLEVEL 5
  53. ---
  54. > #define PATCHLEVEL 6
  55.  
  56. Index: arg.c
  57. Prereq: 1.0.1.2
  58. *** arg.c.old    Tue Jan 26 12:31:23 1988
  59. --- arg.c    Tue Jan 26 12:31:25 1988
  60. ***************
  61. *** 1,6 ****
  62. ! /* $Header: arg.c,v 1.0.1.2 88/01/24 03:52:34 root Exp $
  63.    *
  64.    * $Log:    arg.c,v $
  65.    * Revision 1.0.1.2  88/01/24  03:52:34  root
  66.    * patch 2: added STATBLKS dependencies.
  67.    * 
  68. --- 1,9 ----
  69. ! /* $Header: arg.c,v 1.0.1.3 88/01/26 12:30:33 root Exp $
  70.    *
  71.    * $Log:    arg.c,v $
  72. +  * Revision 1.0.1.3  88/01/26  12:30:33  root
  73. +  * patch 6: sprintf didn't finish processing format string when out of args.
  74. +  * 
  75.    * Revision 1.0.1.2  88/01/24  03:52:34  root
  76.    * patch 2: added STATBLKS dependencies.
  77.    * 
  78. ***************
  79. *** 646,656 ****
  80.       register char *t;
  81.       bool dolong;
  82.       char ch;
  83.   
  84.       str_set(str,"");
  85.       len--;            /* don't count pattern string */
  86.       sarg++;
  87. !     for (s = str_get(*(sarg++)); *sarg && *s && len; len--) {
  88.       dolong = FALSE;
  89.       for (t = s; *t && *t != '%'; t++) ;
  90.       if (!*t)
  91. --- 649,664 ----
  92.       register char *t;
  93.       bool dolong;
  94.       char ch;
  95. +     static STR *sargnull = &str_no;
  96.   
  97.       str_set(str,"");
  98.       len--;            /* don't count pattern string */
  99.       sarg++;
  100. !     for (s = str_get(*(sarg++)); *s; len--) {
  101. !     if (len <= 0 || !*sarg) {
  102. !         sarg = &sargnull;
  103. !         len = 0;
  104. !     }
  105.       dolong = FALSE;
  106.       for (t = s; *t && *t != '%'; t++) ;
  107.       if (!*t)
  108.