home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1215 < prev    next >
Internet Message Format  |  1990-12-28  |  2KB

  1. From: wht@n4hgf.uucp (Warren Tucker)
  2. Newsgroups: alt.sources
  3. Subject: shar321/patch01
  4. Message-ID: <675@n4hgf.uucp>
  5. Date: 20 Apr 90 18:03:21 GMT
  6. X-Checksum-Snefru: 85afc38f 85d5494f 52b883c4 bb566d68
  7.  
  8. This ought to do it for a while.  I'm sure the net has more
  9. interesting things to do than belabor this.  I got 31 requests
  10. for shar, which is the largest amount of mail I've ever received
  11. on a single subject.  So, if you are interested in shars, e-mail me
  12. and I'll managle/manage a mailing list.
  13.  
  14. >Subject: bug in shar321
  15. >Date: Fri, 20 Apr 90 10:29:40 -0100
  16. >From: Colas Nahaboo <gatech!mailrus!uunet!avahi.inria.fr!colas>
  17. >Status: ORS
  18. >
  19. >unshar need to check if the file argument is not an absolute path: otherwise,
  20. >when saying, in directory /foo: "unshar /bar/gee.shar", it will try to open the
  21. >file /foo/bar/gee.shar
  22. >
  23. >This patch corrects it.
  24.  
  25. avahi$ diff -c unshar.c.orig unshar.c
  26. *** unshar.c.orig       Fri Apr 20 09:23:10 1990
  27. --- unshar.c    Fri Apr 20 09:25:07 1990
  28. ***************
  29. *** 117,125
  30.       {
  31.           for(i= optind; i < argc; ++i)
  32.           {
  33. !             strcpy(s1024,argvdir);
  34. !             strcat(s1024,"/");
  35. !             strcat(s1024,argv[i]);
  36.               if(!(in = fopen(s1024,"r")))
  37.               {
  38.                   perror(s1024);
  39.  
  40. --- 117,129 -----
  41.       {
  42.           for(i= optind; i < argc; ++i)
  43.           {
  44. !             if(argv[i][0] = '/') {
  45. !                 strcpy(s1024,argv[i]);
  46. !             } else {
  47. !                 strcpy(s1024,argvdir);
  48. !                 strcat(s1024,"/");
  49. !                 strcat(s1024,argv[i]);
  50. !             }
  51.               if(!(in = fopen(s1024,"r")))
  52.               {
  53.                   perror(s1024);
  54.  
  55. Colas Nahaboo, BULL Research FRANCE -- Koala Project -- GWM X11 Window Manager
  56. colas@mirsa.inria.fr            Phone: (33) 93.65.77.70, Fax: (33) 93 65 77 66
  57. INRIA - Sophia Antipolis, 2004, rte des Lucioles, 06565 Valbonne Cedex, FRANCE
  58.  
  59. ------------------------------------------------------------------
  60. Warren Tucker, TuckerWare gatech!n4hgf!wht or wht%n4hgf@gatech.edu
  61. McCarthyism did to cinema what ANSI did to C,  cast a great number
  62. of characters into the void.
  63.