fix spelling and syntax, especially in messages that are printed -- Mike Slifcak
[rrdtool.git] / src / rrd_tool.c
index 7ef262f..6892ac5 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.1.x  Copyright Tobias Oetiker, 1997 - 2002
+ * RRDtool 1.1.x  Copyright Tobias Oetiker, 1997 - 2004
  *****************************************************************************
  * rrd_tool.c  Startup wrapper
  *****************************************************************************/
@@ -22,7 +22,7 @@ void PrintUsage(char *cmd)
 {
 
     char help_main[] =
-          "RRDtool 1.1.x  Copyright 1997-2003 by Tobias Oetiker <tobi@oetiker.ch>\n"
+          "RRDtool 1.1.x  Copyright 1997-2004 by Tobias Oetiker <tobi@oetiker.ch>\n"
 #ifndef WIN32
            "               Compiled " MAKE_TIMESTAMP "\n\n"
 #else
@@ -55,7 +55,7 @@ void PrintUsage(char *cmd)
 
     char help_restore[] =
           "* restore - restore an RRD file from its XML form\n\n"
-          "\trrdtool restore [--range-check|-r] filename.xml filename.rrd\n\n";
+          "\trrdtool restore [--range-check|-r] [--force-overwrite|-f] filename.xml filename.rrd\n\n";
 
     char help_last[] =
            "* last - show last update time for RRD\n\n"
@@ -70,7 +70,7 @@ void PrintUsage(char *cmd)
           "\t\t[ time:value[:value...] ..]\n\n";
     
        char help_updatev[] =
-          "* updatev - a verbose verion of update\n"
+          "* updatev - a verbose version of update\n"
           "\treturns information about values, RRAs, and datasources updated\n\n"
           "\trrdtool updatev filename\n"
           "\t\t--template|-t ds-name:ds-name:...\n"
@@ -95,6 +95,7 @@ void PrintUsage(char *cmd)
           "\t\t[-u|--upper-limit value] [-z|--lazy]\n"
           "\t\t[-l|--lower-limit value] [-r|--rigid]\n"
            "\t\t[-g|--no-legend]\n"
+           "\t\t[-j|--only-graph]\n"
           "\t\t[--font FONTTAG:size:font]\n"
            "\t\t[--zoom factor]\n"       
           "\t\t[--alt-autoscale]\n"
@@ -131,7 +132,7 @@ void PrintUsage(char *cmd)
           "\t\t[--aberrant-reset ds-name]\n\n";
 
     char help_resize[] =
-          " * resize - alter the lenght of one of the RRAs in an RRD\n\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[] =
@@ -144,7 +145,7 @@ void PrintUsage(char *cmd)
            "\t\t[XPORT:vname:legend]\n\n";
 
     char help_quit[] =
-          " * quit - closeing a session in remote mode\n\n"
+          " * quit - closing a session in remote mode\n\n"
           "\trrdtool quit\n\n";
 
     char help_ls[] =
@@ -153,11 +154,11 @@ void PrintUsage(char *cmd)
 
     char help_cd[] =
           " * cd - changes the current directory\n\n"
-          "\trrdtool cd new direcotry\n\n";
+          "\trrdtool cd new directory\n\n";
 
     char help_mkdir[] =
-          " * mkdir - creates a new direcotry\n\n"
-          "\trrdtool mkdir newdirecotryname\n\n";
+          " * 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"
@@ -409,7 +410,7 @@ int HandleInputLine(int argc, char **argv, FILE* out)
           }
 #if ! defined(HAVE_CHROOT) || ! defined(HAVE_GETUID)
           if (getuid()==0 && ! ChangeRoot){
-             printf("ERROR: chdir security problem - rrdtool is runnig as "
+             printf("ERROR: chdir security problem - rrdtool is running as "
                     "root an no chroot!\n");
              return(0); 
           }
@@ -427,7 +428,7 @@ int HandleInputLine(int argc, char **argv, FILE* out)
           }
 #if ! defined(HAVE_CHROOT) || ! defined(HAVE_GETUID)
           if (getuid()==0 && ! ChangeRoot){
-             printf("ERROR: mkdir security problem - rrdtool is runnig as "
+             printf("ERROR: mkdir security problem - rrdtool is running as "
                     "root an no chroot!\n");
              return(0); 
           }
@@ -523,7 +524,7 @@ int HandleInputLine(int argc, char **argv, FILE* out)
             strcmp("v", argv[1]) == 0 ||
             strcmp("-v", argv[1]) == 0  ||
             strcmp("-version", argv[1]) == 0  )
-        printf("RRDtool 1.1.x  Copyright (C) 1997-2003 by Tobias Oetiker <tobi@oetiker.ch>\n");
+        printf("RRDtool 1.1.x  Copyright (C) 1997-2004 by Tobias Oetiker <tobi@oetiker.ch>\n");
     else if (strcmp("restore", argv[1]) == 0)
        rrd_restore(argc-1, &argv[1]);
     else if (strcmp("resize", argv[1]) == 0)
@@ -541,7 +542,7 @@ int HandleInputLine(int argc, char **argv, FILE* out)
            datai=data;
            printf("           ");
            for (i = 0; i<ds_cnt;i++)
-               printf("%14s",ds_namv[i]);
+               printf("%20s",ds_namv[i]);
            printf ("\n\n");
            for (ti = start+step; ti <= end; ti += step){
                printf("%10lu:", ti);
@@ -609,7 +610,7 @@ int HandleInputLine(int argc, char **argv, FILE* out)
        int xsize, ysize;
        int i;
        int tostdout = (strcmp(argv[2],"-") == 0);      
-       if( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize) != -1 ) {
+       if( rrd_graph(argc-1, &argv[1], &calcpr, &xsize, &ysize, NULL) != -1 ) {
            if (!tostdout) 
                printf ("%dx%d\n",xsize,ysize);
            if (calcpr) {