You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bj...@locus.apache.org on 2000/11/26 04:43:52 UTC

cvs commit: apr/threadproc/os2 proc.c

bjh         00/11/25 19:43:52

  Modified:    threadproc/os2 proc.c
  Log:
  OS/2: const'ifying the args to apr_create_process() has a ripple effect....
  
  Revision  Changes    Path
  1.35      +4 -4      apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/os2/proc.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- proc.c	2000/11/26 02:03:11	1.34
  +++ proc.c	2000/11/26 03:43:51	1.35
  @@ -253,7 +253,7 @@
   /* quotes in the string are doubled up.
    * Used to escape quotes in args passed to OS/2's cmd.exe
    */
  -static char *double_quotes(apr_pool_t *cntxt, char *str)
  +static char *double_quotes(apr_pool_t *cntxt, const char *str)
   {
       int num_quotes = 0;
       int len = 0;
  @@ -285,7 +285,7 @@
   {
       int i, arg, numargs, cmdlen;
       apr_status_t status;
  -    char **newargs;
  +    const char **newargs;
       char savedir[300];
       HFILE save_in, save_out, save_err, dup;
       int criticalsection = FALSE;
  @@ -386,7 +386,7 @@
           i++;
       }
   
  -    newargs = (char **)apr_palloc(cont, sizeof (char *) * (i + 4));
  +    newargs = (const char **)apr_palloc(cont, sizeof (char *) * (i + 4));
       numargs = 0;
   
       if (interpreter[0])
  @@ -416,7 +416,7 @@
       cmdline_pos = cmdline + strlen(cmdline);
   
       for (i=1; i<numargs; i++) {
  -        char *a = newargs[i];
  +        const char *a = newargs[i];
   
           if (strpbrk(a, "&|<>\" "))
               a = apr_pstrcat(cont, "\"", double_quotes(cont, a), "\"", NULL);
  
  
  

Re: cvs commit: apr/threadproc/os2 proc.c

Posted by Greg Stein <gs...@lyra.org>.
Thanks!

Needless to say, I couldn't do a test compile :-)

Cheers,
-g

On Sun, Nov 26, 2000 at 03:43:52AM -0000, bjh@locus.apache.org wrote:
> bjh         00/11/25 19:43:52
> 
>   Modified:    threadproc/os2 proc.c
>   Log:
>   OS/2: const'ifying the args to apr_create_process() has a ripple effect....
>   
>   Revision  Changes    Path
>   1.35      +4 -4      apr/threadproc/os2/proc.c
>   
>   Index: proc.c
>   ===================================================================
>   RCS file: /home/cvs/apr/threadproc/os2/proc.c,v
>   retrieving revision 1.34
>   retrieving revision 1.35
>   diff -u -r1.34 -r1.35
>   --- proc.c	2000/11/26 02:03:11	1.34
>   +++ proc.c	2000/11/26 03:43:51	1.35
>   @@ -253,7 +253,7 @@
>    /* quotes in the string are doubled up.
>     * Used to escape quotes in args passed to OS/2's cmd.exe
>     */
>   -static char *double_quotes(apr_pool_t *cntxt, char *str)
>   +static char *double_quotes(apr_pool_t *cntxt, const char *str)
>    {
>        int num_quotes = 0;
>        int len = 0;
>   @@ -285,7 +285,7 @@
>    {
>        int i, arg, numargs, cmdlen;
>        apr_status_t status;
>   -    char **newargs;
>   +    const char **newargs;
>        char savedir[300];
>        HFILE save_in, save_out, save_err, dup;
>        int criticalsection = FALSE;
>   @@ -386,7 +386,7 @@
>            i++;
>        }
>    
>   -    newargs = (char **)apr_palloc(cont, sizeof (char *) * (i + 4));
>   +    newargs = (const char **)apr_palloc(cont, sizeof (char *) * (i + 4));
>        numargs = 0;
>    
>        if (interpreter[0])
>   @@ -416,7 +416,7 @@
>        cmdline_pos = cmdline + strlen(cmdline);
>    
>        for (i=1; i<numargs; i++) {
>   -        char *a = newargs[i];
>   +        const char *a = newargs[i];
>    
>            if (strpbrk(a, "&|<>\" "))
>                a = apr_pstrcat(cont, "\"", double_quotes(cont, a), "\"", NULL);
>   
>   
>   

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apr/threadproc/os2 proc.c

Posted by Greg Stein <gs...@lyra.org>.
Thanks!

Needless to say, I couldn't do a test compile :-)

Cheers,
-g

On Sun, Nov 26, 2000 at 03:43:52AM -0000, bjh@locus.apache.org wrote:
> bjh         00/11/25 19:43:52
> 
>   Modified:    threadproc/os2 proc.c
>   Log:
>   OS/2: const'ifying the args to apr_create_process() has a ripple effect....
>   
>   Revision  Changes    Path
>   1.35      +4 -4      apr/threadproc/os2/proc.c
>   
>   Index: proc.c
>   ===================================================================
>   RCS file: /home/cvs/apr/threadproc/os2/proc.c,v
>   retrieving revision 1.34
>   retrieving revision 1.35
>   diff -u -r1.34 -r1.35
>   --- proc.c	2000/11/26 02:03:11	1.34
>   +++ proc.c	2000/11/26 03:43:51	1.35
>   @@ -253,7 +253,7 @@
>    /* quotes in the string are doubled up.
>     * Used to escape quotes in args passed to OS/2's cmd.exe
>     */
>   -static char *double_quotes(apr_pool_t *cntxt, char *str)
>   +static char *double_quotes(apr_pool_t *cntxt, const char *str)
>    {
>        int num_quotes = 0;
>        int len = 0;
>   @@ -285,7 +285,7 @@
>    {
>        int i, arg, numargs, cmdlen;
>        apr_status_t status;
>   -    char **newargs;
>   +    const char **newargs;
>        char savedir[300];
>        HFILE save_in, save_out, save_err, dup;
>        int criticalsection = FALSE;
>   @@ -386,7 +386,7 @@
>            i++;
>        }
>    
>   -    newargs = (char **)apr_palloc(cont, sizeof (char *) * (i + 4));
>   +    newargs = (const char **)apr_palloc(cont, sizeof (char *) * (i + 4));
>        numargs = 0;
>    
>        if (interpreter[0])
>   @@ -416,7 +416,7 @@
>        cmdline_pos = cmdline + strlen(cmdline);
>    
>        for (i=1; i<numargs; i++) {
>   -        char *a = newargs[i];
>   +        const char *a = newargs[i];
>    
>            if (strpbrk(a, "&|<>\" "))
>                a = apr_pstrcat(cont, "\"", double_quotes(cont, a), "\"", NULL);
>   
>   
>   

-- 
Greg Stein, http://www.lyra.org/