httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org (Ralf S. Engelschall)
Subject cvs commit: apache-1.3/src/main http_config.c http_main.c
Date Mon, 16 Mar 1998 12:09:56 GMT
rse         98/03/16 04:09:56

  Modified:    src/main http_config.c http_main.c
  Log:
  More cosmetics:
  - make -v and -V messages equal in style
  - make usage message readable and avoid line wrapping
  - compress the ``httpd -h'' output a little bit for easier reading
  
  Revision  Changes    Path
  1.106     +1 -2      apache-1.3/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_config.c,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- http_config.c	1998/03/13 19:20:13	1.105
  +++ http_config.c	1998/03/16 12:09:52	1.106
  @@ -1520,10 +1520,9 @@
   
       for (n = 0; preloaded_modules[n]; ++n)
   	for (pc = preloaded_modules[n]->cmds; pc && pc->name; ++pc) {
  -	    printf("%s\n", pc->name);
  +	    printf("%s (%s)\n", pc->name, preloaded_modules[n]->name);
   	    if (pc->errmsg)
   		printf("\t%s\n", pc->errmsg);
  -	    printf("\t%s\n", preloaded_modules[n]->name);
   	    show_overrides(pc, preloaded_modules[n]);
   	}
   }
  
  
  
  1.304     +27 -18    apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.303
  retrieving revision 1.304
  diff -u -r1.303 -r1.304
  --- http_main.c	1998/03/14 02:43:45	1.303
  +++ http_main.c	1998/03/16 12:09:54	1.304
  @@ -777,15 +777,24 @@
   
   void usage(char *bin)
   {
  -    fprintf(stderr, "Usage: %s [-d directory] [-f file] [-C \"directive\"] [-c \"directive\"]
[-v] [-h] [-l]\n", bin);
  -    fprintf(stderr, "-d directory : specify an alternate initial ServerRoot\n");
  -    fprintf(stderr, "-f file : specify an alternate ServerConfigFile\n");
  -    fprintf(stderr, "-C \"directive\" : process directive before reading config files\n");
  -    fprintf(stderr, "-c \"directive\" : process directive after reading config files\n");
  -    fprintf(stderr, "-v : show version number\n");
  -    fprintf(stderr, "-V : show compile settings\n");
  -    fprintf(stderr, "-h : list directives\n");
  -    fprintf(stderr, "-l : list modules\n");
  +    char pad[MAX_STRING_LEN];
  +    int i;
  +
  +    for (i = 0; i < strlen(bin); i++)
  +	pad[i] = ' ';
  +    pad[i] = '\0';
  +    fprintf(stderr, "Usage: %s [-d directory] [-f file]\n", bin);
  +    fprintf(stderr, "       %s [-C \"directive\"] [-c \"directive\"]\n", pad);
  +    fprintf(stderr, "       %s [-v] [-V] [-h] [-l]\n", pad);
  +    fprintf(stderr, "Options:\n");
  +    fprintf(stderr, "  -d directory     : specify an alternate initial ServerRoot\n");
  +    fprintf(stderr, "  -f file          : specify an alternate ServerConfigFile\n");
  +    fprintf(stderr, "  -C \"directive\"   : process directive before reading config files\n");
  +    fprintf(stderr, "  -c \"directive\"   : process directive after  reading config files\n");
  +    fprintf(stderr, "  -v               : show version number\n");
  +    fprintf(stderr, "  -V               : show compile settings\n");
  +    fprintf(stderr, "  -h               : list available configuration directives\n");
  +    fprintf(stderr, "  -l               : list compiled-in modules\n");
       exit(1);
   }
   
  @@ -2867,12 +2876,13 @@
   static void show_compile_settings(void)
   {
   #ifdef SERVER_SUBVERSION
  -    printf("Server base version: \"%s\"\n", SERVER_BASEVERSION);
  -    printf("Server sub-version:  \"%s\"\n", SERVER_SUBVERSION);
  +    printf("Server base version: %s\n", SERVER_BASEVERSION);
  +    printf("Server sub-version:  %s\n", SERVER_SUBVERSION);
  +    printf("Server built:        %s\n", apapi_get_server_built());
   #else
  -    printf("Server version \"%s\"\n", apapi_get_server_version());
  +    printf("Server version: %s\n", apapi_get_server_version());
  +    printf("Server built:   %s\n", apapi_get_server_built());
   #endif
  -    printf("Server built:  %s\n", apapi_get_server_built());
       printf("Server's Module Magic Number: %u\n", MODULE_MAGIC_NUMBER);
       printf("Server compiled with....\n");
   #ifdef BIG_SECURITY_HOLE
  @@ -2953,7 +2963,6 @@
   #ifdef NEED_HASHBANG_EMUL
       printf(" -D NEED_HASHBANG_EMUL\n");
   #endif
  -    printf("\n");
   }
   
   
  @@ -3882,8 +3891,8 @@
   	    ap_cpystrn(server_confname, optarg, sizeof(server_confname));
   	    break;
   	case 'v':
  -	    printf("Server version %s.\n", apapi_get_server_version());
  -	    printf("Server built:  %s\n", apapi_get_server_built());
  +	    printf("Server version: %s\n", apapi_get_server_version());
  +	    printf("Server built:   %s\n", apapi_get_server_built());
   	    exit(0);
   	case 'V':
   	    show_compile_settings();
  @@ -4979,8 +4988,8 @@
   	    ap_cpystrn(server_confname, optarg, sizeof(server_confname));
   	    break;
   	case 'v':
  -	    printf("Server version %s.\n", apapi_get_server_version());
  -	    printf("Server built:  %s\n", apapi_get_server_built());
  +	    printf("Server version: %s\n", apapi_get_server_version());
  +	    printf("Server built:   %s\n", apapi_get_server_built());
   	    exit(0);
   	case 'V':
   	    show_compile_settings();
  
  
  

Mime
View raw message