diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-04-22 09:57:23 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-04-22 09:57:23 +0200 |
commit | d1882b3c6a41a70bd7fd20d64e20388d77ec8df3 (patch) | |
tree | 8fc31ea07d5e523e989cb15b1e75f7f2bd01baa6 | |
parent | db8450799255e2de37a9cd8c15610211673af6e1 (diff) | |
parent | b932ec73d708be89476c298114676196771e0c1a (diff) |
merge
-rw-r--r-- | src/dillo.cc | 20 | ||||
-rw-r--r-- | src/html.cc | 16 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/dillo.cc b/src/dillo.cc index 3ef7eaf6..b6ed6123 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -91,7 +91,7 @@ static const CLI_options Options[] = { /* * Print help text generated from the options structure */ -static void Dillo_print_help(const char *cmdname, const CLI_options *options) +static void printHelp(const char *cmdname, const CLI_options *options) { printf("Usage: %s [OPTION]... [--] [URL|FILE]...\n" "Options:\n", cmdname); @@ -107,7 +107,7 @@ static void Dillo_print_help(const char *cmdname, const CLI_options *options) /* * Return the maximum number of option arguments */ -static int Dillo_get_max_opt(const CLI_options *options) +static int numOptions(const CLI_options *options) { int i, max; @@ -120,7 +120,7 @@ static int Dillo_get_max_opt(const CLI_options *options) /* * Get next command line option. */ -static OptID Dillo_get_opt(const CLI_options *options, int argc, char **argv, +static OptID getCmdOption(const CLI_options *options, int argc, char **argv, char **opt_argv, int *idx) { typedef enum { O_SEARCH, O_FOUND, O_NOTFOUND, O_DONE } State; @@ -171,7 +171,7 @@ static OptID Dillo_get_opt(const CLI_options *options, int argc, char **argv, /* * Given a command line argument, build a DilloUrl for it. */ -static DilloUrl *Dillo_make_start_url(char *str, bool local) +static DilloUrl *makeStartUrl(char *str, bool local) { char *url_str, *p; DilloUrl *start_url; @@ -216,8 +216,8 @@ int main(int argc, char **argv) signal(SIGPIPE, SIG_IGN); /* Handle command line options */ - opt_argv = dNew0(char*, Dillo_get_max_opt(Options) + 1); - while ((opt_id = Dillo_get_opt(Options, argc, argv, opt_argv, &idx))) { + opt_argv = dNew0(char*, numOptions(Options) + 1); + while ((opt_id = getCmdOption(Options, argc, argv, opt_argv, &idx))) { options_got |= opt_id; switch (opt_id) { case DILLO_CLI_FULLWINDOW: @@ -235,7 +235,7 @@ int main(int argc, char **argv) break; } case DILLO_CLI_GEOMETRY: - if (!a_Misc_parse_geometry(opt_argv[0], &xpos, &ypos,&width,&height)){ + if (!a_Misc_parse_geometry(opt_argv[0],&xpos,&ypos,&width,&height)){ fprintf(stderr, "geometry argument \"%s\" not valid. Must be of " "the form WxH[{+-}X{+-}Y].\n", opt_argv[0]); return -1; @@ -245,10 +245,10 @@ int main(int argc, char **argv) puts("Dillo version " VERSION); return 0; case DILLO_CLI_HELP: - Dillo_print_help(argv[0], Options); + printHelp(argv[0], Options); return 0; default: - Dillo_print_help(argv[0], Options); + printHelp(argv[0], Options); return -1; } } @@ -313,7 +313,7 @@ int main(int argc, char **argv) a_Nav_push(bw, prefs.start_page); } else { for (int i = idx; i < argc; i++) { - DilloUrl *start_url = Dillo_make_start_url(argv[i], local); + DilloUrl *start_url = makeStartUrl(argv[i], local); if (i > idx) { if (prefs.middle_click_opens_new_tab) { diff --git a/src/html.cc b/src/html.cc index 5b14101f..a08f9553 100644 --- a/src/html.cc +++ b/src/html.cc @@ -915,14 +915,14 @@ static int Html_ms_stupid_quotes_2ucs(int isocode) { int ret; switch (isocode) { - case 145: - case 146: ret = '\''; break; - case 147: - case 148: ret = '"'; break; - case 149: ret = 176; break; - case 150: - case 151: ret = '-'; break; - default: ret = isocode; break; + case 145: + case 146: ret = '\''; break; + case 147: + case 148: ret = '"'; break; + case 149: ret = 176; break; + case 150: + case 151: ret = '-'; break; + default: ret = isocode; break; } return ret; } |