You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2002/08/19 09:28:18 UTC

cvs commit: httpd-2.0/support htpasswd.c

jerenkrantz    2002/08/19 00:28:18

  Modified:    support  htpasswd.c
  Log:
  Style fixes.  (long lines)
  
  (Justin tweaked one character in this patch.)
  
  Submitted by:	Thom May <th...@planetarytramp.net>
  Reviewed by:	Justin Erenkrantz
  
  Revision  Changes    Path
  1.56      +18 -15    httpd-2.0/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/htpasswd.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- htpasswd.c	10 Jul 2002 06:01:14 -0000	1.55
  +++ htpasswd.c	19 Aug 2002 07:28:18 -0000	1.56
  @@ -178,8 +178,8 @@
       else {
           bufsize = sizeof(pwin);
           if (apr_password_get("New password: ", pwin, &bufsize) != 0) {
  -            apr_snprintf(record, (rlen - 1), "password too long (>%" APR_SIZE_T_FMT
  -                ")", sizeof(pwin) - 1);
  +            apr_snprintf(record, (rlen - 1), "password too long (>%" 
  +                         APR_SIZE_T_FMT ")", sizeof(pwin) - 1);
               return ERR_OVERFLOW;
           }
           bufsize = sizeof(pwv);
  @@ -244,11 +244,13 @@
   {
       apr_file_printf(errfile, "Usage:\n");
       apr_file_printf(errfile, "\thtpasswd [-cmdps] passwordfile username\n");
  -    apr_file_printf(errfile, "\thtpasswd -b[cmdps] passwordfile username password\n\n");
  +    apr_file_printf(errfile, "\thtpasswd -b[cmdps] passwordfile username "
  +                    "password\n\n");
       apr_file_printf(errfile, "\thtpasswd -n[mdps] username\n");
       apr_file_printf(errfile, "\thtpasswd -nb[mdps] username password\n");
       apr_file_printf(errfile, " -c  Create a new file.\n");
  -    apr_file_printf(errfile, " -n  Don't update file; display results on stdout.\n");
  +    apr_file_printf(errfile, " -n  Don't update file; display results on "
  +                    "stdout.\n");
       apr_file_printf(errfile, " -m  Force MD5 encryption of the password"
   #if defined(WIN32) || defined(TPF) || defined(NETWARE)
           " (default)"
  @@ -261,10 +263,11 @@
               ".\n");
       apr_file_printf(errfile, " -p  Do not encrypt the password (plaintext).\n");
       apr_file_printf(errfile, " -s  Force SHA encryption of the password.\n");
  -    apr_file_printf(errfile, " -b  Use the password from the command line rather "
  -            "than prompting for it.\n");
  +    apr_file_printf(errfile, " -b  Use the password from the command line "
  +            "rather than prompting for it.\n");
       apr_file_printf(errfile,
  -            "On Windows, NetWare and TPF systems the '-m' flag is used by default.\n");
  +            "On Windows, NetWare and TPF systems the '-m' flag is used by "
  +            "default.\n");
       apr_file_printf(errfile,
               "On all other systems, the '-p' flag will probably not work.\n");
       exit(ERR_SYNTAX);
  @@ -406,8 +409,8 @@
       }
       *user = apr_pstrdup(pool, argv[i + 1]);
       if ((arg = strchr(*user, ':')) != NULL) {
  -        apr_file_printf(errfile, "%s: username contains illegal character '%c'\n",
  -                argv[0], *arg);
  +        apr_file_printf(errfile, "%s: username contains illegal "
  +                        "character '%c'\n", argv[0], *arg);
           exit(ERR_BADUSER);
       }
       if (*mask & APHTP_NONINTERACTIVE) {
  @@ -482,8 +485,8 @@
   
   #if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
       if (alg == ALG_PLAIN) {
  -        apr_file_printf(errfile,"Warning: storing passwords as plain text might "
  -                "just not work on this platform.\n");
  +        apr_file_printf(errfile,"Warning: storing passwords as plain text "
  +                        "might just not work on this platform.\n");
       }
   #endif
       if (! mask & APHTP_NOFILE) {
  @@ -505,8 +508,8 @@
            * to it (rather than creation of a new one).
            */
           if ((! mask & APHTP_NEWFILE) && (! readable(pool, pwfilename))) {
  -            apr_file_printf(errfile, "%s: cannot open file %s for read access\n",
  -                    argv[0], pwfilename);
  +            apr_file_printf(errfile, "%s: cannot open file %s for read "
  +                            "access\n", argv[0], pwfilename);
               perror("apr_file_open");
               exit(ERR_FILEPERM);
           }
  @@ -527,8 +530,8 @@
            * Now verify that the file is writable!
            */
           if (! writable(pool, pwfilename)) {
  -            apr_file_printf(errfile, "%s: cannot open file %s for write access\n",
  -                    argv[0], pwfilename);
  +            apr_file_printf(errfile, "%s: cannot open file %s for write "
  +                            "access\n", argv[0], pwfilename);
               perror("apr_file_open");
               exit(ERR_FILEPERM);
           }