home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume34 / cproto / patch06 < prev    next >
Encoding:
Text File  |  1992-12-06  |  6.2 KB  |  184 lines

  1. Newsgroups: comp.sources.misc
  2. From: cthuang@zerosan.canrem.COM (Chin Huang)
  3. Subject:  v34i005:  cproto - generate C function prototypes v3, Patch06
  4. Message-ID: <1992Dec6.041734.25150@sparky.imd.sterling.com>
  5. X-Md4-Signature: 582498f3135010ce03099c4187dd8fd2
  6. Date: Sun, 6 Dec 1992 04:17:34 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: cthuang@zerosan.canrem.COM (Chin Huang)
  10. Posting-number: Volume 34, Issue 5
  11. Archive-name: cproto/patch06
  12. Environment: UNIX, MS-DOS, getopt, lex, yacc
  13. Patch-To: cproto: Volume 29, Issue 61-62
  14.  
  15. This patch brings cproto to version 3 patchlevel 6.  This patch fixes a
  16. portability problem that prevented it from being compiled with pre-ANSI
  17. C compilers.  Thanks to Pat Myrto <ole!rwing!pat@nwnexus.wa.com> for
  18. reporting this bug.
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of shell archive."
  27. # Contents:  patch6
  28. # Wrapped by cthuang@zerosan.UUCP on Tue Dec 01 21:08:19 1992
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f patch6 -a "${1}" != "-c" ; then 
  31.   echo shar: Will not over-write existing file \"patch6\"
  32. else
  33. echo shar: Extracting \"patch6\" \(4483 characters\)
  34. sed "s/^X//" >patch6 <<'END_OF_patch6'
  35. Xdiff  -c old/CHANGES new/CHANGES
  36. X*** old/CHANGES    Sat Nov 28 23:18:24 1992
  37. X--- new/CHANGES    Tue Dec 01 21:03:42 1992
  38. X***************
  39. X*** 1,16 ****
  40. X  Version 3
  41. X  
  42. X  Patchlevel 5
  43. X  
  44. X  - Fix: The -v option did not output declarations for function pointers.
  45. X  - Fix: String literals continued over more than one line messed up the
  46. X    line number count.
  47. X! - Fix: The program generated incorrect prototypes for functions that take
  48. X!   a variable argument list using <varargs.h>.
  49. X! - Fix: When converting functions from the standard input, cproto generated
  50. X!   no output if no functions needed to be converted.
  51. X  - Fix: Now does not output a warning if an untagged struct is found in a
  52. X    typedef declaration.
  53. X  - Added the -b option which rewrites function definition heads to
  54. X    include both old style and new style declarations separated by a
  55. X    conditional compilation directive.  For example, the program can
  56. X--- 1,27 ----
  57. X  Version 3
  58. X  
  59. X+ Patchlevel 6
  60. X+ 
  61. X+ - Fix: A function in lex.l exploited the ANSI C feature of concatenating
  62. X+   string literals.  This prevented the module from being compiled with
  63. X+   pre-ANSI C compilers.
  64. X+ 
  65. X  Patchlevel 5
  66. X  
  67. X  - Fix: The -v option did not output declarations for function pointers.
  68. X+ 
  69. X  - Fix: String literals continued over more than one line messed up the
  70. X    line number count.
  71. X! 
  72. X! - Fix: The program generated incorrect prototypes for functions that
  73. X!   take a variable argument list using <varargs.h>.
  74. X! 
  75. X! - Fix: When converting functions from the standard input, cproto
  76. X!   generated no output if no functions needed to be converted.
  77. X! 
  78. X  - Fix: Now does not output a warning if an untagged struct is found in a
  79. X    typedef declaration.
  80. X+ 
  81. X  - Added the -b option which rewrites function definition heads to
  82. X    include both old style and new style declarations separated by a
  83. X    conditional compilation directive.  For example, the program can
  84. X***************
  85. X*** 30,43 ****
  86. X      {
  87. X      }
  88. X  
  89. X!   Added the -B option to set the preprocessor directive that appears
  90. X!   at the beginning of such definitions.
  91. X! - Added the keyword "interrupt" to the set of type qualifiers when compiled
  92. X!   on a UNIX system.
  93. X  - The MS-DOS version now recognizes the type modifiers introduced by
  94. X    Microsoft C/C++ 7.00.
  95. X  - Now recognizes ANSI C trigraphs (yuck!).
  96. X  - Now use "#if __STDC__" instead of "#if defined(__STDC__)".
  97. X  - GNU bison orders the y.tab.c sections differently than yacc, which
  98. X    resulted in references to variables before they were declared.  The
  99. X    grammar specification was modified to also be compatible with bison.
  100. X--- 41,59 ----
  101. X      {
  102. X      }
  103. X  
  104. X!   Added the -B option to set the preprocessor directive that appears at
  105. X!   the beginning of such definitions.
  106. X! 
  107. X! - Added the keyword "interrupt" to the set of type qualifiers when
  108. X!   compiled on a UNIX system.
  109. X! 
  110. X  - The MS-DOS version now recognizes the type modifiers introduced by
  111. X    Microsoft C/C++ 7.00.
  112. X+ 
  113. X  - Now recognizes ANSI C trigraphs (yuck!).
  114. X+ 
  115. X  - Now use "#if __STDC__" instead of "#if defined(__STDC__)".
  116. X+ 
  117. X  - GNU bison orders the y.tab.c sections differently than yacc, which
  118. X    resulted in references to variables before they were declared.  The
  119. X    grammar specification was modified to also be compatible with bison.
  120. Xdiff  -c old/lex.l new/lex.l
  121. X*** old/lex.l    Sat Nov 28 23:54:16 1992
  122. X--- new/lex.l    Tue Dec 01 21:04:42 1992
  123. X***************
  124. X*** 1,5 ****
  125. X  %{
  126. X! /* $Id: lex.l 3.8 1992/11/29 04:54:14 cthuang Exp $
  127. X   *
  128. X   * Lexical analyzer for C function prototype generator
  129. X   */
  130. X--- 1,5 ----
  131. X  %{
  132. X! /* $Id: lex.l 3.9 1992/12/02 02:04:35 cthuang Exp $
  133. X   *
  134. X   * Lexical analyzer for C function prototype generator
  135. X   */
  136. X***************
  137. X*** 294,299 ****
  138. X--- 294,300 ----
  139. X  static void
  140. X  get_cpp_directive ()
  141. X  {
  142. X+     static char cont_trigraph[] = { '?', '?', '/', '\0' };
  143. X      char c, lastc[4];
  144. X      
  145. X      lastc[0] = lastc[1] = lastc[2] = lastc[3] = '\0';
  146. X***************
  147. X*** 304,310 ****
  148. X      switch (c) {
  149. X      case '\n':
  150. X          cur_file->line_num++;
  151. X!         if (lastc[2] != '\\' && strcmp(lastc, "??""/") != 0) {
  152. X          BEGIN INITIAL;
  153. X          return;
  154. X          }
  155. X--- 305,311 ----
  156. X      switch (c) {
  157. X      case '\n':
  158. X          cur_file->line_num++;
  159. X!         if (lastc[2] != '\\' && strcmp(lastc, cont_trigraph) != 0) {
  160. X          BEGIN INITIAL;
  161. X          return;
  162. X          }
  163. Xdiff  -c old/patchlev.h new/patchlev.h
  164. X*** old/patchlev.h    Fri Jun 26 08:27:12 1992
  165. X--- new/patchlev.h    Tue Dec 01 09:52:28 1992
  166. X***************
  167. X*** 1 ****
  168. X! #define PATCHLEVEL 5
  169. X--- 1 ----
  170. X! #define PATCHLEVEL 6
  171. END_OF_patch6
  172. if test 4483 -ne `wc -c <patch6`; then
  173.     echo shar: \"patch6\" unpacked with wrong size!
  174. fi
  175. # end of overwriting check
  176. fi
  177. echo shar: End of shell archive.
  178. exit 0
  179.  
  180. -- 
  181. Chin Huang  cthuang%zerosan@canrem.com  chin.huang@canrem.com
  182.  
  183. exit 0 # Just in case...
  184.