home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / unix / volume08 / multivol.pch < prev    next >
Encoding:
Internet Message Format  |  1988-09-11  |  2.7 KB

  1. Path: mirror!adelie!necntc!husc6!seismo!munnari!sources-request
  2. From: sources-request@munnari.oz
  3. Newsgroups: mod.sources
  4. Subject: v08i084:  Multivol, Patch #1 (see Vol 7, Issues 12 & 13)
  5. Message-ID: <1434@munnari.oz>
  6. Date: 28 Feb 87 08:34:10 GMT
  7. Sender: kre@munnari.oz
  8. Lines: 65
  9. Approved: kre@munnari.oz.au
  10.  
  11. Submitted by: "Tony O'Hagan" <tony@uqcspe.oz.au>
  12. Mod.sources: Volume 8, Issue 84
  13. Archive-name: multivol.pch
  14.  
  15.     [ You may detect from reading this message that its been in the
  16.       queue for some time.  It has.  Sorry about that, there were
  17.       several causes, not worth going into here.
  18.  
  19.       The diff as sent to me culdn't be applied by patch, for reasons
  20.       I couldn't be bothered finding out.  It was easier to apply the
  21.       patch manually, and then make a new diff for this posting.  .. kre ]
  22.  
  23. System: multivol
  24. Patch #: 1
  25. Priority: HIGH
  26. Subject: Crucial fix, without this, multivol output can be garbage
  27. From: "Tony O'Hagan" <tony@uqcspe.oz.au>
  28.  
  29. Description:
  30.   You may have read a note in comp.unix.wizards from a multivol user
  31.   mentioning a small fix to wr.c, I asked him for the diff which follows.
  32.   It's the sort of bug that would make any existing multivol output prone to
  33.   error. (i.e. don't trust it)   Thanks to seismo!uwvax!prairie!dan .
  34.  
  35.     Merry Christmas,
  36.     Tony O'Hagan            tony@uqcspe.oz
  37.   ==============================================================================
  38.   Tony O'Hagan        Australia: (07) 3774125  International: +61 7 3774125
  39.   University of Queensland    CSNET:    tony@uqcspe.oz    ACSnet:    tony@uqcspe.oz
  40.   Dept. of Computer Science    UUCP:    ...!seismo!munnari!uqcspe.oz!tony
  41.   St. Lucia, Brisbane,         ARPA:    tony%uqcspe.oz@seismo.css.gov
  42.   AUSTRALIA  4067             JANET:    uqcspe.oz!tony@ukc
  43.   ==============================================================================
  44.  
  45. Index: wr.c
  46. *** /tmp/,RCSt1025278    Thu Dec 18 13:36:32 1986
  47. --- wr.c    Thu Dec 18 13:28:12 1986
  48. ***************
  49. *** 151,159
  50.           blk_len = blk_siz;    /* write at most blk_siz chars */
  51.   
  52.       bhd_ptr = (blk_hdr *) blk_ptr;
  53.   
  54. !     sprintf(len_str, "%6ld", blk_len);
  55.       strncpy(bhd_ptr->bh_dtalen, len_str, BSZDIG);
  56.   
  57.       if (blk_len < blk_siz) {
  58.           /* move nulls to end of last block of last volume */
  59.  
  60. --- 151,165 -----
  61.           blk_len = blk_siz;    /* write at most blk_siz chars */
  62.   
  63.       bhd_ptr = (blk_hdr *) blk_ptr;
  64.   
  65. !     /* From: seismo!uwvax!prairie!dan            */
  66. !     /* The following was changed by dmf.  The block length    */
  67. !     /* was originally right-justified in the field, and if    */
  68. !     /* it was follwed by a numeric character, the sscanf in    */
  69. !     /* the read block code happily kept reading, leading to    */
  70. !     /* odd block sizes.  This should fix that.        */
  71. !       sprintf(len_str, "%-6ld", blk_len);
  72.       strncpy(bhd_ptr->bh_dtalen, len_str, BSZDIG);
  73.   
  74.       if (blk_len < blk_siz) {
  75.           /* move nulls to end of last block of last volume */
  76.