From owner-svn-src-head@FreeBSD.ORG Tue Dec 29 08:42:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B1841065679; Tue, 29 Dec 2009 08:42:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49D618FC18; Tue, 29 Dec 2009 08:42:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBT8gxqW016730; Tue, 29 Dec 2009 08:42:59 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBT8gx2N016727; Tue, 29 Dec 2009 08:42:59 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200912290842.nBT8gx2N016727@svn.freebsd.org> From: Ed Schouten Date: Tue, 29 Dec 2009 08:42:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201175 - in head/games/fortune: strfile unstr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 08:42:59 -0000 Author: ed Date: Tue Dec 29 08:42:58 2009 New Revision: 201175 URL: http://svn.freebsd.org/changeset/base/201175 Log: Use ANSI C function declarations. Modified: head/games/fortune/strfile/strfile.c head/games/fortune/unstr/unstr.c Modified: head/games/fortune/strfile/strfile.c ============================================================================== --- head/games/fortune/strfile/strfile.c Tue Dec 29 07:19:52 2009 (r201174) +++ head/games/fortune/strfile/strfile.c Tue Dec 29 08:42:58 2009 (r201175) @@ -146,7 +146,8 @@ static void usage(void); * CHUNKSIZE blocks; if the latter, we just write each pointer, * and then seek back to the beginning to write in the table. */ -int main(int ac, char *av[]) +int +main(int ac, char *av[]) { char *sp, dc; FILE *inf, *outf; @@ -264,9 +265,8 @@ int main(int ac, char *av[]) /* * This routine evaluates arguments from the command line */ -void getargs(argc, argv) -int argc; -char **argv; +void +getargs(int argc, char **argv) { int ch; @@ -318,7 +318,8 @@ char **argv; } } -void usage() +void +usage(void) { (void) fprintf(stderr, "strfile [-Ciorsx] [-c char] source_file [output_file]\n"); @@ -329,9 +330,8 @@ void usage() * add_offset: * Add an offset to the list, or write it out, as appropriate. */ -void add_offset(fp, off) -FILE *fp; -off_t off; +void +add_offset(FILE *fp, off_t off) { off_t beoff; @@ -349,7 +349,8 @@ off_t off; * do_order: * Order the strings alphabetically (possibly ignoring case). */ -void do_order() +void +do_order(void) { uint32_t i; off_t *lp; @@ -368,8 +369,8 @@ void do_order() Tbl.str_flags |= STR_ORDERED; } -static int stable_collate_range_cmp(c1, c2) - int c1, c2; +static int +stable_collate_range_cmp(int c1, int c2) { static char s1[2], s2[2]; int ret; @@ -385,8 +386,8 @@ static int stable_collate_range_cmp(c1, * cmp_str: * Compare two strings in the file */ -int cmp_str(s1, s2) -const void *s1, *s2; +int +cmp_str(const void *s1, const void *s2) { const STR *p1, *p2; int c1, c2; @@ -441,7 +442,8 @@ const void *s1, *s2; * not to randomize across delimiter boundaries. All * randomization is done within each block. */ -void randomize() +void +randomize(void) { uint32_t cnt, i; off_t tmp; Modified: head/games/fortune/unstr/unstr.c ============================================================================== --- head/games/fortune/unstr/unstr.c Tue Dec 29 07:19:52 2009 (r201174) +++ head/games/fortune/unstr/unstr.c Tue Dec 29 08:42:58 2009 (r201175) @@ -79,7 +79,8 @@ FILE *Inf, *Dataf; void order_unstr(STRFILE *); /* ARGSUSED */ -int main(int ac, char **av) +int +main(int ac, char **av) { static STRFILE tbl; /* description table */ @@ -109,8 +110,8 @@ int main(int ac, char **av) exit(0); } -void order_unstr(tbl) -STRFILE *tbl; +void +order_unstr(STRFILE *tbl) { uint32_t i; char *sp;