From 81d8534454703493c70fa7d6d1acacc4c7105f79 Mon Sep 17 00:00:00 2001 From: algernon Date: Thu, 15 Feb 2001 21:44:59 +0000 Subject: header cleanups & copyright year update & co --- src/bar.h | 25 ++++++++++++++----------- src/communications.c | 14 ++++++++------ src/communications.h | 21 ++++++++++++++------- src/conf.h | 23 +++++++++++++++-------- src/data.h | 24 +++++++++++++----------- src/events.h | 20 +++++++++++--------- src/list.h | 21 ++++++++++++--------- src/main.c | 15 +++++++++------ src/manage.c | 18 ++++++++++-------- src/manage.h | 20 +++++++++++--------- src/number.c | 14 ++++++++------ src/number.h | 19 ++++++++++++++----- src/ratpoison.h | 18 ++++++++++-------- src/sbuf.c | 26 ++++++++++++++++++++++++-- src/sbuf.h | 27 ++++++++++++++++++++++++--- 15 files changed, 197 insertions(+), 108 deletions(-) diff --git a/src/bar.h b/src/bar.h index 1f9765d..4479667 100644 --- a/src/bar.h +++ b/src/bar.h @@ -1,24 +1,26 @@ /* functions for managing the program bar - * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. - * - * This program is distributed in the hope that it will be useful, + * + * ratpoison 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 software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ -#ifndef _BAR_H -#define _BAR_H +#ifndef _RATPOISON_BAR_H +#define _RATPOISON_BAR_H 1 void update_window_names (screen_info *s); int show_bar (screen_info *s); @@ -26,4 +28,5 @@ int hide_bar (screen_info *s); int bar_y (screen_info *s); int bar_x (screen_info *s, int width); void display_msg_in_bar (screen_info *s, char *msg, int hl_start, int hl_end); -#endif /* _BAR_H */ + +#endif /* ! _RATPOISON_BAR_H */ diff --git a/src/communications.c b/src/communications.c index 83c2cc2..7d94a1b 100644 --- a/src/communications.c +++ b/src/communications.c @@ -1,13 +1,14 @@ /* communications.c -- Send commands to a running copy of ratpoison. + * Copyright (C) 2000, 2001 Shawn Betts * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. - * - * This program is distributed in the hope that it will be useful, + * + * ratpoison 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. @@ -15,7 +16,8 @@ * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ #include #include diff --git a/src/communications.h b/src/communications.h index e6e1d06..e88e17b 100644 --- a/src/communications.h +++ b/src/communications.h @@ -1,21 +1,28 @@ /* communications.h -- Send commands to a running copy of ratpoison. + * Copyright (C) 2000, 2001 Shawn Betts * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. - * - * This program is distributed in the hope that it will be useful, + * + * ratpoison 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 software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ + +#ifndef _RATPOISON_COMMUNICATIONS_H +#define _RATPOISON_COMMUNICATIONS_H 1 void send_kill (); void send_restart (); + +#endif /* ! _RATPOISON_COMMUNICATIONS_H */ diff --git a/src/conf.h b/src/conf.h index d190c3a..3e36106 100644 --- a/src/conf.h +++ b/src/conf.h @@ -1,21 +1,26 @@ /* Config file for ratpoison. Edit these values and recompile. - * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. - * - * This program is distributed in the hope that it will be useful, + * + * ratpoison 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 software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ + +#ifndef _RATPOISON_CONF_H +#define _RATPOISON_CONF_H 1 #include "data.h" #include "actions.h" @@ -47,3 +52,5 @@ jump to them or give them keyboard focus. This has been added mostly for use with hand-helds. */ #define UNMANAGED_WINDOW_LIST "xapm","xclock","xscribble" + +#endif /* !_ _RATPOISON_CONF_H */ diff --git a/src/data.h b/src/data.h index 9491a7a..5e8a6fc 100644 --- a/src/data.h +++ b/src/data.h @@ -1,24 +1,26 @@ /* our datatypes and global variables - * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. - * - * This program is distributed in the hope that it will be useful, + * + * ratpoison 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 software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ -#ifndef _DATA_H -#define _DATA_H +#ifndef _RATPOISON_DATA_H +#define _RATPOISON_DATA_H #include #include @@ -113,4 +115,4 @@ extern int ignore_badwindow; /* Arguments passed to ratpoison. */ extern char **myargv; -#endif /* _DATA_H */ +#endif /* _RATPOISON_DATA_H */ diff --git a/src/events.h b/src/events.h index ac99f43..7544aa4 100644 --- a/src/events.h +++ b/src/events.h @@ -1,13 +1,14 @@ /* Function prototypes - * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. * - * This program is distributed in the hope that it will be useful, + * ratpoison 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. @@ -15,10 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ -#ifndef _EVENTS_H -#define _EVENTS_H +#ifndef _RATPOISON_EVENTS_H +#define _RATPOISON_EVENTS_H 1 void handle_events (); void delegate_event (XEvent *ev); @@ -26,4 +28,4 @@ void key_press (XEvent *ev); void map_request (XEvent *ev); void unmap_notify (XEvent *ev); -#endif /* _EVENTS_H */ +#endif /* _RATPOISON_EVENTS_H */ diff --git a/src/list.h b/src/list.h index ff41c35..d292bbf 100644 --- a/src/list.h +++ b/src/list.h @@ -1,13 +1,14 @@ /* functions for managing the window list - * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. * - * This program is distributed in the hope that it will be useful, + * ratpoison 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. @@ -15,10 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ -#ifndef _LIST_H -#define _LIST_H +#ifndef _RATPOISON_LIST_H +#define _RATPOISON_LIST_H 1 rp_window *add_to_window_list (screen_info *s, Window w); void init_window_list (); @@ -33,4 +35,5 @@ void set_current_window (rp_window *win); int goto_window_name (char *name); rp_window *find_last_accessed_window (); rp_window *find_window_by_number (int n); -#endif /* _LIST_H */ + +#endif /* ! _RATPOISON_LIST_H */ diff --git a/src/main.c b/src/main.c index 07e5566..ad7df8c 100644 --- a/src/main.c +++ b/src/main.c @@ -1,12 +1,14 @@ -/* - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify +/* Ratpoison. + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. * - * This program is distributed in the hope that it will be useful, + * ratpoison 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. @@ -14,7 +16,8 @@ * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ #include #include diff --git a/src/manage.c b/src/manage.c index f37af49..7a9039b 100644 --- a/src/manage.c +++ b/src/manage.c @@ -1,22 +1,24 @@ /* Manage windows, such as Mapping them and making sure the proper key * Grabs have been put in place. - * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. - * - * This program is distributed in the hope that it will be useful, + * + * ratpoison 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 software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ #include #include diff --git a/src/manage.h b/src/manage.h index 6519392..fccf8dc 100644 --- a/src/manage.h +++ b/src/manage.h @@ -1,13 +1,14 @@ /* manage.h - * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. * - * This program is distributed in the hope that it will be useful, + * ratpoison 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. @@ -15,10 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ -#ifndef _MANAGE_H -#define _MANAGE_H +#ifndef _RATPOISON_MANAGE_H +#define _RATPOISON_MANAGE_H 1 #include "data.h" @@ -32,4 +34,4 @@ void rename_current_window (); void send_configure (rp_window *win); void set_state (rp_window *win, int state); -#endif /* _MANAGE_H */ +#endif /* ! _RATPOISION_MANAGE_H */ diff --git a/src/number.c b/src/number.c index 1d46e45..880245c 100644 --- a/src/number.c +++ b/src/number.c @@ -1,13 +1,14 @@ /* handles the handing out of and uniqueness of window numbers. - - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. * - * This program is distributed in the hope that it will be useful, + * ratpoison 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. @@ -15,7 +16,8 @@ * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ #include #include diff --git a/src/number.h b/src/number.h index 669984b..1a489b1 100644 --- a/src/number.h +++ b/src/number.h @@ -1,11 +1,14 @@ -/* Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify +/* Function prototypes. + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. * - * This program is distributed in the hope that it will be useful, + * ratpoison 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. @@ -13,8 +16,14 @@ * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ + +#ifndef _RATPOISON_NUMBER_H +#define _RATPOISON_NUMBER_H 1 int get_unique_window_number (); void return_window_number (int n); void init_numbers (); + +#endif /* ! _RATPOISON_NUMBER_H */ diff --git a/src/ratpoison.h b/src/ratpoison.h index 22dcf68..7567588 100644 --- a/src/ratpoison.h +++ b/src/ratpoison.h @@ -1,13 +1,14 @@ /* Standard header for ratpoison. - * - * Copyright (C) 2000 Shawn Betts - * - * This program is free software; you can redistribute it and/or modify + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) * any later version. * - * This program is distributed in the hope that it will be useful, + * ratpoison 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. @@ -15,10 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA */ + * Boston, MA 02111-1307 USA + */ #ifndef _RATPOISON_H -#define _RATPOISON_H +#define _RATPOISON_H 1 #ifdef HAVE_CONFIG_H # include @@ -59,4 +61,4 @@ extern XGCValues gv; void clean_up (); screen_info *find_screen (Window w); -#endif /* _RATPOISON_H */ +#endif /* ! _RATPOISON_H */ diff --git a/src/sbuf.c b/src/sbuf.c index 2e805e8..2bc2d03 100644 --- a/src/sbuf.c +++ b/src/sbuf.c @@ -1,8 +1,31 @@ +/* Functions for handling string buffers. + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) + * any later version. + * + * ratpoison 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 software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +#include "ratpoison.h" #include "sbuf.h" /* ------------------------------------ move to separate file */ #include #include + void fatal (const char *msg) { @@ -25,7 +48,7 @@ xrealloc (void *ptr, size_t size) register void *value = realloc (ptr, size); if (value == 0) fatal ("Virtual memory exhausted"); - fprintf (stderr, "realloc: %d\n", size); + PRINT_DEBUG("realloc: %d\n", size); return value; } /*------------------------------------------------------------*/ @@ -97,4 +120,3 @@ sbuf_get (struct sbuf *b) { return b->data; } - diff --git a/src/sbuf.h b/src/sbuf.h index a6ff01c..d25ee90 100644 --- a/src/sbuf.h +++ b/src/sbuf.h @@ -1,5 +1,26 @@ -#ifndef _SBUF_H -#define _SBUF_H +/* Function prototypes for handling string buffers. + * Copyright (C) 2000, 2001 Shawn Betts + * + * This file is part of ratpoison. + * + * ratpoison 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, or (at your option) + * any later version. + * + * ratpoison 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 software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +#ifndef _RATPOISON_SBUF_H +#define _RATPOISON_SBUF_H 1 #include @@ -18,4 +39,4 @@ char *sbuf_copy (struct sbuf *b, const char *str); char *sbuf_clear (struct sbuf *b); char *sbuf_get (struct sbuf *b); -#endif /* _SBUF_H */ +#endif /* ! _RATPOISON_SBUF_H */ -- cgit v1.2.3