Path: utzoo!mnetor!uunet!nbires!hao!ames!fxgrp!ljz From: ljz@fxgrp.UUCP (Lloyd Zusman) Newsgroups: comp.unix.questions Subject: I need to create ANSI C function prototypes. Message-ID: <201@fxgrp.UUCP> Date: 2 Feb 88 19:55:14 GMT Reply-To: fxgrp!ljz@ames.arpa (Lloyd Zusman) Organization: FX Development Group, Inc., Mountain View, CA Lines: 47 Keywords: ANSI C prototypes I'm looking for a program that will take old-fashioned C code and produce ANSI C function prototypes. For example, consider the following program fragment ... char *foo(a, b, c) char *c; int b; { ... } int bar(x, y) struct bonzo *x; MYTYPE *y; { ... } This program would produce something similar to the following: char *foo(char *a, int b, int c); int bar(struct bonzo *x, MYTYPE *y); Musts: ------ (1) This program must run under unix. (2) It mustn't alter the original source file, but must write its output to stdout, another file, etc. (3) Notice that there is no explicit declaration for the 'c' argument in the foo() function in the above example, and hence the argument defaults to an 'int'. The program must handle this case. I know that there are C compilers that run under MSDOS which optionally do this sort of thing, but these programs would violate "must" number 1. It also would be nice if source code were available. Any suggestions? --- Lloyd Zusman Master Byte Software Los Gatos, California Internet: fxgrp!ljz@ames.arpa "We take things well in hand." UUCP: ...!ames!fxgrp!ljz