X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Fhelp-menu.c;h=b5b38757c355ef5a6791b83605ce71b662d14dcf;hb=1ec9aefb45eeaa24d29e500f119a32f130beb928;hp=aeef8c10c44ba2deb1d4762177fc3b56d964211e;hpb=0cd7c010e3e5c316ef0eb0317fb7f408d164679d;p=pspp diff --git a/src/ui/gui/help-menu.c b/src/ui/gui/help-menu.c index aeef8c10c4..b5b38757c3 100644 --- a/src/ui/gui/help-menu.c +++ b/src/ui/gui/help-menu.c @@ -148,7 +148,7 @@ online_help (const char *page) { gchar **tokens = NULL; const int maxtokens = 5; - int idx = 0; + int idx ; argv[1] = g_strdup_printf ("file://%s#%s", relocate (DOCDIR "/pspp.xml"), page); /* The page will be translated to the htmlfilename @@ -157,7 +157,8 @@ online_help (const char *page) QUICK-CLUSTER QUICK-CLUSTER.html which is valid for the multiple page html doc*/ tokens = g_strsplit (page, "#", maxtokens); - for(;tokens[idx] && idx < maxtokens;idx++); + for (idx = 0; idx < maxtokens && tokens[idx]; idx++) + ; htmlfilename = g_strdup_printf ("%s.html", tokens[idx-1]); g_strfreev (tokens); }