From 1823de3edd55c3bead6144a34a8d4099835fee90 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Fri, 20 Nov 2009 18:09:56 +0000 Subject: [PATCH] Added GPL license header to all source files --- src/calendar.c | 39 +++++++++++++++++++++++++-------------- src/calendar.h | 25 ++++++++++++++++++++----- src/clock.c | 22 +++++++++++++++++++--- src/clock.h | 25 ++++++++++++++++++++----- src/common.h | 30 +++++++++++++++++++++--------- src/dockapp.c | 21 +++++++++++++++++++-- src/dockapp.h | 25 +++++++++++++++++++------ src/hvclock.c | 22 +++++++++++++++++++--- src/hvclock.h | 23 +++++++++++++++++++---- src/options.c | 22 +++++++++++++++++++--- src/options.h | 24 ++++++++++++++++++++---- src/xevents.c | 25 +++++++++++++++++++++---- src/xevents.h | 29 ++++++++++++++++++++++------- 13 files changed, 263 insertions(+), 69 deletions(-) diff --git a/src/calendar.c b/src/calendar.c index ac9c006..a315f9b 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -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 + * + * 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 ) { diff --git a/src/calendar.h b/src/calendar.h index eb2ecc7..54ac164 100644 --- a/src/calendar.h +++ b/src/calendar.h @@ -1,12 +1,27 @@ -/* calendar.h */ - +/* + * calendar.h + * + * Copyright (C) 2005 Hugo Villeneuve + * + * 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 */ diff --git a/src/clock.c b/src/clock.c index c621efa..cf47ffb 100644 --- a/src/clock.c +++ b/src/clock.c @@ -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 + * + * 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 diff --git a/src/clock.h b/src/clock.h index 1643555..035cf4d 100644 --- a/src/clock.h +++ b/src/clock.h @@ -1,12 +1,27 @@ -/* clock.h */ - +/* + * clock.h + * + * Copyright (C) 2005 Hugo Villeneuve + * + * 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 */ diff --git a/src/common.h b/src/common.h index fa3b547..d4c3239 100644 --- a/src/common.h +++ b/src/common.h @@ -1,14 +1,30 @@ -/* common.h */ +/* + * common.h + * + * Copyright (C) 2005 Hugo Villeneuve + * + * 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 #include #include - /* 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 */ diff --git a/src/dockapp.c b/src/dockapp.c index 5221e18..4e5c174 100644 --- a/src/dockapp.c +++ b/src/dockapp.c @@ -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 + * + * 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 diff --git a/src/dockapp.h b/src/dockapp.h index 39fde8c..6a71f3b 100644 --- a/src/dockapp.h +++ b/src/dockapp.h @@ -1,12 +1,28 @@ -/* dockapp.h */ +/* + * dockapp.h + * + * Copyright (C) 2005 Hugo Villeneuve + * + * 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 - 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 */ diff --git a/src/hvclock.c b/src/hvclock.c index c527357..8035e89 100644 --- a/src/hvclock.c +++ b/src/hvclock.c @@ -1,6 +1,22 @@ -/* hvclock.c -- main program - Copyright (C) 2003 Hugo Villeneuve */ - +/* + * hvclock.c -- main program + * + * Copyright (C) 2005 Hugo Villeneuve + * + * 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 diff --git a/src/hvclock.h b/src/hvclock.h index c910a8e..3608d7e 100644 --- a/src/hvclock.h +++ b/src/hvclock.h @@ -1,10 +1,26 @@ -/* hvclock.h */ - +/* + * hvclock.h + * + * Copyright (C) 2005 Hugo Villeneuve + * + * 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 */ diff --git a/src/options.c b/src/options.c index 9b7b575..4ef5eed 100644 --- a/src/options.c +++ b/src/options.c @@ -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 + * + * 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" diff --git a/src/options.h b/src/options.h index 88026aa..e72130a 100644 --- a/src/options.h +++ b/src/options.h @@ -1,11 +1,27 @@ -/* options.h */ +/* + * options.h + * + * Copyright (C) 2005 Hugo Villeneuve + * + * 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 */ diff --git a/src/xevents.c b/src/xevents.c index ea23e05..afeb1a9 100644 --- a/src/xevents.c +++ b/src/xevents.c @@ -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 + * + * 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(); diff --git a/src/xevents.h b/src/xevents.h index c3d8a39..e831c64 100644 --- a/src/xevents.h +++ b/src/xevents.h @@ -1,16 +1,31 @@ -/* xevents.h */ +/* + * xevents.h + * + * Copyright (C) 2005 Hugo Villeneuve + * + * 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 */ - -- 2.20.1