Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

minor awk script problem



In two places Src/signames.awk tries to printf a hash using a %c.  It
ends up printing nothing for the hash on AIX 3.2 (3.2.5?).  (I.e.,
"#else" ends up coming out as "else", which causes compiler problems
in builtin.c.)  Changing the %c to %s seems to work on all platforms.
The following diff was run on beta19.

*** signames.awk.old	Fri Jun  7 12:34:50 1996
--- signames.awk	Fri Jun  7 12:34:50 1996
***************
*** 54,60 ****
  END {
      hash = "#"
      ps = "%s"
!     ifdstr = sprintf("#ifdef USE_SUSPENDED\n\t%csuspended%s%c,\n%celse\n\t%cstopped%s%c,\n#endif\n", 034, ps, 034, hash, 034, ps, 034)
  
      printf("%s\n%s\n\n%s\t%d\n\n%s\n\n%s\n\t%c%s%c,\n", "/** signals.h                                 **/", "/** architecture-customized signals.h for zsh **/", "#define SIGCOUNT", max, "#ifdef GLOBALS", "char *sigmsg[SIGCOUNT+2] = {", 034, "done", 034)
  
--- 54,60 ----
  END {
      hash = "#"
      ps = "%s"
!     ifdstr = sprintf("#ifdef USE_SUSPENDED\n\t%csuspended%s%c,\n%selse\n\t%cstopped%s%c,\n#endif\n", 034, ps, 034, hash, 034, ps, 034)
  
      printf("%s\n%s\n\n%s\t%d\n\n%s\n\n%s\n\t%c%s%c,\n", "/** signals.h                                 **/", "/** architecture-customized signals.h for zsh **/", "#define SIGCOUNT", max, "#ifdef GLOBALS", "char *sigmsg[SIGCOUNT+2] = {", 034, "done", 034)
  
***************
*** 89,95 ****
      print "\tNULL"
      print "};"
      print ""
!     printf("%celse\n", hash)
      print "extern char *sigs[SIGCOUNT+4],*sigmsg[SIGCOUNT+2];"
      print "#endif"
  }
--- 89,95 ----
      print "\tNULL"
      print "};"
      print ""
!     printf("%selse\n", hash)
      print "extern char *sigs[SIGCOUNT+4],*sigmsg[SIGCOUNT+2];"
      print "#endif"
  }
-- 
J.D. Laub (Laubster) HBOC/CliniCom|"I think you're very, very, very, very, very,
jdl@xxxxxxxxxxxx     Boulder,CO   |very, very, very, very, ..." - Flying Lizards




Messages sorted by: Reverse Date, Date, Thread, Author