Revision: 69979 http://sourceforge.net/p/brlcad/code/69979 Author: bob1961 Date: 2017-07-21 15:17:46 +0000 (Fri, 21 Jul 2017) Log Message: ----------- Renamed a few things to avoid possible name conflicts when linking static libs together. This only covers what was found when static linking a few of the libs.
Modified Paths: -------------- brlcad/trunk/src/libfb/fb_generic.c brlcad/trunk/src/libfb/fb_private.h brlcad/trunk/src/libfb/if_null.c brlcad/trunk/src/libged/coil.c brlcad/trunk/src/libged/png2fb.c brlcad/trunk/src/libtclcad/cmdhist_obj.c Modified: brlcad/trunk/src/libfb/fb_generic.c =================================================================== --- brlcad/trunk/src/libfb/fb_generic.c 2017-07-21 14:25:11 UTC (rev 69978) +++ brlcad/trunk/src/libfb/fb_generic.c 2017-07-21 15:17:46 UTC (rev 69979) @@ -79,7 +79,7 @@ /* never get any of the following by default */ &stk_interface, &memory_interface, - &null_interface, + &fb_null_interface, (fb *) 0 }; Modified: brlcad/trunk/src/libfb/fb_private.h =================================================================== --- brlcad/trunk/src/libfb/fb_private.h 2017-07-21 14:25:11 UTC (rev 69978) +++ brlcad/trunk/src/libfb/fb_private.h 2017-07-21 15:17:46 UTC (rev 69979) @@ -58,7 +58,7 @@ /* Always included */ FB_EXPORT extern fb debug_interface, disk_interface, stk_interface; -FB_EXPORT extern fb memory_interface, null_interface; +FB_EXPORT extern fb memory_interface, fb_null_interface; /* Shared memory (shmget et. al.) key common to multiple framebuffers */ Modified: brlcad/trunk/src/libfb/if_null.c =================================================================== --- brlcad/trunk/src/libfb/if_null.c 2017-07-21 14:25:11 UTC (rev 69978) +++ brlcad/trunk/src/libfb/if_null.c 2017-07-21 15:17:46 UTC (rev 69979) @@ -37,7 +37,7 @@ HIDDEN int -null_fb_open(fb *ifp, const char *UNUSED(file), int width, int height) +_fb_null_open(fb *ifp, const char *UNUSED(file), int width, int height) { FB_CK_FB(ifp); @@ -50,7 +50,7 @@ } HIDDEN struct fb_platform_specific * -null_get_fbps(uint32_t UNUSED(magic)) +_fb_null_get_fbps(uint32_t UNUSED(magic)) { return NULL; } @@ -57,37 +57,37 @@ HIDDEN void -null_put_fbps(struct fb_platform_specific *UNUSED(fbps)) +_fb_null_put_fbps(struct fb_platform_specific *UNUSED(fbps)) { return; } HIDDEN int -null_fb_open_existing(fb *UNUSED(ifp), int UNUSED(width), int UNUSED(height), struct fb_platform_specific *UNUSED(fb_p)) +_fb_null_open_existing(fb *UNUSED(ifp), int UNUSED(width), int UNUSED(height), struct fb_platform_specific *UNUSED(fb_p)) { return 0; } HIDDEN int -null_close_existing(fb *UNUSED(ifp)) +_fb_null_close_existing(fb *UNUSED(ifp)) { return 0; } HIDDEN int -null_configure_window(fb *UNUSED(ifp), int UNUSED(width), int UNUSED(height)) +_fb_null_configure_window(fb *UNUSED(ifp), int UNUSED(width), int UNUSED(height)) { return 0; } HIDDEN int -null_refresh(fb *UNUSED(ifp), int UNUSED(x), int UNUSED(y), int UNUSED(w), int UNUSED(h)) +_fb_null_refresh(fb *UNUSED(ifp), int UNUSED(x), int UNUSED(y), int UNUSED(w), int UNUSED(h)) { return 0; } HIDDEN int -null_close(fb *ifp) +_fb_null_close(fb *ifp) { FB_CK_FB(ifp); @@ -96,7 +96,7 @@ HIDDEN int -null_clear(fb *ifp, unsigned char *UNUSED(pp)) +_fb_null_clear(fb *ifp, unsigned char *UNUSED(pp)) { FB_CK_FB(ifp); @@ -105,7 +105,7 @@ HIDDEN ssize_t -null_read(fb *ifp, int UNUSED(x), int UNUSED(y), unsigned char *UNUSED(pixelp), size_t count) +_fb_null_read(fb *ifp, int UNUSED(x), int UNUSED(y), unsigned char *UNUSED(pixelp), size_t count) { FB_CK_FB(ifp); @@ -114,7 +114,7 @@ HIDDEN ssize_t -null_write(fb *ifp, int UNUSED(x), int UNUSED(y), const unsigned char *UNUSED(pixelp), size_t count) +_fb_null_write(fb *ifp, int UNUSED(x), int UNUSED(y), const unsigned char *UNUSED(pixelp), size_t count) { FB_CK_FB(ifp); @@ -123,7 +123,7 @@ HIDDEN int -null_rmap(fb *ifp, ColorMap *UNUSED(cmp)) +_fb_null_rmap(fb *ifp, ColorMap *UNUSED(cmp)) { FB_CK_FB(ifp); @@ -132,7 +132,7 @@ HIDDEN int -null_wmap(fb *ifp, const ColorMap *UNUSED(cmp)) +_fb_null_wmap(fb *ifp, const ColorMap *UNUSED(cmp)) { FB_CK_FB(ifp); @@ -141,7 +141,7 @@ HIDDEN int -null_view(fb *ifp, int UNUSED(xcenter), int UNUSED(ycenter), int UNUSED(xzoom), int UNUSED(yzoom)) +_fb_null_view(fb *ifp, int UNUSED(xcenter), int UNUSED(ycenter), int UNUSED(xzoom), int UNUSED(yzoom)) { FB_CK_FB(ifp); @@ -151,7 +151,7 @@ HIDDEN int -null_getview(fb *ifp, int *UNUSED(xcenter), int *UNUSED(ycenter), int *UNUSED(xzoom), int *UNUSED(yzoom)) +_fb_null_getview(fb *ifp, int *UNUSED(xcenter), int *UNUSED(ycenter), int *UNUSED(xzoom), int *UNUSED(yzoom)) { FB_CK_FB(ifp); @@ -161,7 +161,7 @@ HIDDEN int -null_setcursor(fb *ifp, const unsigned char *UNUSED(bits), int UNUSED(xbits), int UNUSED(ybits), int UNUSED(xorig), int UNUSED(yorig)) +_fb_null_setcursor(fb *ifp, const unsigned char *UNUSED(bits), int UNUSED(xbits), int UNUSED(ybits), int UNUSED(xorig), int UNUSED(yorig)) { FB_CK_FB(ifp); @@ -170,7 +170,7 @@ HIDDEN int -null_cursor(fb *ifp, int UNUSED(mode), int UNUSED(x), int UNUSED(y)) +_fb_null_cursor(fb *ifp, int UNUSED(mode), int UNUSED(x), int UNUSED(y)) { FB_CK_FB(ifp); @@ -180,7 +180,7 @@ HIDDEN int -null_getcursor(fb *ifp, int *UNUSED(mode), int *UNUSED(x), int *UNUSED(y)) +_fb_null_getcursor(fb *ifp, int *UNUSED(mode), int *UNUSED(x), int *UNUSED(y)) { FB_CK_FB(ifp); @@ -190,7 +190,7 @@ HIDDEN int -null_readrect(fb *ifp, int UNUSED(xmin), int UNUSED(ymin), int width, int height, unsigned char *UNUSED(pp)) +_fb_null_readrect(fb *ifp, int UNUSED(xmin), int UNUSED(ymin), int width, int height, unsigned char *UNUSED(pp)) { FB_CK_FB(ifp); @@ -199,7 +199,7 @@ HIDDEN int -null_writerect(fb *ifp, int UNUSED(xmin), int UNUSED(ymin), int width, int height, const unsigned char *UNUSED(pp)) +_fb_null_writerect(fb *ifp, int UNUSED(xmin), int UNUSED(ymin), int width, int height, const unsigned char *UNUSED(pp)) { FB_CK_FB(ifp); @@ -208,7 +208,7 @@ HIDDEN int -null_poll(fb *ifp) +_fb_null_poll(fb *ifp) { FB_CK_FB(ifp); @@ -217,7 +217,7 @@ HIDDEN int -null_flush(fb *ifp) +_fb_null_flush(fb *ifp) { FB_CK_FB(ifp); @@ -226,7 +226,7 @@ HIDDEN int -null_free(fb *ifp) +_fb_null_free(fb *ifp) { FB_CK_FB(ifp); @@ -235,18 +235,18 @@ HIDDEN int -null_help(fb *ifp) +_fb_null_help(fb *ifp) { FB_CK_FB(ifp); - fb_log("Description: %s\n", null_interface.if_type); + fb_log("Description: %s\n", fb_null_interface.if_type); fb_log("Device: %s\n", ifp->if_name); fb_log("Max width/height: %d %d\n", - null_interface.if_max_width, - null_interface.if_max_height); + fb_null_interface.if_max_width, + fb_null_interface.if_max_height); fb_log("Default width/height: %d %d\n", - null_interface.if_width, - null_interface.if_height); + fb_null_interface.if_width, + fb_null_interface.if_height); fb_log("Useful for Benchmarking/Debugging\n"); return 0; } @@ -253,35 +253,35 @@ /* This is the ONLY thing that we normally "export" */ -fb null_interface = { +fb fb_null_interface = { 0, FB_NULL_MAGIC, - null_fb_open, /* device_open */ - null_fb_open_existing, /* existing device_open */ - null_close_existing,/* existing device_close */ - null_get_fbps, - null_put_fbps, - null_close, /* device_close */ - null_clear, /* device_clear */ - null_read, /* buffer_read */ - null_write, /* buffer_write */ - null_rmap, /* colormap_read */ - null_wmap, /* colormap_write */ - null_view, /* set view */ - null_getview, /* get view */ - null_setcursor, /* define cursor */ - null_cursor, /* set cursor */ - null_getcursor, /* get cursor */ - null_readrect, /* rectangle read */ - null_writerect, /* rectangle write */ - null_readrect, /* bw rectangle read */ - null_writerect, /* bw rectangle write */ - null_configure_window, - null_refresh, - null_poll, /* handle events */ - null_flush, /* flush output */ - null_free, /* free resources */ - null_help, /* help message */ + _fb_null_open, /* device_open */ + _fb_null_open_existing, /* existing device_open */ + _fb_null_close_existing,/* existing device_close */ + _fb_null_get_fbps, + _fb_null_put_fbps, + _fb_null_close, /* device_close */ + _fb_null_clear, /* device_clear */ + _fb_null_read, /* buffer_read */ + _fb_null_write, /* buffer_write */ + _fb_null_rmap, /* colormap_read */ + _fb_null_wmap, /* colormap_write */ + _fb_null_view, /* set view */ + _fb_null_getview, /* get view */ + _fb_null_setcursor, /* define cursor */ + _fb_null_cursor, /* set cursor */ + _fb_null_getcursor, /* get cursor */ + _fb_null_readrect, /* rectangle read */ + _fb_null_writerect, /* rectangle write */ + _fb_null_readrect, /* bw rectangle read */ + _fb_null_writerect, /* bw rectangle write */ + _fb_null_configure_window, + _fb_null_refresh, + _fb_null_poll, /* handle events */ + _fb_null_flush, /* flush output */ + _fb_null_free, /* free resources */ + _fb_null_help, /* help message */ "Null Device", /* device description */ 32*1024, /* max width */ 32*1024, /* max height */ Modified: brlcad/trunk/src/libged/coil.c =================================================================== --- brlcad/trunk/src/libged/coil.c 2017-07-21 14:25:11 UTC (rev 69978) +++ brlcad/trunk/src/libged/coil.c 2017-07-21 15:17:46 UTC (rev 69979) @@ -312,7 +312,8 @@ } -void usage(struct ged *gedp) +static void +usage(struct ged *gedp) { bu_vls_printf(gedp->ged_result_str, "Usage: coil [-d mean_outer_diameter] [-w wire_diameter] [-H helix_angle] [-p pitch]\n"); bu_vls_printf(gedp->ged_result_str, " [-n number_of_turns] [-s start_cap_type] [-e end_cap_type]\n"); Modified: brlcad/trunk/src/libged/png2fb.c =================================================================== --- brlcad/trunk/src/libged/png2fb.c 2017-07-21 14:25:11 UTC (rev 69978) +++ brlcad/trunk/src/libged/png2fb.c 2017-07-21 15:17:46 UTC (rev 69979) @@ -57,7 +57,7 @@ [-x file_xoff] [-y file_yoff] [-X scr_xoff] [-Y scr_yoff]\n\ [-S squarescrsize] [file.png]\n"; -int +static int get_args(int argc, char **argv) { int c; Modified: brlcad/trunk/src/libtclcad/cmdhist_obj.c =================================================================== --- brlcad/trunk/src/libtclcad/cmdhist_obj.c 2017-07-21 14:25:11 UTC (rev 69978) +++ brlcad/trunk/src/libtclcad/cmdhist_obj.c 2017-07-21 15:17:46 UTC (rev 69979) @@ -84,7 +84,7 @@ HIDDEN int -cmdhist_timediff(struct timeval *tvdiff, struct timeval *start, struct timeval *finish) +_tclcad_cmdhist_timediff(struct timeval *tvdiff, struct timeval *start, struct timeval *finish) { if (UNLIKELY(finish->tv_sec == 0 && finish->tv_usec == 0)) return -1; @@ -152,7 +152,7 @@ bu_vls_trunc(&str, 0); hp_prev = BU_LIST_PREV(tclcad_cmdhist, &hp->l); if (with_delays && BU_LIST_NOT_HEAD(hp_prev, &chop->cho_head.l)) { - if (cmdhist_timediff(&tvdiff, &(hp_prev->h_finish), &(hp->h_start)) >= 0) + if (_tclcad_cmdhist_timediff(&tvdiff, &(hp_prev->h_finish), &(hp->h_start)) >= 0) bu_vls_printf(&str, "delay %ld %ld\n", (long)tvdiff.tv_sec, (long)tvdiff.tv_usec); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits