X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftrace%2Ftrace_buf.c;h=46baba4796b2e33108cf3d3ceaf41180cb6bf675;hp=6345acc035fc48c37b8bf4b1c24a15b3ee9d93d6;hb=48c8a4fe456e83238533fb42b36fd5253db22f59;hpb=8f527f87c0b979d9c2598ef5c3394463af288468 diff --git a/ncurses/trace/trace_buf.c b/ncurses/trace/trace_buf.c index 6345acc0..46baba47 100644 --- a/ncurses/trace/trace_buf.c +++ b/ncurses/trace/trace_buf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -35,7 +35,9 @@ #include -MODULE_ID("$Id: trace_buf.c,v 1.14 2008/08/03 15:13:56 tom Exp $") +MODULE_ID("$Id: trace_buf.c,v 1.17 2011/01/22 19:48:16 tom Exp $") + +#ifdef TRACE #define MyList _nc_globals.tracebuf_ptr #define MySize _nc_globals.tracebuf_used @@ -47,7 +49,7 @@ _nc_trace_alloc(int bufnum, size_t want) if (bufnum >= 0) { if ((size_t) (bufnum + 1) > MySize) { - size_t need = (bufnum + 1) * 2; + size_t need = (size_t) (bufnum + 1) * 2; if ((MyList = typeRealloc(TRACEBUF, need, MyList)) != 0) { while (need > MySize) MyList[MySize++].text = 0; @@ -112,3 +114,6 @@ _nc_trace_bufcat(int bufnum, const char *value) } return buffer; } +#else +EMPTY_MODULE(_nc_empty_trace_buf) +#endif /* TRACE */