patch-src_toast_c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. $Id$
  2. --- gsm-1.0-pl10.orig/src/toast.c Tue Jul 2 16:32:55 1996
  3. +++ gsm-1.0-pl10/src/toast.c Sat Jan 20 13:06:50 2007
  4. @@ -251,8 +251,8 @@ static char * emalloc P1((len), size_t l
  5. {
  6. char * s;
  7. if (!(s = malloc(len))) {
  8. - fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n",
  9. - progname, len);
  10. + fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n",
  11. + progname, (long) len);
  12. onintr();
  13. exit(1);
  14. }
  15. @@ -270,7 +270,7 @@ static char* normalname P3((name, want,
  16. maxlen = strlen(name) + 1 + strlen(want) + strlen(cut);
  17. p = strcpy(emalloc(maxlen), name);
  18. - if (s = suffix(p, cut)) strcpy(s, want);
  19. + if ((s = suffix(p, cut))) strcpy(s, want);
  20. else if (*want && !suffix(p, want)) strcat(p, want);
  21. return p;
  22. @@ -386,7 +386,7 @@ static void update_times P0()
  23. ut[0] = instat.st_atime;
  24. ut[1] = instat.st_mtime;
  25. - (void) utime(outname, ut);
  26. + (void) utime(outname, (struct utimbuf *)ut);
  27. #endif /* UTIMBUF */
  28. }
  29. @@ -416,7 +416,7 @@ static int okay_as_input P3((name,f,st),
  30. }
  31. if (st->st_nlink > 1 && !f_cat && !f_precious) {
  32. fprintf(stderr,
  33. - "%s: \"%s\" has %s other link%s -- unchanged.\n",
  34. + "%s: \"%s\" has %d other link%s -- unchanged.\n",
  35. progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2));
  36. return 0;
  37. }
  38. @@ -585,8 +585,8 @@ static int process_decode P0()
  39. if (cc != sizeof(s)) {
  40. if (cc >= 0) fprintf(stderr,
  41. - "%s: incomplete frame (%d byte%s missing) from %s\n",
  42. - progname, sizeof(s) - cc,
  43. + "%s: incomplete frame (%ld byte%s missing) from %s\n",
  44. + progname, (long) sizeof(s) - cc,
  45. "s" + (sizeof(s) - cc == 1),
  46. inname ? inname : "stdin" );
  47. gsm_destroy(r);
  48. @@ -624,8 +624,6 @@ static int process_decode P0()
  49. static int process P1((name), char * name)
  50. {
  51. - int step = 0;
  52. -
  53. out = (FILE *)0;
  54. in = (FILE *)0;
  55. @@ -779,7 +777,6 @@ int main P2((ac, av), int ac, char **av)
  56. case 'h': help(); exit(0);
  57. default:
  58. - usage:
  59. fprintf(stderr,
  60. "Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
  61. progname);