Shorten GPLv2 licence text in header of each source file
[dockapps/wmnotify.git] / src / options.c
index 1c398e8..61c4aad 100644 (file)
@@ -3,19 +3,7 @@
  *
  * Copyright (C) 2003 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.
+ * This file is released under the GPLv2
  */
 
 #if HAVE_CONFIG_H
@@ -48,10 +36,6 @@ static void DisplayUsage(void)
        printf("use alternate configuration file\n");
        printf("  -d                        ");
        printf("Display debugging messages.\n");
-       printf("  -display <host:display>   ");
-       printf("X display name\n");
-       printf("  -geometry +XPOS+YPOS      ");
-       printf("initial window position\n");
        printf("  -h                        ");
        printf("display this help and exit\n");
        printf("  -version                  ");
@@ -93,8 +77,6 @@ void ParseCommandLineOptions(int argc, char *argv[])
        int i;
        char *token;
        bool config_file_on = false;
-       bool display_on = false;
-       bool geometry_on = false;
 
        /* Default values. */
        wmnotify_infos.debug = false;
@@ -114,16 +96,7 @@ void ParseCommandLineOptions(int argc, char *argv[])
                                }
                                break;
                        case 'd':
-                               if (STREQ("display", &token[1]))
-                                       display_on = true;
-                               else if (strlen(&token[1]) == 1)
-                                       wmnotify_infos.debug = true;
-                               break;
-                       case 'g':
-                               if (STREQ("geometry", &token[1]))
-                                       geometry_on = true;
-                               else
-                                       InvalidOption("invalid option", token);
+                               wmnotify_infos.debug = true;
                                break;
                        case 'h':
                                if (strlen(&token[1]) == 1) {
@@ -152,12 +125,6 @@ void ParseCommandLineOptions(int argc, char *argv[])
                                    token;
                                /*strcpy( config_file_name, token ); */
                                config_file_on = false;
-                       } else if (display_on != false) {
-                               display_on = false;
-                               wmnotify_infos.display_arg = token;
-                       } else if (geometry_on != false) {
-                               geometry_on = false;
-                               wmnotify_infos.geometry_arg = token;
                        } else {
                                InvalidOption("invalid option", token);
                        }
@@ -166,11 +133,6 @@ void ParseCommandLineOptions(int argc, char *argv[])
        }                       /* end for */
 
        if (config_file_on != false) {
-               InvalidOption("missing configuration file parameter",
-                             NULL);
-       } else if (display_on != false) {
-               InvalidOption("missing display parameter", NULL);
-       } else if (geometry_on != false) {
-               InvalidOption("missing geometry parameter", NULL);
+               InvalidOption("missing configuration file parameter", NULL);
        }
 }