home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!world!ksr!jfw
- From: jfw@ksr.com (John F. Woods)
- Newsgroups: comp.lang.c
- Subject: Re: This will work under unix now
- Message-ID: <20650@ksr.com>
- Date: 5 Jan 93 12:49:05 EST
- References: <1993Jan5.075823.10230jp@tygra.Michigan.COM>
- Sender: news@ksr.com
- Lines: 25
-
- jp@tygra.Michigan.COM (John Palmer) writes:
- >Dug this out of the code that I saved from this group (and others).
- >It wouldn't work under XENIX/UNIX as you cannot give both variable
- >names and their types in the function definition (inside the '()'s)
- >---
- >#include <stdio.h>
- >#include <stdlib.h>
- >char * strwrap(char *, int, int);
-
- >char * strwrap(s, w, o)
- > char *s;
- > int w,o;
- >{
-
- If your compiler does not accept a definition like
-
- char * strwrap(char *s, int w, int o)
- { ...
-
- then it isn't an ANSI C compiler. If it claims to be, demand your money back.
- (That style is also acceptable for the prototype, as well.)
-
- If it doesn't claim to be an ANSI C compiler, consider investing in one.
- At any rate, this isn't a "unix" issue, since fully-compliant ANSI C compilers
- for UNIX are a dime a dozen.
-