summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-01-20 17:32:49 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-01-20 17:32:49 +0100
commit87270613d16f082361537fbc1a80131a646756cf (patch)
treee8d5a281f83d6f02dd2850202c5fcb833c617db0 /src
parent259ef5d144dd7022bb8e8fa2221f773277fd72e7 (diff)
add support for some FLTK standard options like -geometry
Diffstat (limited to 'src')
-rw-r--r--src/flpsed.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/flpsed.cxx b/src/flpsed.cxx
index 05dcee5..f7014e8 100644
--- a/src/flpsed.cxx
+++ b/src/flpsed.cxx
@@ -365,7 +365,12 @@ void usage() {
" <infile> optional input file; in batch mode if no\n"
" input file is given, input is read from stdin\n"
" <outfile> optional output file for batch mode; if no\n"
- " output file is given, output is written to stdout\n");
+ " output file is given, output is written to stdout\n\n"
+ "additionally flpsed supports the following FLTK standard options:\n"
+ " -geometry WxH+X+Y\n"
+ " -iconic\n"
+ " -scheme string\n"
+ );
}
#define TV_LEN 256
@@ -373,6 +378,7 @@ void usage() {
int main(int argc, char** argv) {
char *sep, *tmp, **my_argv;
int c, err, bflag = 0, dflag = 0;
+ int i, n;
Fl_Window *win;
Fl_Menu_Bar *m;
struct {char *tag; char *value;} tv[TV_LEN];
@@ -380,7 +386,7 @@ int main(int argc, char** argv) {
FILE *in_fp = NULL, *out_fp = NULL;
err = 0;
- while ((c = getopt(argc, argv, "hdbt:")) != -1) {
+ while ((c = getopt(argc, argv, "hdbt:g:d:f:i:s:")) != -1) {
switch (c) {
case 'h':
usage();
@@ -413,7 +419,13 @@ int main(int argc, char** argv) {
free(tmp);
break;
default:
- err++;
+ i = optind -1;
+ n = Fl::arg(argc, argv, i);
+ if (n == 0) {
+ err++;
+ } else {
+ optind = i;
+ }
}
}