home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / dev / c / cweb / ctangle.ch < prev    next >
Encoding:
Text File  |  1994-08-12  |  39.3 KB  |  1,207 lines

  1.                                 -*-Web-*-
  2. This file, CTANGLE.CH, is part of CWEB.
  3. It is a changefile for CTANGLE.W, Version 3.2.
  4.  
  5. Authors and Contributors:
  6. (H2B) Hans-Hermann Bode, Universität Osnabrück,
  7.   (hhbode@@dosuni1.rz.uni-osnabrueck.de or HHBODE@@DOSUNI1.BITNET).
  8.  
  9. (KG) Klaus Guntermann, TH Darmstadt,
  10.   (guntermann@@iti.informatik.th-darmstadt.de).
  11.  
  12. (AS) Andreas Scherer,
  13.   Abt-Wolf-Straße 17, 96215 Lichtenfels, Germany.
  14.  
  15. (CS) Carsten Steger, Universität München,
  16.   (carsten.steger@@informatik.tu-muenchen.de)
  17.  
  18. (TW) Tomas Willis
  19.   (tomas@@cae.wisc.edu)
  20.  
  21. Caveat utilitor:  Some of the source code introduced by this change file is
  22. made conditional to the use of specific compilers on specific systems.
  23. This applies to places marked with `#ifdef __TURBOC__' and `#ifdef _AMIGA'.
  24.  
  25. This program is distributed WITHOUT ANY WARRANTY, express or implied.
  26.  
  27. The following copyright notice extends to this changefile only, not to
  28. the masterfile CTANGLE.W.
  29.  
  30. Copyright (C) 1993,1994 Andreas Scherer
  31. Copyright (C) 1991-1993 Hans-Hermann Bode
  32.  
  33. Permission is granted to make and distribute verbatim copies of this
  34. document provided that the copyright notice and this permission notice
  35. are preserved on all copies.
  36.  
  37. Permission is granted to copy and distribute modified versions of this
  38. document under the conditions for verbatim copying, provided that the
  39. entire resulting derived work is given a different name and distributed
  40. under the terms of a permission notice identical to this one.
  41.  
  42. Version history:
  43.  
  44. Version    Date        Author    Comment
  45. a1/t1    10 Oct 1991    H2B    First attempt for CTANGLE.W 2.0.
  46. p2    13 Feb 1992    H2B    Updated for CTANGLE.W 2.2, ANSI and Turbo
  47.                 changefiles merged together.
  48. p3    16 Apr 1992    H2B    Updated for CTANGLE.W 2.4.
  49. p4    21 Jun 1992    H2B    Nothing changed.
  50. p5    18 Jul 1992    H2B    Extensions for C++ implemented.
  51. p5a    24 Jul 1992    KG    adaptions for other ANSI C compiler
  52. p5b    28 Jul 1992    H2B    Remaining headers converted to ANSI style.
  53. p6    06 Sep 1992    H2B    Updated for CTANGLE.W 2.7, |dot_dot_dot|
  54.                 added, parsing of @@'\'' fixed (due to KG),
  55.                 @@<Copy an ASCII constant@@> extended,
  56.                 (nonfatal) confusion in processing short
  57.                 comments fixed.
  58. p6a     15 Mar 1993     AS      Re-changing some of the TC stuff to SAS/C
  59. p6b     27 Jul 1993     AS      new patch level in accordance with CWeave
  60. p6c    04 Sep 1993    AS    new patch level in accordance with Common
  61. p6d    09 Oct 1993    AS    Updated for CTANGLE.W 2.8. (This was p7)
  62. p7    13 Nov 1992    H2B    Converted to master change file, updated for
  63.                 CTANGLE.W 2.8. [Not released.]
  64. p7.5    29 Nov 1992    H2B    Updated for CTANGLE.W 2.9beta. [Not released.]
  65. p8    08 Dec 1992    H2B    Updated for CTANGLE.W 2.9++ (stuff went into
  66.                 the source file), ANSI bug in <Get a constant>
  67.                 fixed. [Not released.]
  68. p8a    10 Mar 1993    H2B    Restructured for public release.
  69.                 [Not released.]
  70. p8b    14 Apr 1993    H2B    Updated for CTANGLE.W 3.0beta. [Not released.]
  71. p8c    21 Jun 1993    H2B    Updated for final CTANGLE.W 3.0.
  72. p8d    25 Oct 1993    AS    Incorporated into Amiga version 2.8 [p7] and
  73.                 updated for version 3.0.
  74. p8e    04 Nov 1993    AS    New patch level in accordance with COMMON.
  75. p9    18 Nov 1993    AS    Updated for CTANGLE.W 3.1.
  76. p9a    30 Nov 1993    AS    Minor changes and corrections.
  77. p9b    06 Dec 1993    AS    Multilinguality implemented.
  78. p9c    18 Jan 1994    AS    Version information included.
  79. p9d    13 May 1994    AS    Dynamic memory allocation.
  80.     02 Jul 1994    AS    Portability version.
  81. p10    12 Aug 1994    AS    Updated for CTANGLE.W 3.2. 
  82. ------------------------------------------------------------------------------
  83. @x l.1
  84. % This file is part of CWEB.
  85. % This program by Silvio Levy and Donald E. Knuth
  86. % is based on a program by Knuth.
  87. % It is distributed WITHOUT ANY WARRANTY, express or implied.
  88. % Version 3.2 --- July 1994
  89.  
  90. % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
  91. @y
  92. % This file, CTANGLE.W, is part of CWEB.
  93. % This program by Silvio Levy and Donald E. Knuth
  94. % is based on a program by Knuth.
  95. % It is distributed WITHOUT ANY WARRANTY, express or implied.
  96. % Version 2.4 --- Don Knuth, April 1992
  97. % Version 2.4 [p5] --- Hans-Hermann Bode, July 1992
  98. % Version 2.4 [p5a] --- Klaus Guntermann, July 1992
  99. % Version 2.4 [p5b] --- Hans-Hermann Bode, July 1992
  100. % Version 2.7 --- Don Knuth, July 1992
  101. % Version 2.7 [p6] --- Hans-Hermann Bode, September 1992
  102. % Version 2.7 [p6a] --- Andreas Scherer, March 1993
  103. % Version 2.7 [p6b] --- Andreas Scherer, July 1993
  104. % Version 2.7 [p6c] --- Andreas Scherer, September 1993
  105. % Version 2.8 --- Don Knuth, September 1992
  106. % Version 2.8 [p7] --- Andreas Scherer, October 1993
  107. % Version 3.0 --- Don Knuth, June 1993
  108. % Version 3.0 [p8c] --- Hans-Hermann Bode, June 1993
  109. % Version 3.0 [p8d] --- Andreas Scherer, October 1993
  110. % Version 3.0 [p8e] --- Andreas Scherer, November 1993
  111. % Version 3.1 --- Don Knuth, November 1993
  112. % Version 3.1 [p9] --- Andreas Scherer, November 1993
  113. % Version 3.1 [p9a] --- Andreas Scherer, November 1993
  114. % Version 3.1 [p9b] --- Andreas Scherer, December 1993
  115. % Version 3.1 [p9c] --- Andreas Scherer, January 1994
  116. % Version 3.1 [p9d] --- Andreas Scherer, July 1994
  117. % Version 3.2 --- Don Knuth, July 1994
  118. % Version 3.2 [p10] --- Andreas Scherer, August 1994
  119.  
  120. % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
  121. % Copyright (C) 1991-1993 Hans-Hermann Bode
  122. % Copyright (C) 1993,1994 Andreas Scherer
  123. @z
  124. ------------------------------------------------------------------------------
  125. @x l.25
  126. \def\title{CTANGLE (Version 3.2)}
  127. @y
  128. \def\title{CTANGLE (Version 3.2 [p10])}
  129. @z
  130. ------------------------------------------------------------------------------
  131. @x l.29
  132.   \centerline{(Version 3.2)}
  133. @y
  134.   \centerline{(Version 3.2 [p10])}
  135. @z
  136. ------------------------------------------------------------------------------
  137. @x l.33
  138. Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth
  139. @y
  140. Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth
  141. \smallskip\noindent
  142. Copyright \copyright\ 1991--1993 Hans-Hermann Bode
  143. \smallskip\noindent
  144. Copyright \copyright\ 1993, 1994 Andreas Scherer
  145. @z
  146. ------------------------------------------------------------------------------
  147. Activate this, if only the changed modules should be printed.
  148. x l.46
  149. \let\maybe=\iftrue
  150. y
  151. \let\maybe=\iffalse
  152. z
  153. ------------------------------------------------------------------------------
  154. TRANSLATION
  155. @x l.59
  156. @d banner "This is CTANGLE (Version 3.2)\n"
  157. @y
  158. @d banner get_string(MSG_BANNER_CT1)
  159. @z
  160. ------------------------------------------------------------------------------
  161. ANSI
  162. @x l.69
  163. @ We predeclare several standard system functions here instead of including
  164. their system header files, because the names of the header files are not as
  165. standard as the names of the functions. (For example, some \CEE/ environments
  166. have \.{<string.h>} where others have \.{<strings.h>}.)
  167.  
  168. @<Predecl...@>=
  169. extern int strlen(); /* length of string */
  170. extern int strcmp(); /* compare strings lexicographically */
  171. extern char* strcpy(); /* copy one string to another */
  172. extern int strncmp(); /* compare up to $n$ string characters */
  173. extern char* strncpy(); /* copy up to $n$ string characters */
  174. @y
  175. @ For string handling we include the {\mc ANSI C} system header file instead
  176. of predeclaring the standard system functions |strlen|, |strcmp|, |strcpy|,
  177. |strncmp|, and |strncpy|.
  178. @^system dependencies@>
  179.  
  180. @<Include files@>=
  181. #include <string.h>
  182. @z
  183. ------------------------------------------------------------------------------
  184. ANSI
  185. @x l.89
  186. int main (ac, av)
  187. int ac;
  188. char **av;
  189. @y
  190. int main (int ac, char **av)
  191. @z
  192. ------------------------------------------------------------------------------
  193. MEMORY ALLOCATION
  194. @x l.95
  195.   @<Set initial values@>;
  196.   common_init();
  197. @y
  198.   common_init();
  199.   @<Set initial values@>;
  200. @z
  201. ==============================================================================
  202. The following changes will effect `common.h', so the line numbers refer
  203. to a different source file!
  204. ------------------------------------------------------------------------------
  205. PORTABILITY
  206. @x l.24
  207. First comes general stuff:
  208.  
  209. @y
  210. First comes general stuff.
  211. In {\mc TURBO} \CEE/, we use |huge| pointers instead of large arrays.
  212. @^system dependencies@>
  213.  
  214. @f far int
  215. @f huge int
  216. @f HUGE int
  217. @#
  218. @z
  219. ------------------------------------------------------------------------------
  220. PORTABILITY, SYSTEM DEPENDENCIES
  221. @x l.33
  222. extern int phase; /* which phase are we in? */
  223. @y
  224. extern int phase; /* which phase are we in? */
  225. @#
  226. #ifdef __TURBOC__
  227. #define HUGE huge
  228. #else
  229. #define HUGE
  230. #endif
  231. @^system dependencies@>
  232. @z
  233. ------------------------------------------------------------------------------
  234. PORTABILITY, SYSTEM DEPENDENCIES, TRANSLATION
  235. @x l.35
  236. @ @<Include files@>=
  237. #include <stdio.h>
  238. @y
  239. @ Version~2.1 of the {\mc AMIGA} operating system introduced localization
  240. of programs and applications by means of ``language catalogs'' that contain
  241. replacement strings for terminal texts produced by suitably prepared programs.
  242. The complete \.{CWEB} system has been modified to accommodate this great idea
  243. and so the \.{cweb.h} header file with the original English strings is
  244. included in this section.  Other systems than the {\mc AMIGA} will have to do
  245. the language conversion by different means, so a little bit of care is to be
  246. taken with what follows.
  247. @^system dependencies@>
  248.  
  249. @f type int /* Aus \.{type} wird der Pseudotyp \&{type} */
  250. @#
  251. @d alloc_object(object,size,@!type)
  252.    if(!(object = (type *)calloc(size,sizeof(type))))
  253.       fatal("",get_string(MSG_FATAL_CO85));
  254.  
  255. @<Include files@>=
  256. #include <stdio.h>
  257. @#
  258. #ifdef __TURBOC__
  259. #include <io.h>
  260. #endif
  261. @#
  262. #ifndef _AMIGA /* non-{\mc AMIGA} systems don't know about \.{<exec/types.h>} */
  263. typedef long int LONG; /* excerpt from \.{<exec/types.h>} */
  264. typedef char * STRPTR; /* ditto, but \UNIX/ says it's signed. */
  265. #define EXEC_TYPES_H 1 /* don't include \.{<exec/types.h>} in \.{"cweb.h"} */
  266. #endif
  267. @#
  268. #ifdef STRINGARRAY
  269. #undef STRINGARRAY /* don't include the string array |AppStrings| again */
  270. #endif
  271. #define get_string(n) AppStrings[n].as_Str
  272. @#
  273. #include "cweb.h"
  274. @#
  275. struct AppString
  276. {
  277.    LONG   as_ID;
  278.    STRPTR as_Str;
  279. };
  280. @#
  281. extern struct AppString AppStrings[];
  282. @z
  283. ------------------------------------------------------------------------------
  284. MEMORY ALLOCATION
  285. @x l.58
  286. char section_text[longest_name+1]; /* name being sought for */
  287. char *section_text_end = section_text+longest_name; /* end of |section_text| */
  288. @y
  289. char *section_text; /* name being sought for */
  290. char *section_text_end; /* end of |section_text| */
  291. @z
  292. ------------------------------------------------------------------------------
  293. MEMORY ALLOCATION
  294. @x l.73
  295. extern char buffer[]; /* where each line of input goes */
  296. @y
  297. extern char *buffer; /* where each line of input goes */
  298. @z
  299. ------------------------------------------------------------------------------
  300. ANSI
  301. @x l.79
  302. @d length(c) (c+1)->byte_start-(c)->byte_start /* the length of a name */
  303. @y
  304. @d length(c) (size_t)((c+1)->byte_start-(c)->byte_start) /* the length of a name */
  305. @z
  306. ------------------------------------------------------------------------------
  307. PORTABILITY, SYSTEM DEPENDENCIES, MEMORY ALLOCATION
  308. @x l.88
  309. typedef struct name_info {
  310.   char *byte_start; /* beginning of the name in |byte_mem| */
  311.   struct name_info *link;
  312.   union {
  313.     struct name_info *Rlink; /* right link in binary search tree for section
  314.       names */
  315.     char Ilk; /* used by identifiers in \.{CWEAVE} only */
  316.   } dummy;
  317.   char *equiv_or_xref; /* info corresponding to names */
  318. } name_info; /* contains information about an identifier or section name */
  319. typedef name_info *name_pointer; /* pointer into array of \&{name\_info}s */
  320. typedef name_pointer *hash_pointer;
  321. extern char byte_mem[]; /* characters of names */
  322. extern char *byte_mem_end; /* end of |byte_mem| */
  323. extern name_info name_dir[]; /* information about names */
  324. extern name_pointer name_dir_end; /* end of |name_dir| */
  325. extern name_pointer name_ptr; /* first unused position in |byte_start| */
  326. extern char *byte_ptr; /* first unused position in |byte_mem| */
  327. @y
  328. typedef struct name_info {
  329.   char HUGE *byte_start; /* beginning of the name in |byte_mem| */
  330.   struct name_info HUGE *link;
  331.   union {
  332.     struct name_info HUGE *Rlink; /* right link in binary search tree for section
  333.       names */  
  334.     char Ilk; /* used by identifiers in \.{WEAVE} only */
  335.   } dummy;
  336.   void HUGE *equiv_or_xref; /* info corresponding to names */
  337. } name_info; /* contains information about an identifier or section name */
  338. typedef name_info HUGE *name_pointer; /* pointer into array of |name_info|s */
  339. typedef name_pointer *hash_pointer;
  340. extern char HUGE *byte_mem; /* characters of names */
  341. extern name_info HUGE *name_dir; /* information about names */
  342. extern char HUGE *byte_mem_end; /* end of |byte_mem| */
  343. extern name_pointer name_dir_end; /* end of |name_dir| */
  344. extern name_pointer name_ptr; /* first unused position in |byte_start| */
  345. extern char HUGE *byte_ptr; /* first unused position in |byte_mem| */
  346. #ifdef __TURBOC__
  347. void far *allocsafe(unsigned long nunits,unsigned long unitsz);
  348. #endif
  349. @^system dependencies@>
  350. @z
  351. ------------------------------------------------------------------------------
  352. MEMORY ALLOCATION
  353. @x l.106
  354. extern name_pointer hash[]; /* heads of hash lists */
  355. @y
  356. extern name_pointer *hash; /* heads of hash lists */
  357. @z
  358. ------------------------------------------------------------------------------
  359. ANSI
  360. @x l.109
  361. extern name_pointer id_lookup(); /* looks up a string in the identifier table */
  362. extern name_pointer section_lookup(); /* finds section name */
  363. extern void print_section_name(), sprint_section_name();
  364. @y
  365. extern int names_match(name_pointer,char *,int,eight_bits);@/
  366. extern name_pointer id_lookup(char *,char *,char);
  367.    /* looks up a string in the identifier table */
  368. extern name_pointer prefix_lookup(char *,char *); /* finds section name given a prefix */
  369. extern name_pointer section_lookup(char *,char *,int);@/
  370. extern void init_node(name_pointer);@/
  371. extern void init_p(name_pointer,eight_bits);@/
  372. extern void print_prefix_name(name_pointer);@/
  373. extern void print_section_name(name_pointer);@/
  374. extern void sprint_section_name(char *,name_pointer);@/
  375. @z
  376. ------------------------------------------------------------------------------
  377. ANSI, TRANSLATION
  378. @x l.117
  379. @d fatal_message 3 /* |history| value when we had to stop prematurely */
  380. @d mark_harmless {if (history==spotless) history=harmless_message;}
  381. @d mark_error history=error_message
  382. @d confusion(s) fatal("! This can't happen: ",s)
  383.  
  384. @<Common...@>=
  385. extern history; /* indicates how bad this run was */
  386. extern err_print(); /* print error message and context */
  387. extern wrap_up(); /* indicate |history| and exit */
  388. extern void fatal(); /* issue error message and die */
  389. extern void overflow(); /* succumb because a table has overflowed */
  390. @y
  391. @d fatal_message 3 /* |history| value when we had to stop prematurely */
  392. @d mark_harmless {if (history==spotless) history=harmless_message;}
  393. @d mark_error history=error_message
  394. @d confusion(s) fatal(get_string(MSG_FATAL_CO66),s)
  395.  
  396. @<Common...@>=
  397. extern history; /* indicates how bad this run was */
  398. extern int wrap_up(void); /* indicate |history| and exit */
  399. extern void err_print(char *); /* prints error message and context */
  400. extern void fatal(char *,char *); /* issue error message and die */
  401. extern void overflow(char *); /* succumb because a table has overflowed */
  402. @z
  403. ------------------------------------------------------------------------------
  404. PORTABILITY
  405. @x l.131
  406. @d max_file_name_length 60
  407. @y
  408. @d max_file_name_length 256
  409. @z
  410. ------------------------------------------------------------------------------
  411. MEMORY ALLOCATION
  412. @x l.139
  413. extern FILE *file[]; /* stack of non-change files */
  414. extern FILE *change_file; /* change file */
  415. extern char C_file_name[]; /* name of |C_file| */
  416. extern char tex_file_name[]; /* name of |tex_file| */
  417. extern char idx_file_name[]; /* name of |idx_file| */
  418. extern char scn_file_name[]; /* name of |scn_file| */
  419. extern char file_name[][max_file_name_length];
  420.   /* stack of non-change file names */
  421. extern char change_file_name[]; /* name of change file */
  422. extern line[]; /* number of current line in the stacked files */
  423. @y
  424. extern FILE **file; /* stack of non-change files */
  425. extern FILE *change_file; /* change file */
  426. extern char *C_file_name; /* name of |C_file| */
  427. extern char *tex_file_name; /* name of |tex_file| */
  428. extern char *idx_file_name; /* name of |idx_file| */
  429. extern char *scn_file_name; /* name of |scn_file| */
  430. extern char **file_name; /* stack of non-change file names */
  431. extern char *change_file_name; /* name of change file */
  432. extern int *line; /* number of current line in the stacked files */
  433. @z
  434. ------------------------------------------------------------------------------
  435. ANSI
  436. @x l.153
  437. extern reset_input(); /* initialize to read the web file and change file */
  438. extern get_line(); /* inputs the next line */
  439. extern check_complete(); /* checks that all changes were picked up */
  440. @y
  441. extern boolean get_line(void); /* inputs the next line */
  442. extern void check_complete(void); /* checks that all changes were picked up */
  443. extern void reset_input(void); /* initialize to read the web file and change file */
  444. @z
  445. ------------------------------------------------------------------------------
  446. MEMORY ALLOCATION
  447. @x l.161
  448. extern boolean changed_section[]; /* is the section changed? */
  449. @y
  450. extern boolean *changed_section; /* is the section changed? */
  451. @z
  452. ------------------------------------------------------------------------------
  453. PORTABILITY
  454. @x l.165
  455. @ Code related to command line arguments:
  456. @d show_banner flags['b'] /* should the banner line be printed? */
  457. @d show_progress flags['p'] /* should progress reports be printed? */
  458. @d show_happiness flags['h'] /* should lack of errors be announced? */
  459. @y
  460. @ Code related to command line arguments:
  461. @d show_banner flags['b'] /* should the banner line be printed? */
  462. @d show_happiness flags['h'] /* should lack of errors be announced? */
  463. @d show_progress flags['p'] /* should progress reports be printed? */
  464. @d use_amiga_keywords flags['a'] /* should {\mc AMIGA/SAS C} keywords be used? */
  465. @d use_german_macros flags['g'] /* should the output be German? */
  466. @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
  467. @d order_decl_stmt flags['o'] /* should declarations and statements be separated? */
  468. @d send_error_messages flags['m'] /* should {\mc AREXX} communication be used? */
  469. @z
  470. ------------------------------------------------------------------------------
  471. @x l.173
  472. extern boolean flags[]; /* an option for each 7-bit code */
  473. @y
  474. extern boolean flags[]; /* an option for each 8-bit code */
  475. @z
  476. ------------------------------------------------------------------------------
  477. ANSI
  478. @x l.192
  479. extern void common_init();
  480. @y
  481. extern void common_init(void);
  482. extern void print_stats(void);
  483. @z
  484. ==============================================================================
  485. PORTABILITY
  486. @x l.151
  487.   eight_bits *tok_start; /* pointer into |tok_mem| */
  488. @y
  489.   eight_bits HUGE *tok_start; /* pointer into |tok_mem| */
  490. @z
  491. ------------------------------------------------------------------------------
  492. MEMORY ALLOCATION
  493. @x l.157
  494. text text_info[max_texts];
  495. text_pointer text_info_end=text_info+max_texts-1;
  496. @y
  497. text *text_info;
  498. text_pointer text_info_end;
  499. @z
  500. ------------------------------------------------------------------------------
  501. MEMORY ALLOCATION, PORTABILITY
  502. @x l.160
  503. eight_bits tok_mem[max_toks];
  504. eight_bits *tok_mem_end=tok_mem+max_toks-1;
  505. eight_bits *tok_ptr; /* first unused position in |tok_mem| */
  506. @y
  507. eight_bits HUGE *tok_mem;
  508. eight_bits HUGE *tok_mem_end;
  509. eight_bits HUGE *tok_ptr; /* first unused position in |tok_mem| */
  510. @z
  511. ------------------------------------------------------------------------------
  512. MEMORY ALLOCATION, SYSTEM DEPENDENCIES
  513. @x l.165
  514. text_info->tok_start=tok_ptr=tok_mem;
  515. @y
  516. alloc_object(section_text,longest_name+1,char);
  517. section_text_end = section_text + longest_name;
  518. alloc_object(text_info,max_texts,text);
  519. text_info_end = text_info + max_texts - 1;
  520. #ifdef __TURBOC__
  521. tok_mem=allocsafe(max_toks,sizeof(*tok_mem));
  522. #else
  523. alloc_object(tok_mem,max_toks,eight_bits);
  524. #endif
  525. tok_mem_end = tok_mem + max_toks - 1;
  526. text_info->tok_start=tok_ptr=tok_mem;
  527. alloc_object(stack,stack_size+1,output_state);
  528. stack_end = stack + stack_size;
  529. @^system dependencies@>
  530. @z
  531. ------------------------------------------------------------------------------
  532. PORTABILITY
  533. @x l.175
  534. name_dir->equiv=(char *)text_info; /* the undefined section has no replacement text */
  535. @y
  536. name_dir->equiv=(void HUGE *)text_info; /* the undefined section has no replacement text */
  537. @z
  538. ------------------------------------------------------------------------------
  539. ANSI
  540. @x l.181
  541. int names_match(p,first,l)
  542. name_pointer p; /* points to the proposed match */
  543. char *first; /* position of first character of string */
  544. int l; /* length of identifier */
  545. @y
  546. int names_match(name_pointer p,char *first,int l,eight_bits dummy)
  547. /* |p|: points to the proposed match */
  548. /* |first|: position of first character of string */
  549. /* |l|: length of identifier */
  550. /* |dummy|: not used by \.{TANGLE} */
  551. @z
  552. ------------------------------------------------------------------------------
  553. ANSI
  554. @x l.196
  555. void
  556. init_node(node)
  557. name_pointer node;
  558. @y
  559. void init_node(name_pointer node)
  560. @z
  561. ------------------------------------------------------------------------------
  562. PORTABILITY
  563. @x l.200
  564.     node->equiv=(char *)text_info;
  565. @y
  566.     node->equiv=(void HUGE *)text_info;
  567. @z
  568. ------------------------------------------------------------------------------
  569. ANSI
  570. @x l.202
  571. void
  572. init_p() {}
  573. @y
  574. void init_p(name_pointer dummy1,eight_bits dummy2)
  575. {}
  576. @z
  577. ------------------------------------------------------------------------------
  578. ANSI
  579. @x l.258
  580. void
  581. store_two_bytes(x)
  582. sixteen_bits x;
  583. @y
  584. static void store_two_bytes(sixteen_bits x)
  585. @z
  586. ------------------------------------------------------------------------------
  587. TRANSLATION
  588. @x l.262
  589.   if (tok_ptr+2>tok_mem_end) overflow("token");
  590. @y
  591.   if (tok_ptr+2>tok_mem_end) overflow(get_string(MSG_OVERFLOW_CT26));
  592. @z
  593. ------------------------------------------------------------------------------
  594. PORTABILITY
  595. @x l.295
  596.   eight_bits *end_field; /* ending location of replacement text */
  597.   eight_bits *byte_field; /* present location within replacement text */
  598. @y
  599.   eight_bits HUGE *end_field; /* ending location of replacement text */
  600.   eight_bits HUGE *byte_field; /* present location within replacement text */
  601. @z
  602. ------------------------------------------------------------------------------
  603. MEMORY ALLOCATION
  604. @x l.312
  605. output_state stack[stack_size+1]; /* info for non-current levels */
  606. stack_pointer stack_ptr; /* first unused location in the output state stack */
  607. stack_pointer stack_end=stack+stack_size; /* end of |stack| */
  608. @y
  609. output_state *stack; /* info for non-current levels */
  610. stack_pointer stack_ptr; /* first unused location in the output state stack */
  611. stack_pointer stack_end; /* end of |stack| */
  612. @z
  613. ------------------------------------------------------------------------------
  614. ANSI, TRANSLATION
  615. @x l.334
  616. void
  617. push_level(p) /* suspends the current level */
  618. name_pointer p;
  619. {
  620.   if (stack_ptr==stack_end) overflow("stack");
  621. @y
  622. static void push_level(name_pointer p) /* suspends the current level */
  623. {
  624.   if (stack_ptr==stack_end) overflow(get_string(MSG_OVERFLOW_CT30));
  625. @z
  626. ------------------------------------------------------------------------------
  627. ANSI
  628. @x l.353
  629. void
  630. pop_level(flag) /* do this when |cur_byte| reaches |cur_end| */
  631. int flag; /* |flag==0| means we are in |output_defs| */
  632. @y
  633. static void pop_level(int flag) /* do this when |cur_byte| reaches |cur_end| */
  634. @z
  635. ------------------------------------------------------------------------------
  636. ANSI
  637. @x l.389
  638. void
  639. get_output() /* sends next token to |out_char| */
  640. @y
  641. static void get_output(void) /* sends next token to |out_char| */
  642. @z
  643. ------------------------------------------------------------------------------
  644. PORTABILITY, TRANSLATION
  645. @x l.423
  646.   if ((a+name_dir)->equiv!=(char *)text_info) push_level(a+name_dir);
  647.   else if (a!=0) {
  648.     printf("\n! Not present: <");
  649. @y
  650.   if ((a+name_dir)->equiv!=(void HUGE *)text_info) push_level(a+name_dir);
  651.   else if (a!=0) {
  652.     printf(get_string(MSG_ERROR_CT34));
  653. @z
  654. ------------------------------------------------------------------------------
  655. ANSI
  656. @x l.476
  657. void
  658. flush_buffer() /* writes one line to output file */
  659. @y
  660. static void flush_buffer(void) /* writes one line to output file */
  661. @z
  662. ------------------------------------------------------------------------------
  663. MEMORY ALLOCATION
  664. @x l.497
  665. name_pointer output_files[max_files];
  666. name_pointer *cur_out_file, *end_output_files, *an_output_file;
  667. char cur_section_name_char; /* is it |'<'| or |'('| */
  668. char output_file_name[longest_name]; /* name of the file */
  669.  
  670. @ We make |end_output_files| point just beyond the end of
  671. |output_files|. The stack pointer
  672. |cur_out_file| starts out there. Every time we see a new file, we
  673. decrement |cur_out_file| and then write it in.
  674. @<Set initial...@>=
  675. cur_out_file=end_output_files=output_files+max_files;
  676. @y
  677. name_pointer *output_files;
  678. name_pointer *cur_out_file, *end_output_files, *an_output_file;
  679. char cur_section_name_char; /* is it |'<'| or |'('| */
  680. char *output_file_name; /* name of the file */
  681.  
  682. @ We make |end_output_files| point just beyond the end of
  683. |output_files|. The stack pointer
  684. |cur_out_file| starts out there. Every time we see a new file, we
  685. decrement |cur_out_file| and then write it in.
  686.  
  687. @<Set initial...@>=
  688. alloc_object(output_files,max_files,name_pointer);
  689. alloc_object(output_file_name,longest_name,char);
  690. cur_out_file=end_output_files=output_files+max_files;
  691. @z
  692. ------------------------------------------------------------------------------
  693. TRANSLATION
  694. @x l.519
  695.       overflow("output files");
  696. @y
  697.       overflow(get_string(MSG_OVERFLOW_CT40));
  698. @z
  699. ------------------------------------------------------------------------------
  700. ANSI
  701. @x l.526
  702. @<Predecl...@>=
  703. void phase_two();
  704.  
  705. @ @c
  706. void
  707. phase_two () {
  708. @y
  709. @<Predecl...@>=
  710. static void phase_two(void);
  711.  
  712. @ @c
  713. static void phase_two (void) {
  714. @z
  715. ------------------------------------------------------------------------------
  716. TRANSLATION
  717. @x l.537
  718.     printf("\n! No program text was specified."); mark_harmless;
  719. @y
  720.     printf(get_string(MSG_WARNING_CT42)); mark_harmless;
  721. @z
  722. ------------------------------------------------------------------------------
  723. TRANSLATION
  724. @x l.543
  725.         printf("\nWriting the output file (%s):",C_file_name);
  726. @y
  727.         printf(get_string(MSG_PROGRESS_CT42_1),C_file_name);
  728. @z
  729. ------------------------------------------------------------------------------
  730. TRANSLATION
  731. @x l.547
  732.         printf("\nWriting the output files:");
  733. @y
  734.         printf(get_string(MSG_PROGRESS_CT42_2));
  735. @z
  736. ------------------------------------------------------------------------------
  737. TRANSLATION
  738. @x l.557
  739.     if(show_happiness) printf("\nDone.");
  740. @y
  741.     if(show_happiness) printf(get_string(MSG_PROGRESS_CT42_3));
  742. @z
  743. ------------------------------------------------------------------------------
  744. TRANSLATION
  745. @x l.571
  746.     if (C_file ==0) fatal("! Cannot open output file:",output_file_name);
  747. @y
  748.     if (C_file ==0) fatal(get_string(MSG_FATAL_CO78),output_file_name);
  749. @z
  750. ------------------------------------------------------------------------------
  751. ANSI
  752. @x l.595
  753. @ @<Predecl...@>=
  754. void output_defs();
  755.  
  756. @ @c
  757. void
  758. output_defs()
  759. @y
  760. @ @<Predecl...@>=
  761. static void output_defs(void);
  762.  
  763. @ @c
  764. static void output_defs(void)
  765. @z
  766. ------------------------------------------------------------------------------
  767. TRANSLATION
  768. @x l.623
  769.           else if (a<050000) { confusion("macro defs have strange char");}
  770. @y
  771.           else if (a<050000) { confusion(get_string(MSG_CONFUSION_CT47));}
  772. @z
  773. ------------------------------------------------------------------------------
  774. ANSI, PORTABILITY
  775. @x l.641
  776. @<Predecl...@>=
  777. void out_char();
  778.  
  779. @ @c
  780. void
  781. out_char(cur_char)
  782. eight_bits cur_char;
  783. {
  784.   char *j, *k; /* pointer into |byte_mem| */
  785. @y
  786. @<Predecl...@>=
  787. static void out_char(eight_bits);
  788.  
  789. @ @c
  790. static void out_char(eight_bits cur_char)
  791. {
  792.   char HUGE *j;
  793.   char HUGE *k; /* pointer into |byte_mem| */
  794. @z
  795. ------------------------------------------------------------------------------
  796. MEMORY ALLOCATION
  797. @x l.700
  798. char translit[128][translit_length];
  799.  
  800. @ @<Set init...@>=
  801. {
  802.   int i;
  803.   for (i=0;i<128;i++) sprintf(translit[i],"X%02X",(unsigned)(128+i));
  804. }
  805. @y
  806. char **translit;
  807.  
  808. @ @<Set init...@>=
  809. {
  810.   int i;
  811.   alloc_object(translit,128,char *);
  812.   for(i=0; i<128; i++)
  813.     alloc_object(translit[i],translit_length,char);
  814.   for (i=0;i<128;i++)
  815.     sprintf(translit[i],"X%02X",(unsigned)(128+i));
  816. }
  817. @z
  818. ------------------------------------------------------------------------------
  819. MEMORY ALLOCATION
  820. @x l.776
  821. eight_bits ccode[256]; /* meaning of a char following \.{@@} */
  822.  
  823. @ @<Set ini...@>= {
  824.   int c; /* must be |int| so the |for| loop will end */
  825. @y
  826. eight_bits *ccode; /* meaning of a char following \.{@@} */
  827.  
  828. @ @<Set ini...@>= {
  829.   int c; /* must be |int| so the |for| loop will end */
  830.   alloc_object(ccode,256,eight_bits);
  831. @z
  832. ------------------------------------------------------------------------------
  833. ANSI
  834. @x l.800
  835. eight_bits
  836. skip_ahead() /* skip to next control code */
  837. @y
  838. static eight_bits skip_ahead(void) /* skip to next control code */
  839. @z
  840. ------------------------------------------------------------------------------
  841. @x l.829
  842. No comment, long or short, is allowed to contain `\.{@@ }' or `\.{@@*}'.
  843. @y
  844. No comment, long or short, is allowed to contain `\.{@@\ }' or `\.{@@*}'.
  845. @z
  846. ------------------------------------------------------------------------------
  847. ANSI
  848. @x l.835
  849. int skip_comment(is_long_comment) /* skips over comments */
  850. boolean is_long_comment;
  851. @y
  852. static int skip_comment(boolean is_long_comment) /* skips over comments */
  853. @z
  854. ------------------------------------------------------------------------------
  855. TRANSLATION
  856. @x l.844
  857.           err_print("! Input ended in mid-comment");
  858. @y
  859.           err_print(get_string(MSG_ERROR_CT60_1));
  860. @z
  861. ------------------------------------------------------------------------------
  862. TRANSLATION
  863. @x l.857
  864.         err_print("! Section name ended in mid-comment"); loc--;
  865. @y
  866.         err_print(get_string(MSG_ERROR_CT60_2)); loc--;
  867. @z
  868. ------------------------------------------------------------------------------
  869. ANSI
  870. @x l.885
  871. eight_bits
  872. get_next() /* produces the next input token */
  873. @y
  874. static eight_bits get_next(void) /* produces the next input token */
  875. @z
  876. ------------------------------------------------------------------------------
  877. TRANSLATION
  878. @x l.1003
  879.         err_print("! String didn't end"); loc=limit; break;
  880. @y
  881.         err_print(get_string(MSG_ERROR_CT67_1)); loc=limit; break;
  882. @z
  883. ------------------------------------------------------------------------------
  884. TRANSLATION
  885. @x l.1007
  886.         err_print("! Input ended in middle of string"); loc=buffer; break;
  887. @y
  888.         err_print(get_string(MSG_ERROR_CT67_2)); loc=buffer; break;
  889. @z
  890. ------------------------------------------------------------------------------
  891. TRANSLATION
  892. @x l.1025
  893.     printf("\n! String too long: ");
  894. @y
  895.     printf(get_string(MSG_ERROR_CT67_3));
  896. @z
  897. ------------------------------------------------------------------------------
  898. TRANSLATION
  899. @x l.1042
  900.     case translit_code: err_print("! Use @@l in limbo only"); continue;
  901. @y
  902.     case translit_code: err_print(get_string(MSG_ERROR_CT68_1)); continue;
  903. @z
  904. ------------------------------------------------------------------------------
  905. TRANSLATION
  906. @x l.1047
  907.         err_print("! Double @@ should be used in control text");
  908. @y
  909.         err_print(get_string(MSG_ERROR_CT68_2));
  910. @z
  911. ------------------------------------------------------------------------------
  912. TRANSLATION
  913. @x l.1073
  914.         err_print("! Double @@ should be used in ASCII constant");
  915. @y
  916.         err_print(get_string(MSG_ERROR_CT69));
  917. @z
  918. ------------------------------------------------------------------------------
  919. TRANSLATION
  920. @x l.1079
  921.         err_print("! String didn't end"); loc=limit-1; break;
  922. @y
  923.         err_print(get_string(MSG_ERROR_CT67_1)); loc=limit-1; break;
  924. @z
  925. ------------------------------------------------------------------------------
  926. TRANSLATION
  927. @x l.1110
  928.     err_print("! Input ended in section name");
  929. @y
  930.     err_print(get_string(MSG_ERROR_CT72_1));
  931. @z
  932. ------------------------------------------------------------------------------
  933. TRANSLATION
  934. @x l.1123
  935.   printf("\n! Section name too long: ");
  936. @y
  937.   printf(get_string(MSG_ERROR_CT72_2));
  938. @z
  939. ------------------------------------------------------------------------------
  940. TRANSLATION
  941. @x l.1137
  942.     err_print("! Section name didn't end"); break;
  943. @y
  944.     err_print(get_string(MSG_ERROR_CT73_1)); break;
  945. @z
  946. ------------------------------------------------------------------------------
  947. TRANSLATION
  948. @x l.1141
  949.     err_print("! Nesting of section names not allowed"); break;
  950. @y
  951.     err_print(get_string(MSG_ERROR_CT73_2)); break;
  952. @z
  953. ------------------------------------------------------------------------------
  954. TRANSLATION
  955. @x l.1155
  956.   if (loc>=limit) err_print("! Verbatim string didn't end");
  957. @y
  958.   if (loc>=limit) err_print(get_string(MSG_ERROR_CT74));
  959. @z
  960. ------------------------------------------------------------------------------
  961. TRANSLATION
  962. @x l.1178
  963. @d app_repl(c)  {if (tok_ptr==tok_mem_end) overflow("token"); *tok_ptr++=c;}
  964. @y
  965. @d app_repl(c)
  966.   {if (tok_ptr==tok_mem_end)
  967.      overflow(get_string(MSG_OVERFLOW_CT26));
  968.    *tok_ptr++=c;}
  969. @z
  970. ------------------------------------------------------------------------------
  971. ANSI
  972. @x l.1185
  973. void
  974. scan_repl(t) /* creates a replacement text */
  975. eight_bits t;
  976. @y
  977. static void scan_repl(eight_bits t) /* creates a replacement text */
  978. @z
  979. ------------------------------------------------------------------------------
  980. ANSI
  981. @x l.1196
  982.       default: app_repl(a); /* store |a| in |tok_mem| */
  983. @y
  984.       case ')': /* some compilers complain about `missing space between
  985.          macro name and its replacement list', because {\mc ANSI C} requires
  986.          a space after the closing parenthesis */
  987.          app_repl(a); if(t==macro) app_repl(' '); break;
  988.       default: app_repl(a); /* store |a| in |tok_mem| */
  989. @z
  990. ------------------------------------------------------------------------------
  991. TRANSLATION
  992. @x l.1199
  993.   if (text_ptr>text_info_end) overflow("text");
  994. @y
  995.   if (text_ptr>text_info_end) overflow(get_string(MSG_OVERFLOW_CT76));
  996. @z
  997. ------------------------------------------------------------------------------
  998. ANSI
  999. @x l.1214
  1000. {int a=id_lookup(id_first,id_loc)-name_dir; app_repl((a / 0400)+0200);
  1001. @y
  1002. {int a=id_lookup(id_first,id_loc,' ')-name_dir; app_repl((a / 0400)+0200);
  1003. @z
  1004. ------------------------------------------------------------------------------
  1005. ANSI
  1006. @x l.1218
  1007. case identifier: a=id_lookup(id_first,id_loc)-name_dir;
  1008. @y
  1009. case identifier: a=id_lookup(id_first,id_loc,' ')-name_dir;
  1010. @z
  1011. ------------------------------------------------------------------------------
  1012. TRANSLATION
  1013. @x l.1240
  1014.     err_print("! @@d, @@f and @@c are ignored in C text"); continue;
  1015. @y
  1016.     err_print(get_string(MSG_ERROR_CT78)); continue;
  1017. @z
  1018. ------------------------------------------------------------------------------
  1019. TRANSLATION
  1020. @x l.1250
  1021.   if (*try_loc=='=') err_print ("! Missing `@@ ' before a named section");
  1022. @y
  1023.   if (*try_loc=='=') err_print (get_string(MSG_ERROR_CT79));
  1024. @z
  1025. ------------------------------------------------------------------------------
  1026. TRANSLATION
  1027. @x l.1261
  1028.       else err_print("! Double @@ should be used in string");
  1029. @y
  1030.       else err_print(get_string(MSG_ERROR_CT80));
  1031. @z
  1032. ------------------------------------------------------------------------------
  1033. TRANSLATION
  1034. @x l.1308
  1035.     default: err_print("! Unrecognized escape sequence");
  1036. @y
  1037.     default: err_print(get_string(MSG_ERROR_CT81));
  1038. @z
  1039. ------------------------------------------------------------------------------
  1040. ANSI
  1041. @x l.1335
  1042. void
  1043. scan_section()
  1044. @y
  1045. static void scan_section(void)
  1046. @z
  1047. ------------------------------------------------------------------------------
  1048. TRANSLATION
  1049. @x l.1382
  1050.     err_print("! Definition flushed, must start with identifier");
  1051. @y
  1052.     err_print(get_string(MSG_ERROR_CT85));
  1053. @z
  1054. ------------------------------------------------------------------------------
  1055. ANSI
  1056. @x l.1386
  1057.   app_repl(((a=id_lookup(id_first,id_loc)-name_dir) / 0400)+0200);
  1058. @y
  1059.   app_repl(((a=id_lookup(id_first,id_loc,' ')-name_dir) / 0400)+0200);
  1060. @z
  1061. ------------------------------------------------------------------------------
  1062. PORTABILITY
  1063. @x l.1422
  1064. else if (p->equiv==(char *)text_info) p->equiv=(char *)cur_text;
  1065. @y
  1066. else if (p->equiv==(void HUGE *)text_info) p->equiv=(void HUGE *)cur_text;
  1067. @z
  1068. ------------------------------------------------------------------------------
  1069. ANSI
  1070. @x l.1433
  1071. @ @<Predec...@>=
  1072. void phase_one();
  1073.  
  1074. @ @c
  1075. void
  1076. phase_one() {
  1077. @y
  1078. @ @<Predec...@>=
  1079. static void phase_one(void);
  1080.  
  1081. @ @c
  1082. static void phase_one(void) {
  1083. @z
  1084. ------------------------------------------------------------------------------
  1085. ANSI
  1086. @x l.1451
  1087. @<Predecl...@>=
  1088. void skip_limbo();
  1089.  
  1090. @ @c
  1091. void
  1092. skip_limbo()
  1093. @y
  1094. @<Predecl...@>=
  1095. static void skip_limbo(void);
  1096.  
  1097. @ @c
  1098. static void skip_limbo(void)
  1099. @z
  1100. ------------------------------------------------------------------------------
  1101. TRANSLATION
  1102. @x l.1472
  1103.             err_print("! Double @@ should be used in control text");
  1104. @y
  1105.             err_print(get_string(MSG_ERROR_CT68_2));
  1106. @z
  1107. ------------------------------------------------------------------------------
  1108. TRANSLATION
  1109. @x l.1476
  1110.         default: err_print("! Double @@ should be used in limbo");
  1111. @y
  1112.         default: err_print(get_string(MSG_ERROR_CT93));
  1113. @z
  1114. ------------------------------------------------------------------------------
  1115. TRANSLATION
  1116. @x l.1488
  1117.     err_print("! Improper hex number following @@l");
  1118. @y
  1119.     err_print(get_string(MSG_ERROR_CT94_1));
  1120. @z
  1121. ------------------------------------------------------------------------------
  1122. TRANSLATION
  1123. @x l.1498
  1124.       err_print("! Replacement string in @@l too long");
  1125. @y
  1126.       err_print(get_string(MSG_ERROR_CT94_2));
  1127. @z
  1128. ------------------------------------------------------------------------------
  1129. ANSI
  1130. @x l.1501
  1131.       strncpy(translit[i-0200],beg,loc-beg);
  1132. @y
  1133.       strncpy(translit[i-0200],beg,(size_t)(loc-beg));
  1134. @z
  1135. ------------------------------------------------------------------------------
  1136. ANSI, TRANSLATION
  1137. @x l.1506
  1138. @ Because on some systems the difference between two pointers is a |long|
  1139. but not an |int|, we use \.{\%ld} to print these quantities.
  1140.  
  1141. @c
  1142. void
  1143. print_stats() {
  1144.   printf("\nMemory usage statistics:\n");
  1145.   printf("%ld names (out of %ld)\n",
  1146.           (long)(name_ptr-name_dir),(long)max_names);
  1147.   printf("%ld replacement texts (out of %ld)\n",
  1148.           (long)(text_ptr-text_info),(long)max_texts);
  1149.   printf("%ld bytes (out of %ld)\n",
  1150.           (long)(byte_ptr-byte_mem),(long)max_bytes);
  1151.   printf("%ld tokens (out of %ld)\n",
  1152.           (long)(tok_ptr-tok_mem),(long)max_toks);
  1153. }
  1154. @y
  1155. @ {\mc ANSI C} declares the difference between two pointers to be of type
  1156. |ptrdiff_t| which equals |long| on (almost) all systems instead of |int|,
  1157. so we use \.{\%ld} to print these quantities and cast them to |long|
  1158. explicitly.
  1159.  
  1160. @c
  1161. void print_stats(void) {
  1162.   printf(get_string(MSG_STATS_CT95_1));
  1163.   printf(get_string(MSG_STATS_CT95_2),
  1164.           (long)(name_ptr-name_dir),(long)max_names);
  1165.   printf(get_string(MSG_STATS_CT95_3),
  1166.           (long)(text_ptr-text_info),(long)max_texts);
  1167.   printf(get_string(MSG_STATS_CT95_4),
  1168.           (long)(byte_ptr-byte_mem),(long)max_bytes);
  1169.   printf(get_string(MSG_STATS_CT95_5),
  1170.           (long)(tok_ptr-tok_mem),(long)max_toks);
  1171. }
  1172. @z
  1173. ------------------------------------------------------------------------------
  1174. ANSI, SYSTEM DEPENDENCIES
  1175. @x l.1523
  1176. @** Index.
  1177. @y
  1178. @** Function declarations.  Here are declarations---conforming to
  1179. {\mc ANSI~C}---of all functions in this code, as far as they are
  1180. not already in |"common.h"|.  These are private to \.{CTANGLE}.
  1181.  
  1182. @<Predecl...@>=
  1183. static eight_bits get_next(void);@/
  1184. static eight_bits skip_ahead(void);@/
  1185. static int skip_comment(boolean);@/
  1186. static void flush_buffer(void);@/
  1187. static void get_output(void);@/
  1188. static void pop_level(int);@/
  1189. static void push_level(name_pointer);@/
  1190. static void scan_repl(eight_bits);@/
  1191. static void scan_section(void);@/
  1192. static void store_two_bytes(sixteen_bits);
  1193.  
  1194. @* Version information.  The {\mc AMIGA} operating system provides the
  1195. `version' command and good programs answer with some informations about
  1196. their creation date and their current version.
  1197. @^system dependencies@>
  1198.  
  1199. @<Glob...@>=
  1200. #ifdef _AMIGA
  1201. const unsigned char *Version = "$VER: CTangle 3.2 [p10] "__AMIGADATE__;
  1202. #endif
  1203.  
  1204. @** Index.
  1205. @z
  1206. ------------------------------------------------------------------------------
  1207.