- "\t\t[-F|--force-rules-legend]\n";
- char help_graph2[] =
- "\t\t[-j|--only-graph]\n"
- "\t\t[-n|--font FONTTAG:size:font]\n"
- "\t\t[-m|--zoom factor]\n"
- "\t\t[-A|--alt-autoscale]\n"
- "\t\t[-M|--alt-autoscale-max]\n"
- "\t\t[-R|--font-render-mode {normal,light,mono}]\n"
- "\t\t[-B|--font-smoothing-threshold size]\n"
- "\t\t[-E|--slope-mode]\n"
- "\t\t[-N|--no-gridfit]\n"
- "\t\t[-X|--units-exponent value]\n"
- "\t\t[-L|--units-length value]\n"
- "\t\t[-S|--step seconds]\n"
- "\t\t[-f|--imginfo printfstr]\n"
- "\t\t[-a|--imgformat PNG]\n"
- "\t\t[-c|--color COLORTAG#rrggbb[aa]] [-t|--title string]\n";
- char help_graph3[] =
- "\t\t[DEF:vname=rrd:ds-name:CF]\n"
- "\t\t[CDEF:vname=rpn-expression]\n"
- "\t\t[VDEF:vdefname=rpn-expression]\n"
- "\t\t[PRINT:vdefname:format]\n"
- "\t\t[GPRINT:vdefname:format]\n"
- "\t\t[COMMENT:text]\n"
- "\t\t[SHIFT:vname:offset]\n"
- "\t\t[TICK:vname#rrggbb[aa][:[fraction][:legend]]]\n"
- "\t\t[HRULE:value#rrggbb[aa][:legend]]\n"
- "\t\t[VRULE:value#rrggbb[aa][:legend]]\n"
- "\t\t[LINE[width]:vname[#rrggbb[aa][:[legend][:STACK]]]]\n"
- "\t\t[AREA:vname[#rrggbb[aa][:[legend][:STACK]]]]\n"
- "\t\t[PRINT:vname:CF:format] (deprecated)\n"
- "\t\t[GPRINT:vname:CF:format] (deprecated)\n"
- "\t\t[STACK:vname[#rrggbb[aa][:legend]]] (deprecated)\n\n";
-
- char help_tune1[] =
- " * tune - Modify some basic properties of an RRD\n\n"
- "\trrdtool tune filename\n"
- "\t\t[--heartbeat|-h ds-name:heartbeat]\n"
- "\t\t[--data-source-type|-d ds-name:DST]\n"
- "\t\t[--data-source-rename|-r old-name:new-name]\n"
- "\t\t[--minimum|-i ds-name:min] [--maximum|-a ds-name:max]\n"
- "\t\t[--deltapos scale-value] [--deltaneg scale-value]\n"
- "\t\t[--failure-threshold integer]\n"
- "\t\t[--window-length integer]\n"
- "\t\t[--alpha adaptation-parameter]\n";
- char help_tune2[] =
- " * tune - Modify some basic properties of an RRD\n\n"
- "\t\t[--beta adaptation-parameter]\n"
- "\t\t[--gamma adaptation-parameter]\n"
- "\t\t[--gamma-deviation adaptation-parameter]\n"
- "\t\t[--aberrant-reset ds-name]\n\n";
-
- char help_resize[] =
- " * resize - alter the length of one of the RRAs in an RRD\n\n"
- "\trrdtool resize filename rranum GROW|SHRINK rows\n\n";
-
- char help_xport[] =
- "* xport - generate XML dump from one or several RRD\n\n"
- "\trrdtool xport [-s|--start seconds] [-e|--end seconds]\n"
- "\t\t[-m|--maxrows rows]\n"
- "\t\t[--step seconds]\n"
- "\t\t[DEF:vname=rrd:ds-name:CF]\n"
- "\t\t[CDEF:vname=rpn-expression]\n"
- "\t\t[XPORT:vname:legend]\n\n";
-
- char help_quit[] =
- " * quit - closing a session in remote mode\n\n"
- "\trrdtool quit\n\n";
-
- char help_ls[] =
- " * ls - lists all *.rrd files in current directory\n\n"
- "\trrdtool ls\n\n";
-
- char help_cd[] =
- " * cd - changes the current directory\n\n"
- "\trrdtool cd new directory\n\n";
-
- char help_mkdir[] =
- " * mkdir - creates a new directory\n\n"
- "\trrdtool mkdir newdirectoryname\n\n";
-
- char help_lic[] =
- "RRDtool is distributed under the Terms of the GNU General\n"
- "Public License Version 2. (www.gnu.org/copyleft/gpl.html)\n\n"
-
- "For more information read the RRD manpages\n\n";
-
- enum { C_NONE, C_CREATE, C_DUMP, C_INFO, C_RESTORE, C_LAST, C_FIRST,
- C_UPDATE, C_FETCH, C_GRAPH, C_TUNE, C_RESIZE, C_XPORT,
- C_QUIT, C_LS, C_CD, C_MKDIR, C_UPDATEV };
-
- int help_cmd = C_NONE;
-
- if (cmd)
- {
- if (!strcmp(cmd,"create"))
- help_cmd = C_CREATE;
- else if (!strcmp(cmd,"dump"))
- help_cmd = C_DUMP;
- else if (!strcmp(cmd,"info"))
- help_cmd = C_INFO;
- else if (!strcmp(cmd,"restore"))
- help_cmd = C_RESTORE;
- else if (!strcmp(cmd,"last"))
- help_cmd = C_LAST;
- else if (!strcmp(cmd,"first"))
- help_cmd = C_FIRST;
- else if (!strcmp(cmd,"update"))
- help_cmd = C_UPDATE;
- else if (!strcmp(cmd,"updatev"))
- help_cmd = C_UPDATEV;
- else if (!strcmp(cmd,"fetch"))
- help_cmd = C_FETCH;
- else if (!strcmp(cmd,"graph"))
- help_cmd = C_GRAPH;
- else if (!strcmp(cmd,"tune"))
- help_cmd = C_TUNE;
- else if (!strcmp(cmd,"resize"))
- help_cmd = C_RESIZE;
- else if (!strcmp(cmd,"xport"))
- help_cmd = C_XPORT;
- else if (!strcmp(cmd,"quit"))
- help_cmd = C_QUIT;
- else if (!strcmp(cmd,"ls"))
- help_cmd = C_LS;
- else if (!strcmp(cmd,"cd"))
- help_cmd = C_CD;
- else if (!strcmp(cmd,"mkdir"))
- help_cmd = C_MKDIR;
- }
- fputs(help_main, stdout);
- switch (help_cmd)
- {
- case C_NONE:
- fputs(help_list, stdout);
- if (RemoteMode){
- fputs(help_listremote, stdout);
- }
- break;
- case C_CREATE:
- fputs(help_create, stdout);
- break;
- case C_DUMP:
- fputs(help_dump, stdout);
- break;
- case C_INFO:
- fputs(help_info, stdout);
- break;
- case C_RESTORE:
- fputs(help_restore, stdout);
- break;
- case C_LAST:
- fputs(help_last, stdout);
- break;
- case C_FIRST:
- fputs(help_first, stdout);
- break;
- case C_UPDATE:
- fputs(help_update, stdout);
- break;
- case C_UPDATEV:
- fputs(help_updatev, stdout);
- break;
- case C_FETCH:
- fputs(help_fetch, stdout);
- break;
- case C_GRAPH:
- fputs(help_graph1, stdout);
- fputs(help_graph2, stdout);
- fputs(help_graph3, stdout);
- break;
- case C_TUNE:
- fputs(help_tune1, stdout);
- fputs(help_tune2, stdout);
- break;
- case C_RESIZE:
- fputs(help_resize, stdout);
- break;
- case C_XPORT:
- fputs(help_xport, stdout);
- break;
- case C_QUIT:
- fputs(help_quit, stdout);
- break;
- case C_LS:
- fputs(help_ls, stdout);
- break;
- case C_CD:
- fputs(help_cd, stdout);
- break;
- case C_MKDIR:
- fputs(help_mkdir, stdout);
- break;
- }
- fputs(help_lic, stdout);
+ "\t\t[-F|--force-rules-legend]\n" "\t\t[-j|--only-graph]\n");
+ char help_graph2[] =
+ N_("\t\t[-n|--font FONTTAG:size:font]\n"
+ "\t\t[-m|--zoom factor]\n"
+ "\t\t[-A|--alt-autoscale]\n"
+ "\t\t[-M|--alt-autoscale-max]\n"
+ "\t\t[-R|--font-render-mode {normal,light,mono}]\n"
+ "\t\t[-B|--font-smoothing-threshold size]\n"
+ "\t\t[-E|--slope-mode]\n"
+ "\t\t[-N|--no-gridfit]\n"
+ "\t\t[-X|--units-exponent value]\n"
+ "\t\t[-L|--units-length value]\n"
+ "\t\t[-S|--step seconds]\n"
+ "\t\t[-f|--imginfo printfstr]\n"
+ "\t\t[-a|--imgformat PNG]\n"
+ "\t\t[-c|--color COLORTAG#rrggbb[aa]] [-t|--title string]\n"
+ "\t\t[-W|--watermark string]\n"
+ "\t\t[DEF:vname=rrd:ds-name:CF]\n");
+ char help_graph3[] =
+ N_("\t\t[CDEF:vname=rpn-expression]\n"
+ "\t\t[VDEF:vdefname=rpn-expression]\n"
+ "\t\t[PRINT:vdefname:format]\n" "\t\t[GPRINT:vdefname:format]\n"
+ "\t\t[COMMENT:text]\n" "\t\t[SHIFT:vname:offset]\n"
+ "\t\t[TICK:vname#rrggbb[aa][:[fraction][:legend]]]\n"
+ "\t\t[HRULE:value#rrggbb[aa][:legend]]\n"
+ "\t\t[VRULE:value#rrggbb[aa][:legend]]\n"
+ "\t\t[LINE[width]:vname[#rrggbb[aa][:[legend][:STACK]]]]\n"
+ "\t\t[AREA:vname[#rrggbb[aa][:[legend][:STACK]]]]\n"
+ "\t\t[PRINT:vname:CF:format] (deprecated)\n"
+ "\t\t[GPRINT:vname:CF:format] (deprecated)\n"
+ "\t\t[STACK:vname[#rrggbb[aa][:legend]]] (deprecated)\n\n");
+
+ char help_tune1[] =
+ N_(" * tune - Modify some basic properties of an RRD\n\n"
+ "\trrdtool tune filename\n"
+ "\t\t[--heartbeat|-h ds-name:heartbeat]\n"
+ "\t\t[--data-source-type|-d ds-name:DST]\n"
+ "\t\t[--data-source-rename|-r old-name:new-name]\n"
+ "\t\t[--minimum|-i ds-name:min] [--maximum|-a ds-name:max]\n"
+ "\t\t[--deltapos scale-value] [--deltaneg scale-value]\n"
+ "\t\t[--failure-threshold integer]\n"
+ "\t\t[--window-length integer]\n"
+ "\t\t[--alpha adaptation-parameter]\n");
+ char help_tune2[] =
+ N_(" * tune - Modify some basic properties of an RRD\n\n"
+ "\t\t[--beta adaptation-parameter]\n"
+ "\t\t[--gamma adaptation-parameter]\n"
+ "\t\t[--gamma-deviation adaptation-parameter]\n"
+ "\t\t[--aberrant-reset ds-name]\n\n");
+
+ char help_resize[] =
+ N_(" * resize - alter the length of one of the RRAs in an RRD\n\n"
+ "\trrdtool resize filename rranum GROW|SHRINK rows\n\n");
+
+ char help_xport[] =
+ N_("* xport - generate XML dump from one or several RRD\n\n"
+ "\trrdtool xport [-s|--start seconds] [-e|--end seconds]\n"
+ "\t\t[-m|--maxrows rows]\n"
+ "\t\t[--step seconds]\n"
+ "\t\t[--enumds]\n"
+ "\t\t[DEF:vname=rrd:ds-name:CF]\n"
+ "\t\t[CDEF:vname=rpn-expression]\n"
+ "\t\t[XPORT:vname:legend]\n\n");
+
+ char help_quit[] =
+ N_(" * quit - closing a session in remote mode\n\n"
+ "\trrdtool quit\n\n");
+
+ char help_ls[] =
+ N_(" * ls - lists all *.rrd files in current directory\n\n"
+ "\trrdtool ls\n\n");
+
+ char help_cd[] =
+ N_(" * cd - changes the current directory\n\n"
+ "\trrdtool cd new directory\n\n");
+
+ char help_mkdir[] =
+ N_(" * mkdir - creates a new directory\n\n"
+ "\trrdtool mkdir newdirectoryname\n\n");
+
+ char help_pwd[] =
+ N_(" * pwd - returns the current working directory\n\n"
+ "\trrdtool pwd\n\n");
+
+ char help_lic[] =
+ N_("RRDtool is distributed under the Terms of the GNU General\n"
+ "Public License Version 2. (www.gnu.org/copyleft/gpl.html)\n\n"
+ "For more information read the RRD manpages\n\n");
+
+ enum { C_NONE, C_CREATE, C_DUMP, C_INFO, C_RESTORE, C_LAST,
+ C_LASTUPDATE, C_FIRST, C_UPDATE, C_FETCH, C_GRAPH, C_TUNE,
+ C_RESIZE, C_XPORT, C_QUIT, C_LS, C_CD, C_MKDIR, C_PWD,
+ C_UPDATEV
+ };
+
+ int help_cmd = C_NONE;
+
+ if (cmd) {
+ if (!strcmp(cmd, "create"))
+ help_cmd = C_CREATE;
+ else if (!strcmp(cmd, "dump"))
+ help_cmd = C_DUMP;
+ else if (!strcmp(cmd, "info"))
+ help_cmd = C_INFO;
+ else if (!strcmp(cmd, "restore"))
+ help_cmd = C_RESTORE;
+ else if (!strcmp(cmd, "last"))
+ help_cmd = C_LAST;
+ else if (!strcmp(cmd, "lastupdate"))
+ help_cmd = C_LASTUPDATE;
+ else if (!strcmp(cmd, "first"))
+ help_cmd = C_FIRST;
+ else if (!strcmp(cmd, "update"))
+ help_cmd = C_UPDATE;
+ else if (!strcmp(cmd, "updatev"))
+ help_cmd = C_UPDATEV;
+ else if (!strcmp(cmd, "fetch"))
+ help_cmd = C_FETCH;
+ else if (!strcmp(cmd, "graph"))
+ help_cmd = C_GRAPH;
+ else if (!strcmp(cmd, "tune"))
+ help_cmd = C_TUNE;
+ else if (!strcmp(cmd, "resize"))
+ help_cmd = C_RESIZE;
+ else if (!strcmp(cmd, "xport"))
+ help_cmd = C_XPORT;
+ else if (!strcmp(cmd, "quit"))
+ help_cmd = C_QUIT;
+ else if (!strcmp(cmd, "ls"))
+ help_cmd = C_LS;
+ else if (!strcmp(cmd, "cd"))
+ help_cmd = C_CD;
+ else if (!strcmp(cmd, "mkdir"))
+ help_cmd = C_MKDIR;
+ else if (!strcmp(cmd, "pwd"))
+ help_cmd = C_PWD;
+ }
+ fprintf(stdout, _(help_main), PACKAGE_VERSION, __DATE__, __TIME__);
+ fflush(stdout);
+ switch (help_cmd) {
+ case C_NONE:
+ fputs(_(help_list), stdout);
+ if (RemoteMode) {
+ fputs(_(help_listremote), stdout);
+ }
+ break;
+ case C_CREATE:
+ fputs(_(help_create), stdout);
+ break;
+ case C_DUMP:
+ fputs(_(help_dump), stdout);
+ break;
+ case C_INFO:
+ fputs(_(help_info), stdout);
+ break;
+ case C_RESTORE:
+ fputs(_(help_restore), stdout);
+ break;
+ case C_LAST:
+ fputs(_(help_last), stdout);
+ break;
+ case C_LASTUPDATE:
+ fputs(_(help_lastupdate), stdout);
+ break;
+ case C_FIRST:
+ fputs(_(help_first), stdout);
+ break;
+ case C_UPDATE:
+ fputs(_(help_update), stdout);
+ break;
+ case C_UPDATEV:
+ fputs(_(help_updatev), stdout);
+ break;
+ case C_FETCH:
+ fputs(_(help_fetch), stdout);
+ break;
+ case C_GRAPH:
+ fputs(_(help_graph1), stdout);
+ fputs(help_graph2, stdout);
+ fputs(help_graph3, stdout);
+ break;
+ case C_TUNE:
+ fputs(_(help_tune1), stdout);
+ fputs(_(help_tune2), stdout);
+ break;
+ case C_RESIZE:
+ fputs(_(help_resize), stdout);
+ break;
+ case C_XPORT:
+ fputs(_(help_xport), stdout);
+ break;
+ case C_QUIT:
+ fputs(_(help_quit), stdout);
+ break;
+ case C_LS:
+ fputs(_(help_ls), stdout);
+ break;
+ case C_CD:
+ fputs(_(help_cd), stdout);
+ break;
+ case C_MKDIR:
+ fputs(_(help_mkdir), stdout);
+ break;
+ case C_PWD:
+ fputs(_(help_pwd), stdout);
+ break;
+ }
+ fputs(_(help_lic), stdout);