[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: defines.h



  User: pbernaud
  Date: 05/02/20 12:05:40

  Modified:    .        defines.h prototype.h
  Log:
  Rewritten s_log.nw to use GLib's message logging mechanism.
  
  
  
  
  Revision  Changes    Path
  1.45      +22 -0     eda/geda/devel/libgeda/include/defines.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: defines.h
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/include/defines.h,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -b -r1.44 -r1.45
  --- defines.h	14 Feb 2005 02:17:34 -0000	1.44
  +++ defines.h	20 Feb 2005 17:05:39 -0000	1.45
  @@ -355,4 +355,26 @@
   #define M_PI  3.14159265358979323846
   #endif
   
  +
  +/* inspired of GLib's g_message() (gmessages.h) - LGPL */
  +#ifdef G_HAVE_ISO_VARARGS
  +#define s_log_message(...)  g_log (G_LOG_DOMAIN,         \
  +                                   G_LOG_LEVEL_MESSAGE,  \
  +                                   __VA_ARGS__)
  +#elif defined(G_HAVE_GNUC_VARARGS)
  +#define s_log_message(format...)    g_log (G_LOG_DOMAIN,         \
  +                                           G_LOG_LEVEL_MESSAGE,  \
  +                                           format)
  +#else   /* no varargs macros */
  +static void
  +s_log_message (const gchar *format,
  +               ...)
  +{
  +  va_list args;
  +  va_start (args, format);
  +  g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args);
  +  va_end (args);
  +}
  +#endif  /* !__GNUC__ */
  +
   #endif
  
  
  
  1.94      +3 -3      eda/geda/devel/libgeda/include/prototype.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: prototype.h
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/include/prototype.h,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -b -r1.93 -r1.94
  --- prototype.h	19 Feb 2005 23:27:30 -0000	1.93
  +++ prototype.h	20 Feb 2005 17:05:39 -0000	1.94
  @@ -526,9 +526,9 @@
   PAGE *s_hierarchy_find_page(PAGE *p_start, int pid);
   
   /* s_log.c */
  -void s_log_init(char *cwd, const char *filename);
  -void s_log_message(const gchar *format, ...);
  -void s_log_close(void);
  +void s_log_init (const gchar *filename);
  +void s_log_close (void);
  +gchar *s_log_read (void);
   
   /* s_menu.c */
   int s_menu_return_num(void);