]> Untitled Git - dockapps/hvclock.git/commitdiff
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 ac9c0069216d16e78deda2d89fc551d9765130e8..a315f9bec68e7cc7422bbce793fd5a4d3ecad166 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 eb2ecc7fc1426f265f715aef689391076abeab05..54ac16436ae347544027a7419b132c0f6fd5df0e 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 c621efac616e658861b9d3b2e3a9aa69057b6cfe..cf47ffb7295bfbf8aa0ed13fbe3eabbf2b06fe58 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 1643555d40915602c04971318abdb14e0ed63c95..035cf4db9b89f44ea4208562ad5de8621696cb66 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 fa3b54796cb2bc2c3866797b8d8af58897b4177f..d4c3239571f81e1fd64c871f3daa36a0f0b78728 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 5221e181ad47a168e04ccb049e5a3ee600b3bbcc..4e5c174e7ba93e8a1a2528940bf0fb278416bc06 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 39fde8c1bab86638a821771181b22e7a6b11c3a6..6a71f3befd02ccecd256f5678cbdbc48317b1238 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 c527357aa1217bc5dcc518330aed3c22240899a4..8035e89a3836e005947d0e62c44150ef0ec2235e 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 c910a8e8c27dcef179829be5847a6421a078a290..3608d7e73f226457e87320924510bba6bd3dc439 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 9b7b5756f6864e94998c3b0331a1407a4c0b9d27..4ef5eed12e140ddf573ed3682aa855ba9262038b 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 88026aacc2bd909572caa39f229371be1218b696..e72130a7bc279a453c3d0db63d27547c9ef3b849 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 ea23e0549a328011d40dc5c33c7a967d186d81c7..afeb1a9624b5661111e735053de2d4f31b15774c 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 c3d8a39eb37080b48870b8cb6ad8b71836515200..e831c64252306bf6b3993035005c8940eedbdd95 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 */
-