Added GPL license header to all source files
authorHugo Villeneuve <hugo@hugovil.com>
Fri, 20 Nov 2009 18:09:56 +0000 (18:09 +0000)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 29 May 2013 02:37:23 +0000 (22:37 -0400)
13 files changed:
src/calendar.c
src/calendar.h
src/clock.c
src/clock.h
src/common.h
src/dockapp.c
src/dockapp.h
src/hvclock.c
src/hvclock.h
src/options.c
src/options.h
src/xevents.c
src/xevents.h

index ac9c006..a315f9b 100644 (file)
@@ -1,6 +1,22 @@
-/* calendar.c -- functions for displaying calendar
-   Copyright (C) 2003 Hugo Villeneuve */
-
+/*
+ * calendar.c -- functions for displaying calendar
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #if HAVE_CONFIG_H
 #  include "config.h"
@@ -27,7 +43,6 @@
 #include "options.h"
 #include "calendar.h"
 
-
 #define CALENDAR_BACKGROUND_SRC_X 64
 #define CALENDAR_BACKGROUND_SRC_Y 64
 
@@ -46,7 +61,6 @@
 #define NUMBERS_DELTA_X 20
 #define NUMBERS_DELTA_Y 27
 
-
 static const int number_widths[]={
   18, /* 0 */
   12, /* 1 */
@@ -85,26 +99,24 @@ static const int days_widths[]={
   43  /* Saturday */
 };
 
-
 static int
-DisplayDigit( int digit, int dest_x, int dest_y )
+DisplayDigit(int digit, int dest_x, int dest_y)
 {
   int src_x, src_y;
   
-  if( ( digit % 2 ) == 0 )
+  if ((digit % 2) == 0)
     src_x = NUMBERS_SRC_X; /* First column */
   else
     src_x = NUMBERS_SRC_X + NUMBERS_DELTA_X; /* Second column */
   
-  src_y = NUMBERS_SRC_Y + ( ( digit / 2 ) * NUMBERS_DELTA_Y );
+  src_y = NUMBERS_SRC_Y + ((digit / 2) * NUMBERS_DELTA_Y);
   
-  copyXPMArea( src_x, src_y, number_widths[digit], NUMBERS_DELTA_Y - 1,
-              dest_x, dest_y );
+  copyXPMArea(src_x, src_y, number_widths[digit], NUMBERS_DELTA_Y - 1,
+              dest_x, dest_y);
   
-  return ( dest_x + number_widths[digit] + 1 );
+  return (dest_x + number_widths[digit] + 1);
 }
 
-
 static int
 GetNumberWidth( int number )
 {
@@ -122,7 +134,6 @@ GetNumberWidth( int number )
   return width;
 }
 
-
 void
 UpdateCalendar( void )
 {
index eb2ecc7..54ac164 100644 (file)
@@ -1,12 +1,27 @@
-/* calendar.h */
-
+/*
+ * calendar.h
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #ifndef CALENDAR_H
 #define CALENDAR_H 1
 
-
 void
-UpdateCalendar( void );
-
+UpdateCalendar(void);
 
 #endif /* CALENDAR_H */
index c621efa..cf47ffb 100644 (file)
@@ -1,6 +1,22 @@
-/* clock.c -- functions for displaying and rendering clock and calendar
-   Copyright (C) 2003 Hugo Villeneuve */
-
+/*
+ * clock.c -- functions for displaying and rendering clock and calendar
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 /* Define filename_M */
 #define CLOCK_M 1
index 1643555..035cf4d 100644 (file)
@@ -1,12 +1,27 @@
-/* clock.h */
-
+/*
+ * clock.h
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #ifndef CLOCK_H
 #define CLOCK_H 1
 
-
 void
-UpdateClock( void );
-
+UpdateClock(void);
 
 #endif /* CLOCK_H */
index fa3b547..d4c3239 100644 (file)
@@ -1,14 +1,30 @@
-/* common.h */
+/*
+ * common.h
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #ifndef COMMON_H
 #define COMMON_H 1
 
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
 
-
 /* Common constants. */
 #ifndef EXIT_SUCCESS
 #  define EXIT_SUCCESS 0
@@ -21,20 +37,16 @@ typedef int bool;
 #  define TRUE  1
 #endif
 
-
 /* Returns TRUE if the strings 'a' and 'b' are equal. */
 #define STREQ(a, b) (strcmp((a), (b)) == 0)
 
 /* Returns TRUE if the first 'c' characters of strings 'a' and 'b' are equal. */
 #define STREQ_LEN(a, b, c) (strncmp((a), (b), (c)) == 0)
 
-
 inline void
-ErrorLocation( const char *file, int line );
+ErrorLocation(const char *file, int line);
 
-/*@out@*/ /*@only@*/
 void *
-xmalloc( size_t size, const char *filename, int line_number );
-
+xmalloc(size_t size, const char *filename, int line_number);
 
 #endif /* COMMON_H */
index 5221e18..4e5c174 100644 (file)
@@ -1,5 +1,22 @@
-/* dockapp.c -- routines for managing dockapp windows and icons. */
-
+/*
+ * dockapp.c -- routines for managing dockapp windows and icons.
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 /* Define filename_M */
 #define DOCKAPP_M 1
index 39fde8c..6a71f3b 100644 (file)
@@ -1,12 +1,28 @@
-/* dockapp.h */
+/*
+ * dockapp.h
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #ifndef DOCKAPP_H
 #define DOCKAPP_H 1
 
-
 #include <X11/xpm.h>
 
-
 typedef struct XpmIcon
 {
   XpmAttributes attributes;
@@ -28,7 +44,6 @@ typedef struct dockapp_t
   XpmIcon xpm_icon;
 } dockapp_t;
 
-
 void
 InitDockAppWindow( int argc, char *argv[], char *pixmap_data[],
                   char *display_arg, char *geometry_arg );
@@ -39,7 +54,6 @@ RedrawWindow( void );
 void
 copyXPMArea( int x, int y, unsigned int sx, unsigned int sy, int dx, int dy );
 
-
 /* Exported variables */
 #undef _SCOPE_
 #ifdef DOCKAPP_M
@@ -50,5 +64,4 @@ copyXPMArea( int x, int y, unsigned int sx, unsigned int sy, int dx, int dy );
 
 _SCOPE_ dockapp_t dockapp;
 
-
 #endif /* DOCKAPP_H */
index c527357..8035e89 100644 (file)
@@ -1,6 +1,22 @@
-/* hvclock.c -- main program
-   Copyright (C) 2003 Hugo Villeneuve */
-
+/*
+ * hvclock.c -- main program
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 /* Define filename_M */
 #define HVCLOCK_M 1
index c910a8e..3608d7e 100644 (file)
@@ -1,10 +1,26 @@
-/* hvclock.h */
-
+/*
+ * hvclock.h
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #ifndef HVCLOCK_H
 #define HVCLOCK_H 1
 
-
 typedef struct hvclock_t
 {
   bool debug;
@@ -22,5 +38,4 @@ typedef struct hvclock_t
 
 _SCOPE_ hvclock_t hvclock_infos;
 
-
 #endif /* HVCLOCK_H */
index 9b7b575..4ef5eed 100644 (file)
@@ -1,6 +1,22 @@
-/* options.c -- functions for processing command-line options and arguments
-   Copyright (C) 2003 Hugo Villeneuve */
-
+/*
+ * options.c -- functions for processing command-line options and arguments
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #if HAVE_CONFIG_H
 #  include "config.h"
index 88026aa..e72130a 100644 (file)
@@ -1,11 +1,27 @@
-/* options.h */
+/*
+ * options.h
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #ifndef OPTIONS_H
 #define OPTIONS_H 1
 
-
 void
-ParseCommandLineOptions( int argc, char *argv[] );
-
+ParseCommandLineOptions(int argc, char *argv[]);
 
 #endif /* OPTIONS_H */
index ea23e05..afeb1a9 100644 (file)
@@ -1,6 +1,23 @@
-/* xevents.c -- handling X events, and detecting single-click and double-click
- *              mouse events. */
-
+/*
+ * xevents.c -- handling X events, and detecting single-click and double-click
+ *              mouse events.
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #if HAVE_CONFIG_H
 #  include "config.h"
@@ -38,7 +55,7 @@ void
 ProcessXlibEventsInit( void (*single_click_callback)( void ),
                       void (*double_click_callback)( void ) )
 {
-  int status;
+       int status;
   
   /* This must be called before any other XLib functions. */
   status = XInitThreads();
index c3d8a39..e831c64 100644 (file)
@@ -1,16 +1,31 @@
-/* xevents.h */
+/*
+ * xevents.h
+ *
+ * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #ifndef XEVENTS_H
 #define XEVENTS_H 1
 
-
 void
-ProcessXlibEventsInit( void (*single_click_callback)( void ),
-                      void (*double_click_callback)( void ) );
+ProcessXlibEventsInit(void (*single_click_callback)(void),
+                      void (*double_click_callback)(void));
 
 void
-ProcessXlibEvents( void );
-
+ProcessXlibEvents(void);
 
 #endif /* XEVENTS_H */
-