diff options
Diffstat (limited to 'ching/printching/printching.c')
-rw-r--r-- | ching/printching/printching.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ching/printching/printching.c b/ching/printching/printching.c index 42c5dc3c..54c08921 100644 --- a/ching/printching/printching.c +++ b/ching/printching/printching.c @@ -1,4 +1,4 @@ -/* $NetBSD: printching.c,v 1.3 2008/07/20 01:03:21 lukem Exp $ */ +/* $NetBSD: printching.c,v 1.4 2009/08/12 05:40:04 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\ #if 0 static char sccsid[] = "@(#)ching.phx.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: printching.c,v 1.3 2008/07/20 01:03:21 lukem Exp $"); +__RCSID("$NetBSD: printching.c,v 1.4 2009/08/12 05:40:04 dholland Exp $"); #endif #endif /* not lint */ @@ -59,12 +59,12 @@ __RCSID("$NetBSD: printching.c,v 1.3 2008/07/20 01:03:21 lukem Exp $"); #include "ching.h" #include "pathnames.h" -int changes(void); -int codem(int a); -int doahex(void); -void phx(int hexagram, int flag); +static int changes(void); +static int codem(int a); +static int doahex(void); +static void phx(int hexagram, int flag); -struct { +static const struct { int lines; /* encoded value of lines */ int trinum; /* trigram number */ } table[] = { @@ -81,7 +81,7 @@ struct { /* * Gives hexagram number from two component trigrams. */ -int crosstab[8][8] = { +static const int crosstab[8][8] = { {1, 34, 5, 26, 11, 9, 14, 43}, {25, 51, 3, 27, 24, 42, 21, 17}, {6, 40, 29, 4, 7, 59, 64, 47}, @@ -92,10 +92,10 @@ int crosstab[8][8] = { {10, 54, 60, 41, 19, 61, 38, 58} }; -int trigrams[6]; -int moving[6]; +static int trigrams[6]; +static int moving[6]; -FILE *chingf; /* stream to read the hexagram file */ +static FILE *chingf; /* stream to read the hexagram file */ /*ARGSUSED*/ int @@ -133,7 +133,7 @@ main(int argc, char **argv) /* * Compute the hexagram number, given the trigrams. */ -int +static int doahex(void) { int lower, upper; /* encoded values of lower and upper trigrams */ @@ -155,7 +155,7 @@ doahex(void) * Encode a trigram as a 3-digit number; the digits, from left to right, * represent the lines. 7 is a solid (yang) line, 8 is a broken (yin) line. */ -int +static int codem(int a) { int code, i; @@ -187,7 +187,7 @@ codem(int a) * Compute the changes based on moving lines; return 1 if any lines moved, * 0 if no lines moved. */ -int +static int changes(void) { int cflag; @@ -211,7 +211,7 @@ changes(void) * if flag is 0, print the entire source; if flag is 1, ignore the meanings * of the lines. */ -void +static void phx(int hexagram, int flag) { char textln[128+1]; /* buffer for text line */ |