From: Pavel Charvat Date: Thu, 30 Oct 2008 09:33:49 +0000 (+0100) Subject: Get rid of the "new" C++ keywords in ucwlib headers. X-Git-Tag: holmes-import~231 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=33ee0ee20ddac8ea99f501dcedc260fa9e0b2d3d;p=libucw.git Get rid of the "new" C++ keywords in ucwlib headers. --- diff --git a/ucw/lib.h b/ucw/lib.h index e4352ee8..e56cfad1 100644 --- a/ucw/lib.h +++ b/ucw/lib.h @@ -155,7 +155,7 @@ timestamp_t get_timestamp(void); void init_timer(timestamp_t *timer); uns get_timer(timestamp_t *timer); -uns switch_timer(timestamp_t *old, timestamp_t *new); +uns switch_timer(timestamp_t *oldt, timestamp_t *newt); /* random.c */ @@ -208,7 +208,7 @@ typedef int (*ucw_sighandler_t)(int); // gets signum, returns nonzero if abort() void handle_signal(int signum); void unhandle_signal(int signum); -ucw_sighandler_t set_signal_handler(int signum, ucw_sighandler_t new); +ucw_sighandler_t set_signal_handler(int signum, ucw_sighandler_t newh); /* bigalloc.c */ diff --git a/ucw/sighandler.c b/ucw/sighandler.c index cfd09c0b..9cc5f2ae 100644 --- a/ucw/sighandler.c +++ b/ucw/sighandler.c @@ -53,12 +53,12 @@ unhandle_signal(int signum) } ucw_sighandler_t -set_signal_handler(int signum, ucw_sighandler_t new) +set_signal_handler(int signum, ucw_sighandler_t newh) { struct ucwlib_context *ctx = ucwlib_thread_context(); if (!ctx->signal_handlers) ctx->signal_handlers = xmalloc_zero(NSIG * sizeof(ucw_sighandler_t)); ucw_sighandler_t old = ctx->signal_handlers[signum]; - ctx->signal_handlers[signum] = new; + ctx->signal_handlers[signum] = newh; return old; } diff --git a/ucw/timer.c b/ucw/timer.c index 54d82779..41f51f94 100644 --- a/ucw/timer.c +++ b/ucw/timer.c @@ -36,8 +36,8 @@ get_timer(timestamp_t *timer) } uns -switch_timer(timestamp_t *old, timestamp_t *new) +switch_timer(timestamp_t *oldt, timestamp_t *newt) { - *new = get_timestamp(); - return MIN(*new-*old, ~0U); + *newt = get_timestamp(); + return MIN(*newt-*oldt, ~0U); }