]> mj.ucw.cz Git - libucw.git/commitdiff
Get rid of the "new" C++ keywords in ucwlib headers.
authorPavel Charvat <pchar@ucw.cz>
Thu, 30 Oct 2008 09:33:49 +0000 (10:33 +0100)
committerPavel Charvat <pchar@ucw.cz>
Thu, 30 Oct 2008 09:33:49 +0000 (10:33 +0100)
ucw/lib.h
ucw/sighandler.c
ucw/timer.c

index e4352ee85d9e7a675262e839b15302a1e164b0c7..e56cfad1e041a30af3b34ef9cecc7669cb3e3f9a 100644 (file)
--- 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 */
 
index cfd09c0b3a6aaf2993d63176f36a76be6ad595cf..9cc5f2aed26579b56ecb311884073827ba50260d 100644 (file)
@@ -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;
 }
index 54d8277999b6791ace44faee5ff585e254dc6509..41f51f94d7e3df48842b333d0ffe141f056d4327 100644 (file)
@@ -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);
 }