[brlcad-commits] SF.net SVN: brlcad:[58975] brlcad/trunk
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <tbr...@us...> - 2013-12-17 21:48:52
|
Revision: 58975 http://sourceforge.net/p/brlcad/code/58975 Author: tbrowder2 Date: 2013-12-17 21:48:46 +0000 (Tue, 17 Dec 2013) Log Message: ----------- updates to get BRL-CAD C source files compiled warning- and error-free with a C++ compiler: added const (and casts) as necessary to eliminate many instances of: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] in the process had to add some char and const char variables for char and const char pointer use successful debug build on Debian 7, 64-bit: no warnings or errors (except for the usual from libgiam, tcl, and step) successful 'make regress' successful bu_redblack_test with 'make test' Modified Paths: -------------- brlcad/trunk/include/bu.h brlcad/trunk/include/pkg.h brlcad/trunk/src/fbserv/fbserv.c brlcad/trunk/src/irprep/ir-X.c brlcad/trunk/src/irprep/irdisp.c brlcad/trunk/src/irprep/pictx.c brlcad/trunk/src/libbn/tcl.c brlcad/trunk/src/libbu/rb_create.c brlcad/trunk/src/libbu/tests/bu_redblack.c brlcad/trunk/src/libbu/tests/bu_str_isprint.c brlcad/trunk/src/libfb/fbserv_obj.c brlcad/trunk/src/libfb/if_remote.c brlcad/trunk/src/libpkg/pkg.c brlcad/trunk/src/mged/fbserv.c brlcad/trunk/src/remrt/remrt.c brlcad/trunk/src/sig/dmod.c brlcad/trunk/src/sig/imod.c brlcad/trunk/src/sig/istats.c brlcad/trunk/src/sig/smod.c brlcad/trunk/src/sig/umod.c brlcad/trunk/src/util/alias-pix.c brlcad/trunk/src/util/azel.c brlcad/trunk/src/util/bw-imp.c brlcad/trunk/src/util/bw-ps.c brlcad/trunk/src/util/bwmod.c brlcad/trunk/src/util/bwrot.c brlcad/trunk/src/util/bwscale.c brlcad/trunk/src/util/bwshrink.c brlcad/trunk/src/util/cv.c brlcad/trunk/src/util/dsp_add.c brlcad/trunk/src/util/dunncolor.c brlcad/trunk/src/util/dunncomm.c brlcad/trunk/src/util/dunnsnap.c brlcad/trunk/src/util/hex.c brlcad/trunk/src/util/mac-pix.c brlcad/trunk/src/util/pix-alias.c brlcad/trunk/src/util/pix-ps.c brlcad/trunk/src/util/pix-sun.c brlcad/trunk/src/util/pix3filter.c brlcad/trunk/src/util/pixcolors.c brlcad/trunk/src/util/pixdsplit.c brlcad/trunk/src/util/pixelswap.c brlcad/trunk/src/util/pixembed.c brlcad/trunk/src/util/pixfieldsep.c brlcad/trunk/src/util/pixfilter.c brlcad/trunk/src/util/pixmatte.c brlcad/trunk/src/util/pixrot.c brlcad/trunk/src/util/pixscale.c brlcad/trunk/src/util/pixshrink.c brlcad/trunk/src/util/pixstat.c brlcad/trunk/src/util/plot3-asc.c brlcad/trunk/src/util/plot3-plot3.c brlcad/trunk/src/util/plot3-ps.c brlcad/trunk/src/util/plot3-tek.c brlcad/trunk/src/util/plot3debug.c brlcad/trunk/src/util/plot3getframe.c brlcad/trunk/src/util/plot3stat.c brlcad/trunk/src/util/rle-pix.c brlcad/trunk/src/util/rle_args.c brlcad/trunk/src/util/sun-pix.c Modified: brlcad/trunk/include/bu.h =================================================================== --- brlcad/trunk/include/bu.h 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/include/bu.h 2013-12-17 21:48:46 UTC (rev 58975) @@ -2518,7 +2518,7 @@ /**** CLASS II - Applications may read/write directly. **********/ void (*rbt_print)(void *); /**< Data pretty-print function */ int rbt_debug; /**< Debug bits */ - char *rbt_description; /**< Comment for diagnostics */ + const char *rbt_description; /**< Comment for diagnostics */ /*** CLASS III - Applications should NOT manipulate directly. ***/ int rbt_nm_orders; /**< Number of simultaneous orders */ @@ -4538,7 +4538,7 @@ * and the comparison functions (one per order). bu_rb_create() * returns a pointer to the red-black tree header record. */ -BU_EXPORT extern struct bu_rb_tree *bu_rb_create(char *description, int nm_orders, int (**order_funcs)()); +BU_EXPORT extern struct bu_rb_tree *bu_rb_create(const char *description, int nm_orders, int (**order_funcs)()); /** * Create a single-order red-black tree @@ -4553,7 +4553,7 @@ * function pointers, in order to avoid memory leaks on freeing the * tree, applications should call bu_rb_free1(), NOT bu_rb_free(). */ -BU_EXPORT extern struct bu_rb_tree *bu_rb_create1(char *description, int (*order_func)()); +BU_EXPORT extern struct bu_rb_tree *bu_rb_create1(const char *description, int (*order_func)()); /** @file libbu/rb_delete.c * Modified: brlcad/trunk/include/pkg.h =================================================================== --- brlcad/trunk/include/pkg.h 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/include/pkg.h 2013-12-17 21:48:46 UTC (rev 58975) @@ -52,7 +52,7 @@ struct pkg_conn; typedef void (*pkg_callback)(struct pkg_conn*, char*); -typedef void (*pkg_errlog)(char *msg); +typedef void (*pkg_errlog)(const char *msg); struct pkg_switch { unsigned short pks_type; /**< @brief Type code */ Modified: brlcad/trunk/src/fbserv/fbserv.c =================================================================== --- brlcad/trunk/src/fbserv/fbserv.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/fbserv/fbserv.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -299,7 +299,7 @@ * Don't send one down the wire, this can cause loops. */ static void -comm_error(char *str) +comm_error(const char *str) { #if defined(HAVE_SYSLOG_H) if ( use_syslog ) { Modified: brlcad/trunk/src/irprep/ir-X.c =================================================================== --- brlcad/trunk/src/irprep/ir-X.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/irprep/ir-X.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -84,8 +84,8 @@ XRectangle rect[MAXARR]; /* Array for drawing rectangles. */ char **a=(char **)NULL; /* Place holder for XSetStandard */ /* Properties. */ - char *winttl = "SEE"; /* Window title. */ - char *quit = "QUIT"; /* Exit label. */ + const char winttl[] = "SEE"; /* Window title. */ + const char quit[] = "QUIT"; /* Exit label. */ Font font; /* Structure for setting font. */ /* Other variables. */ Modified: brlcad/trunk/src/irprep/irdisp.c =================================================================== --- brlcad/trunk/src/irprep/irdisp.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/irprep/irdisp.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -40,7 +40,7 @@ main(void) { int ichoice; /* Choice. */ - char *irX = "ir-X"; /* Calls ir-X program. */ + char irX[] = "ir-X"; /* Calls ir-X program. */ char showtherm[125]; /* Calls showtherm program. */ char gfile[16]; /* .g file. */ char group[26]; /* Group names. */ Modified: brlcad/trunk/src/irprep/pictx.c =================================================================== --- brlcad/trunk/src/irprep/pictx.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/irprep/pictx.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -40,7 +40,7 @@ main(void) { int ichoice; /* Choice. */ - char *irX = "ir-X"; /* Calls ir-X program. */ + const char irX[] = "ir-X"; /* Calls ir-X program. */ char showtherm[125]; /* Calls showtherm program. */ char gfile[16]; /* .g file. */ char group[26]; /* Group names. */ Modified: brlcad/trunk/src/libbn/tcl.c =================================================================== --- brlcad/trunk/src/libbn/tcl.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/libbn/tcl.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -184,7 +184,7 @@ static struct math_func_link { - char *name; + const char *name; void (*func)(); } math_funcs[] = { {"bn_dist_pt2_lseg2", (void (*)())bn_dist_pt2_lseg2}, Modified: brlcad/trunk/src/libbu/rb_create.c =================================================================== --- brlcad/trunk/src/libbu/rb_create.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/libbu/rb_create.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -27,7 +27,7 @@ struct bu_rb_tree * -bu_rb_create(char *description, int nm_orders, int (**order_funcs)(void *, void *)) +bu_rb_create(const char *description, int nm_orders, int (**order_funcs)(void *, void *)) { int order; struct bu_rb_tree *tree; @@ -99,7 +99,7 @@ struct bu_rb_tree * -bu_rb_create1(char *description, int (*order_func) (/* ??? */)) +bu_rb_create1(const char *description, int (*order_func) (/* ??? */)) { int (**ofp)(); Modified: brlcad/trunk/src/libbu/tests/bu_redblack.c =================================================================== --- brlcad/trunk/src/libbu/tests/bu_redblack.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/libbu/tests/bu_redblack.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -63,7 +63,7 @@ { struct bu_rb_tree *testTree; void *searchedValue; - char *sources[] = {"h", "e", "a", "l", "l", "o"}; + const char *sources[] = {"h", "e", "a", "l", "l", "o"}; int i = 0; int passed = 0; @@ -74,7 +74,7 @@ testTree = bu_rb_create1("TestingTree", compareFunc); for (i = 0; i < 6; i++) - bu_rb_insert(testTree, sources[i]); + bu_rb_insert(testTree, (void *)sources[i]); printf("SEARCH TEST: \n\tSEARCHING AN EXISTING VALUE:\n"); searchedValue = bu_rb_search(testTree, 0, "h"); Modified: brlcad/trunk/src/libbu/tests/bu_str_isprint.c =================================================================== --- brlcad/trunk/src/libbu/tests/bu_str_isprint.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/libbu/tests/bu_str_isprint.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -28,7 +28,7 @@ int -test_str_isprint(char *inp , int exp) +test_str_isprint(const char *inp , int exp) { int res; res = bu_str_isprint(inp); Modified: brlcad/trunk/src/libfb/fbserv_obj.c =================================================================== --- brlcad/trunk/src/libfb/fbserv_obj.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/libfb/fbserv_obj.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -65,7 +65,7 @@ * Communication error. An error occurred on the PKG link. */ HIDDEN void -comm_error(char *str) +comm_error(const char *str) { bu_log("%s", str); } Modified: brlcad/trunk/src/libfb/if_remote.c =================================================================== --- brlcad/trunk/src/libfb/if_remote.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/libfb/if_remote.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -194,7 +194,7 @@ HIDDEN void -rem_log(char *msg) +rem_log(const char *msg) { fb_log("%s", msg); } Modified: brlcad/trunk/src/libpkg/pkg.c =================================================================== --- brlcad/trunk/src/libpkg/pkg.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/libpkg/pkg.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -238,7 +238,7 @@ * This is a private implementation function. */ static void -_pkg_errlog(char *s) +_pkg_errlog(const char *s) { if (_pkg_debug) { _pkg_timestamp(); @@ -257,7 +257,7 @@ * This is a private implementation function. */ static void -_pkg_perror(void (*errlog) (char *msg), char *s) +_pkg_perror(void (*errlog)(const char *msg), const char *s) { snprintf(_pkg_errbuf, MAX_PKG_ERRBUF_SIZE, "%s: ", s); @@ -285,7 +285,7 @@ */ static struct pkg_conn * -_pkg_makeconn(int fd, const struct pkg_switch *switchp, void (*errlog) (char *msg)) +_pkg_makeconn(int fd, const struct pkg_switch *switchp, void (*errlog)(const char *msg)) { struct pkg_conn *pc; @@ -350,7 +350,7 @@ struct pkg_conn * -pkg_open(const char *host, const char *service, const char *protocol, const char *uname, const char *UNUSED(passwd), const struct pkg_switch *switchp, void (*errlog) (char *msg)) +pkg_open(const char *host, const char *service, const char *protocol, const char *uname, const char *UNUSED(passwd), const struct pkg_switch *switchp, void (*errlog)(const char *msg)) { #ifdef HAVE_WINSOCK_H LPHOSTENT lpHostEntry; @@ -508,7 +508,7 @@ struct pkg_conn * -pkg_transerver(const struct pkg_switch *switchp, void (*errlog)(char *)) +pkg_transerver(const struct pkg_switch *switchp, void (*errlog)(const char *)) { struct pkg_conn *conn; @@ -534,7 +534,7 @@ * This is a private implementation function. */ static int -_pkg_permserver_impl(struct in_addr iface, const char *service, const char *protocol, int backlog, void (*errlog)(char *msg)) +_pkg_permserver_impl(struct in_addr iface, const char *service, const char *protocol, int backlog, void (*errlog)(const char *msg)) { struct servent *sp; int pkg_listenfd; @@ -700,7 +700,7 @@ int -pkg_permserver(const char *service, const char *protocol, int backlog, void (*errlog) (char *msg)) +pkg_permserver(const char *service, const char *protocol, int backlog, void (*errlog)(const char *msg)) { struct in_addr iface; iface.s_addr = INADDR_ANY; @@ -709,7 +709,7 @@ int -pkg_permserver_ip(const char *ipOrHostname, const char *service, const char *protocol, int backlog, void (*errlog)(char *msg)) +pkg_permserver_ip(const char *ipOrHostname, const char *service, const char *protocol, int backlog, void (*errlog)(const char *msg)) { struct hostent* host; struct in_addr iface; @@ -731,7 +731,7 @@ struct pkg_conn * -pkg_getclient(int fd, const struct pkg_switch *switchp, void (*errlog) (char *msg), int nodelay) +pkg_getclient(int fd, const struct pkg_switch *switchp, void (*errlog)(const char *msg), int nodelay) { int s2; #ifdef HAVE_WINSOCK_H Modified: brlcad/trunk/src/mged/fbserv.c =================================================================== --- brlcad/trunk/src/mged/fbserv.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/mged/fbserv.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -58,7 +58,7 @@ * Communication error. An error occurred on the PKG link. */ HIDDEN void -communications_error(char *str) +communications_error(const char *str) { bu_log(str); } Modified: brlcad/trunk/src/remrt/remrt.c =================================================================== --- brlcad/trunk/src/remrt/remrt.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/remrt/remrt.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -428,7 +428,7 @@ static void -remrt_log(char *msg) +remrt_log(const char *msg) { bu_log(msg); } Modified: brlcad/trunk/src/sig/dmod.c =================================================================== --- brlcad/trunk/src/sig/dmod.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/sig/dmod.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -37,7 +37,7 @@ #include "vmath.h" -char *progname = "dmod"; +const char progname[] = "dmod"; char *file_name = NULL; @@ -54,7 +54,7 @@ int op[256] = {0}; /* operations */ double val[256] = {0.0}; /* arguments to operations */ double buf[BUFLEN] = {0.0}; /* working buffer */ - +char hyphen[] = "-"; static const char usage[] = "Usage: dmod [-a add | -s sub | -m mult | -d div | -A | -e exp | -r root] [doubles]\n"; int @@ -110,7 +110,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; infp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/sig/imod.c =================================================================== --- brlcad/trunk/src/sig/imod.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/sig/imod.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -37,8 +37,9 @@ #include "bu.h" #include "vmath.h" - -char *progname = "(noname)"; +char noname[] = "(noname)"; +char hyphen[] = "hyphen"; +char *progname = noname; char *file_name = NULL; @@ -107,7 +108,7 @@ if (bu_optind >= argc) { if (isatty((int)fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; } else { char *ifname; file_name = argv[bu_optind]; Modified: brlcad/trunk/src/sig/istats.c =================================================================== --- brlcad/trunk/src/sig/istats.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/sig/istats.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -33,6 +33,7 @@ #include "bu.h" +char noname[] = "(noname)"; /* * U S A G E --- tell user how to invoke this program, then exit @@ -108,7 +109,7 @@ */ int main(int ac, char *av[]) { - char *progname = "(noname)"; + char *progname = noname; int arg_index; /* parse command flags Modified: brlcad/trunk/src/sig/smod.c =================================================================== --- brlcad/trunk/src/sig/smod.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/sig/smod.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -37,10 +37,10 @@ #include "bu.h" #include "vmath.h" +char smod[] = "smod"; +char *progname = smod; -char *progname = "smod"; - #define ADD 1 #define MULT 2 #define ABS 3 @@ -60,6 +60,7 @@ get_args(int argc, char *argv[]) { char *file_name; + char hyphen[] = "-"; int c; double d; @@ -110,7 +111,7 @@ if (bu_optind >= argc) { if (isatty((int)fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; } else { char *ifname; file_name = argv[bu_optind]; Modified: brlcad/trunk/src/sig/umod.c =================================================================== --- brlcad/trunk/src/sig/umod.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/sig/umod.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -37,8 +37,9 @@ #include "bu.h" #include "vmath.h" - -char *progname = "umod"; +char umod[] = "umod"; +char hyphen[] = "-"; +char *progname = umod; char *file_name = NULL; @@ -109,7 +110,7 @@ if (bu_optind >= argc) { if (isatty((int)fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; } else { char *ifname; file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/alias-pix.c =================================================================== --- brlcad/trunk/src/util/alias-pix.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/alias-pix.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -31,10 +31,10 @@ #include "bu.h" +char noname[] = "(noname)"; +char *progname = noname; -char *progname = "(noname)"; - void usage(void) { bu_exit(1, "Usage: %s [ -v ] < ALIASpixfile >BRLpixfile\n", progname); Modified: brlcad/trunk/src/util/azel.c =================================================================== --- brlcad/trunk/src/util/azel.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/azel.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -104,11 +104,16 @@ } +char Stdin[] = "stdin"; +char Stdout[] = "stdout"; + int main (int argc, char **argv) { - char *inFname = "stdin"; /* Name of input source */ - char *outFname = "stdout"; /* Name of output destination */ + char dhv[] = "DHV"; + char xyz[] = "XYZ"; + char *inFname = Stdin; /* Name of input source */ + char *outFname = Stdout; /* Name of output destination */ char *Label; /* Names of input coordinates */ char Tail[4096] = {0}; /* Rest of input line beyond coords */ FILE *inPtr = stdin; /* Pointer to input */ @@ -235,6 +240,7 @@ /* * * * * Filter Data * * * * */ Label = Invert ? "DHV" : "XYZ"; + Label = Invert ? dhv : xyz; while ((Ch = fpeek(inPtr)) != EOF) { /* Read U1, V1, and W1 of next point in input frame of reference */ Modified: brlcad/trunk/src/util/bw-imp.c =================================================================== --- brlcad/trunk/src/util/bw-imp.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/bw-imp.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -67,7 +67,8 @@ static int (*pattern)[8] = dither; /* -> dither or halftone */ static FILE *infp; /* input file handle */ -static char *file_name = "-"; /* name of input file, for banner */ +static const char hyphen[] = "hyphen"; +static const char *file_name = hyphen; /* name of input file, for banner */ static size_t height; /* input height */ static size_t width; /* input width */ @@ -134,7 +135,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return false; - file_name = "-"; + file_name = hyphen; infp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/bw-ps.c =================================================================== --- brlcad/trunk/src/util/bw-ps.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/bw-ps.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -48,6 +48,7 @@ static size_t pagewidth = 612; /* page size in points - 8.5 inches */ static size_t pageheight = 792; /* 11 inches */ +static char Stdin[] = "stdin"; static char *file_name; static FILE *infp; @@ -105,7 +106,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "[stdin]"; + file_name = Stdin; infp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/bwmod.c =================================================================== --- brlcad/trunk/src/util/bwmod.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/bwmod.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -39,9 +39,10 @@ #include "bu.h" #include "vmath.h" +char hyphen[] = "-"; +char noname[] = "(noname)"; +char *progname = noname; -char *progname = "(noname)"; - char *file_name; char usage[] = "\ @@ -143,7 +144,7 @@ if (bu_optind >= argc) { if (isatty((int)fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; } else { char *ifname; file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/bwrot.c =================================================================== --- brlcad/trunk/src/util/bwrot.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/bwrot.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -59,6 +59,7 @@ int plus90, minus90, reverse, invert; size_t pixbytes = 1; +char hyphen[] = "-"; int get_args(int argc, char **argv, FILE **ifp, FILE **ofp, double *angle) @@ -129,7 +130,7 @@ } if (bu_optind >= argc) { - in_file_name = "-"; + in_file_name = hyphen; } else { in_file_name = argv[bu_optind]; } Modified: brlcad/trunk/src/util/bwscale.c =================================================================== --- brlcad/trunk/src/util/bwscale.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/bwscale.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -63,6 +63,8 @@ Usage: bwscale [-r] [-s squareinsize] [-w inwidth] [-n inheight]\n\ [-S squareoutsize] [-W outwidth] [-N outheight] [in.bw] > out.bw\n"; +static char hyphen[] = "hyphen"; + static int get_args(int argc, char **argv) { @@ -122,7 +124,7 @@ if (isatty(fileno(stdin))) { return 0; } - file_name = "-"; + file_name = hyphen; buffp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/bwshrink.c =================================================================== --- brlcad/trunk/src/util/bwshrink.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/bwshrink.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -36,11 +36,12 @@ /* declarations to support use of bu_getopt() system call */ -char *options = "us:w:n:f:h?"; +char options[] = "us:w:n:f:h?"; +char noname[] = "(noname)"; +char Stdin[] = "(stdin)"; +char *progname = noname; +char *filename = Stdin; -char *progname = "(noname)"; -char *filename = "(stdin)"; - /* S H R I N K _ I M A G E */ void Modified: brlcad/trunk/src/util/cv.c =================================================================== --- brlcad/trunk/src/util/cv.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/cv.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -55,11 +55,14 @@ genptr_t ibuf; genptr_t obuf; +const char huc[] = "huc"; +const char nuc[] = "nuc"; + int main(int argc, char **argv) { - char *in_pat; - char *out_pat; + const char *in_pat; + const char *out_pat; int m; int n; @@ -70,7 +73,7 @@ in_pat = argv[1]; if (BU_STR_EQUAL(in_pat, "")) { - in_pat = "huc"; + in_pat = huc; } else if (strlen(in_pat) > 4 || strlen(in_pat) < 1) { fprintf(stderr, "cv: unrecognized input pattern\n"); return 1; @@ -78,7 +81,7 @@ out_pat = argv[2]; if (BU_STR_EQUAL(out_pat, "")) { - out_pat = "nuc"; + out_pat = nuc; } else if (strlen(out_pat) > 4 || strlen(out_pat) < 1) { fprintf(stderr, "cv: unrecognized output pattern\n"); return 1; Modified: brlcad/trunk/src/util/dsp_add.c =================================================================== --- brlcad/trunk/src/util/dsp_add.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/dsp_add.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -68,7 +68,7 @@ * tell user how to invoke this program, then exit */ static void -print_usage(char *s) +print_usage(const char *s) { if (s) (void)fputs(s, stderr); Modified: brlcad/trunk/src/util/dunncolor.c =================================================================== --- brlcad/trunk/src/util/dunncolor.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/dunncolor.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -41,7 +41,7 @@ extern void dunnopen(void); extern int ready(int nsecs); -extern void getexposure(char *title); +extern void getexposure(const char *title); extern int dunnsend(char color, int val); static char usage[] = "Usage: dunncolor [-p] baseval redval greenval blueval"; Modified: brlcad/trunk/src/util/dunncomm.c =================================================================== --- brlcad/trunk/src/util/dunncomm.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/dunncomm.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -321,7 +321,7 @@ * Get and print the current exposure */ void -getexposure(char *title) +getexposure(const char *title) { struct timeval waittime; int readval; Modified: brlcad/trunk/src/util/dunnsnap.c =================================================================== --- brlcad/trunk/src/util/dunnsnap.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/dunnsnap.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -40,7 +40,7 @@ extern char cmd; extern void dunnopen(void); extern int ready(int nsecs); -extern void getexposure(char *title); +extern void getexposure(const char *title); extern int dunnsend(char color, int val); extern int goodstatus(void); extern void hangten(void); Modified: brlcad/trunk/src/util/hex.c =================================================================== --- brlcad/trunk/src/util/hex.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/hex.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -37,8 +37,9 @@ /* declarations to support use of bu_getopt() system call */ -static char *options = "o:"; -static char *progname = "(noname)"; +static char options[] = "o:"; +static char noname[] = "(noname)"; +static char *progname = noname; static off_t offset=0; /* offset from beginning of file from which to start */ Modified: brlcad/trunk/src/util/mac-pix.c =================================================================== --- brlcad/trunk/src/util/mac-pix.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/mac-pix.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -70,6 +70,7 @@ int scr_yoff; int bwflag; +char hyphen[] = "-"; char *file_name; FILE *infp; @@ -163,7 +164,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; infp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/pix-alias.c =================================================================== --- brlcad/trunk/src/util/pix-alias.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pix-alias.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -46,9 +46,10 @@ /* declarations to support use of bu_getopt() system call */ -char *options = "hs:w:n:"; +char options[] = "hs:w:n:"; char optflags[sizeof(options)]; -char *progname = "(noname)"; +char noname[] = "(noname)"; +char *progname = noname; int x=512; int y=512; Modified: brlcad/trunk/src/util/pix-ps.c =================================================================== --- brlcad/trunk/src/util/pix-ps.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pix-ps.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -132,6 +132,7 @@ putc(symbol[low], fp); } +char Stdin[] = "[stdin]"; int get_args(int argc, char **argv) @@ -182,7 +183,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "[stdin]"; + file_name = Stdin; infp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/pix-sun.c =================================================================== --- brlcad/trunk/src/util/pix-sun.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pix-sun.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -36,9 +36,10 @@ /* declarations to support use of bu_getopt() system call */ -char *options = "hs:w:n:d"; +char options[] = "hs:w:n:d"; char optflags[sizeof(options)]; -char *progname = "(noname)"; +char noname[] = "(noname)"; +char *progname = noname; int dither = 0; #define MAPSIZE 256 /* Number of unique color values in Sun Colormap */ Modified: brlcad/trunk/src/util/pix3filter.c =================================================================== --- brlcad/trunk/src/util/pix3filter.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pix3filter.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -46,8 +46,8 @@ /* The filter kernels */ struct kernels { - char *name; - char *uname; /* What is needed to recognize it */ + const char *name; + const char *uname; /* What is needed to recognize it */ int kern[27]; int kerndiv; /* Divisor for kernel */ int kernoffset; /* To be added to result */ @@ -80,7 +80,7 @@ char *file_name; FILE *oldfp, *curfp, *newfp; -void select_filter(char *str), dousage(void); +void select_filter(const char *str), dousage(void); char usage[] = "\ Usage: pix3filter [-f<type>] [-v] [-d#] [-o#]\n\ @@ -396,7 +396,7 @@ * on it. */ void -select_filter(char *str) +select_filter(const char *str) { int i; Modified: brlcad/trunk/src/util/pixcolors.c =================================================================== --- brlcad/trunk/src/util/pixcolors.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixcolors.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -37,9 +37,10 @@ /* declarations to support use of bu_getopt() system call */ -char *options = "v"; +char options[] = "v"; char verbose = 0; -char *progname = "(noname)"; +char noname[] = "(noname)"; +char *progname = noname; #define PIXELS 1024 unsigned char pixbuf[BUFSIZ*3]; Modified: brlcad/trunk/src/util/pixdsplit.c =================================================================== --- brlcad/trunk/src/util/pixdsplit.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixdsplit.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -76,9 +76,15 @@ int cfd = -1; /* " " */ int dfd = -1; /* " " */ ssize_t ret; + char hyphen[] = "-"; + char empty_string[] = ""; + char Stdout[] = "stdout"; + c_per_p = 3; + d_per_p = 1; - c_per_p = 3; cf_name = "-"; - d_per_p = 1; df_name = ""; + cf_name = hyphen; + df_name = empty_string; + while ((ch = bu_getopt(argc, argv, OPT_STRING)) != -1) switch (ch) { case 'd': @@ -141,9 +147,9 @@ * Establish the output stream for chars */ if (*cf_name == '\0') { - cf_name = 0; + cf_name = NULL; } else if ((*cf_name == '-') && (*(cf_name + 1) == '\0')) { - cf_name = "stdout"; + cf_name = Stdout; cfd = 1; } else if ((cfd = open(cf_name, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644)) == -1) { bu_log("Cannot open file '%s'\n", cf_name); @@ -153,9 +159,9 @@ * Establish the output stream for doubles */ if (*df_name == '\0') { - df_name = 0; + df_name = NULL; } else if ((*df_name == '-') && (*(df_name + 1) == '\0')) { - df_name = "stdout"; + df_name = Stdout; dfd = 1; } else if ((dfd = open(df_name, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644)) == -1) { bu_log("Cannot open file '%s'\n", df_name); Modified: brlcad/trunk/src/util/pixelswap.c =================================================================== --- brlcad/trunk/src/util/pixelswap.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixelswap.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -33,8 +33,9 @@ #include "fb.h" -char *options = "hd:"; -char *progname = "(noname)"; +char options[] = "hd:"; +char noname[] = "(noname)"; +char *progname = noname; int depth = 3; unsigned char ibuf[32767 * 3]; @@ -46,7 +47,7 @@ /* * U S A G E --- tell user how to invoke this program, then exit */ -void usage(char *s) +void usage(const char *s) { if (s) (void)fputs(s, stderr); Modified: brlcad/trunk/src/util/pixembed.c =================================================================== --- brlcad/trunk/src/util/pixembed.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixembed.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -53,6 +53,8 @@ [-s squareinsize] [-w inwidth] [-n inheight]\n\ [-S squareoutsize] [-W outwidth] [-N outheight] [in.pix] > out.pix\n"; +char hyphen[] = "-"; + /* * G E T _ A R G S */ @@ -99,7 +101,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; buffp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/pixfieldsep.c =================================================================== --- brlcad/trunk/src/util/pixfieldsep.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixfieldsep.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -39,8 +39,10 @@ size_t bytes_per_sample = 3; int doubleit = 0; -char *even_file = "even.pix"; -char *odd_file = "odd.pix"; +char Even_file[] = "even.pix"; +char Odd_file[] = "odd.pix"; +char *even_file = Even_file; +char *odd_file = Odd_file; static char usage[] = "\ Usage: pixfieldsep [-w file_width] [-s square_size] [-# nbytes/pixel] \n\ Modified: brlcad/trunk/src/util/pixfilter.c =================================================================== --- brlcad/trunk/src/util/pixfilter.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixfilter.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -41,8 +41,8 @@ /* The filter kernels */ struct kernels { - char *name; - char *uname; /* What is needed to recognize it */ + const char *name; + const char *uname; /* What is needed to recognize it */ int kern[9]; int kerndiv; /* Divisor for kernel */ int kernoffset; /* To be added to result */ @@ -69,12 +69,14 @@ char *file_name; FILE *infp; -void select_filter(char *str), dousage(void); +void select_filter(const char *str), dousage(void); char usage[] = "\ Usage: pixfilter [-f type] [-v] [-d div] [-o offset]\n\ [-s squaresize] [-w width] [-n height] [file.pix] > file.pix\n"; +char hyphen[] = "-"; + int get_args(int argc, char **argv) { @@ -113,7 +115,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; infp = stdin; } else { file_name = argv[bu_optind]; @@ -242,7 +244,7 @@ * based on it. */ void -select_filter(char *str) +select_filter(const char *str) { int i; Modified: brlcad/trunk/src/util/pixmatte.c =================================================================== --- brlcad/trunk/src/util/pixmatte.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixmatte.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -83,7 +83,7 @@ void -usage(char *s, int n) +usage(const char *s, int n) { if (s && *s) (void)fputs(s, stderr); Modified: brlcad/trunk/src/util/pixrot.c =================================================================== --- brlcad/trunk/src/util/pixrot.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixrot.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -68,6 +68,8 @@ static char *file_name; FILE *ifp, *ofp; +static char hyphen[] = "-"; + int get_args(int argc, char **argv) { @@ -117,7 +119,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; ifp = stdin; } else { file_name = argv[bu_optind]; @@ -153,8 +155,8 @@ bu_exit(2, "pixrot: I'm not compiled to do a scanline that long!\n"); } if (buflines > nyin) buflines = nyin; - buffer = malloc(buflines * scanbytes); - obuf = (nyin > nxin) ? malloc(nyin * pixbytes) : malloc(nxin * pixbytes); + buffer = (unsigned char *)malloc(buflines * scanbytes); + obuf = (nyin > nxin) ? (unsigned char *)malloc(nyin * pixbytes) : (unsigned char *)malloc(nxin * pixbytes); if (buffer == (unsigned char *)0 || obuf == (unsigned char *)0) { bu_exit(3, "pixrot: malloc failed\n"); } Modified: brlcad/trunk/src/util/pixscale.c =================================================================== --- brlcad/trunk/src/util/pixscale.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixscale.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -52,6 +52,7 @@ ssize_t bufy; /* y coordinate in buffer */ FILE *buffp; static char *file_name; +static char hyphen[] = "-"; int rflag = 0; int inx = 512; @@ -391,7 +392,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; buffp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/pixshrink.c =================================================================== --- brlcad/trunk/src/util/pixshrink.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixshrink.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -35,10 +35,12 @@ #define UCHAR unsigned char /* declarations to support use of bu_getopt() system call */ -char *options = "us:w:n:f:h?"; +char options[] = "us:w:n:f:h?"; -char *progname = "(noname)"; -char *filename = "(stdin)"; +char noname[] = "(noname)"; +char Stdin[] = "(stdin)"; +char *progname = noname; +char *filename = Stdin; void shrink_image(int scanlen, int Width, int Height, unsigned char *buffer, int Factor), usample_image(int scanlen, int Width, int Height, unsigned char *buffer, int Factor); Modified: brlcad/trunk/src/util/pixstat.c =================================================================== --- brlcad/trunk/src/util/pixstat.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/pixstat.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -49,7 +49,7 @@ int verbose = 0; /* our statistics pool */ -struct { +struct rgb { long bin[256]; int max, min, mode, median; double mean, var, skew; Modified: brlcad/trunk/src/util/plot3-asc.c =================================================================== --- brlcad/trunk/src/util/plot3-asc.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/plot3-asc.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -43,7 +43,7 @@ struct uplot { int targ; /* type of args */ int narg; /* number or args */ - char *desc; /* description */ + const char *desc; /* description */ }; struct uplot uerror = { 0, 0, 0 }; struct uplot letters[] = { Modified: brlcad/trunk/src/util/plot3-plot3.c =================================================================== --- brlcad/trunk/src/util/plot3-plot3.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/plot3-plot3.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -37,7 +37,7 @@ struct uplot { int targ; /* type of args */ int narg; /* number or args */ - char *desc; /* description */ + const char *desc; /* description */ int t3d; /* non-zero if 3D */ }; Modified: brlcad/trunk/src/util/plot3-ps.c =================================================================== --- brlcad/trunk/src/util/plot3-ps.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/plot3-ps.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -45,7 +45,7 @@ struct uplot { int targ; /* type of args */ int narg; /* number or args */ - char *desc; /* description */ + const char *desc; /* description */ }; struct uplot uerror = { 0, 0, 0 }; struct uplot letters[] = { @@ -128,6 +128,7 @@ int ypoints; int page_dirty = 0; /* to skip extra erases */ +static char Stdin[] = "[stdin]"; static char *file_name; static FILE *infp; @@ -390,7 +391,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "[stdin]"; + file_name = Stdin; infp = stdin; } else { file_name = argv[bu_optind]; Modified: brlcad/trunk/src/util/plot3-tek.c =================================================================== --- brlcad/trunk/src/util/plot3-tek.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/plot3-tek.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -42,7 +42,7 @@ struct uplot { int targ; /* type of args */ int narg; /* number or args */ - char *desc; /* description */ + const char *desc; /* description */ int t3d; /* non-zero if 3D */ }; Modified: brlcad/trunk/src/util/plot3debug.c =================================================================== --- brlcad/trunk/src/util/plot3debug.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/plot3debug.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -48,7 +48,7 @@ struct uplot { int targ; /* type of args */ int narg; /* number or args */ - char *desc; /* description */ + const char *desc; /* description */ }; struct uplot uerror = { 0, 0, 0 }; struct uplot letters[] = { Modified: brlcad/trunk/src/util/plot3getframe.c =================================================================== --- brlcad/trunk/src/util/plot3getframe.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/plot3getframe.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -43,7 +43,7 @@ struct uplot { int targ; /* type of args */ int narg; /* number or args */ - char *desc; /* description */ + const char *desc; /* description */ }; struct uplot uerror = { 0, 0, 0 }; struct uplot letters[] = { Modified: brlcad/trunk/src/util/plot3stat.c =================================================================== --- brlcad/trunk/src/util/plot3stat.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/plot3stat.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -43,7 +43,7 @@ struct uplot { int targ; /* type of args */ int narg; /* number or args */ - char *desc; /* description */ + const char *desc; /* description */ }; struct uplot uerror = { 0, 0, 0 }; struct uplot letters[] = { Modified: brlcad/trunk/src/util/rle-pix.c =================================================================== --- brlcad/trunk/src/util/rle-pix.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/rle-pix.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -39,6 +39,7 @@ */ #include "rle.h" +static char hyphen[] = "-"; static FILE *infp; static char *infile; static FILE *outfp; @@ -127,7 +128,7 @@ } bu_optind++; } else { - infile = "-"; + infile = hyphen; } if (argv[bu_optind] != NULL) { if (bu_file_exists(argv[bu_optind], NULL)) { Modified: brlcad/trunk/src/util/rle_args.c =================================================================== --- brlcad/trunk/src/util/rle_args.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/rle_args.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -23,6 +23,7 @@ #include "bu.h" #include "bio.h" +char hyphen[] = "hyphen"; int get_args(int argc, char **argv, rle_hdr *outrle, FILE** infp, char** infile, int **background, size_t* file_width, size_t* file_height) @@ -65,7 +66,7 @@ } bu_optind++; } else { - *infile = "-"; + *infile = hyphen; } if (argv[bu_optind] != NULL) { if (bu_file_exists(argv[bu_optind], NULL)) { Modified: brlcad/trunk/src/util/sun-pix.c =================================================================== --- brlcad/trunk/src/util/sun-pix.c 2013-12-17 19:34:04 UTC (rev 58974) +++ brlcad/trunk/src/util/sun-pix.c 2013-12-17 21:48:46 UTC (rev 58975) @@ -101,6 +101,7 @@ struct colors Cmap[256]; static size_t CMAP_MAX_INDEX = sizeof(Cmap) - 1; +static char hyphen[] = "-"; static char *file_name; static FILE *fp; @@ -157,7 +158,7 @@ if (bu_optind >= argc) { if (isatty(fileno(stdin))) return 0; - file_name = "-"; + file_name = hyphen; fp = stdin; } else { file_name = argv[bu_optind]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |