CVS update [cvs1-11-x-branch]: /ccvs/os2/, /ccvs/src/, /ccvs/windows-NT/
[email protected] 28 May 2005 06:53:28 -0000
| Newsgroups | gmane.comp.version-control.cvs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Tag: cvs1-11-x-branch User: conradpino Date: 05/05/27 23:53:28 Modified: /ccvs/os2/ ChangeLog, run.c /ccvs/src/ ChangeLog, cvs.h, run.c /ccvs/windows-NT/ ChangeLog, run.c Log: "os2" directory changes follow: * run.c: Remove "run_arg" to synchronize with "../windows-NT/run.c". Function "run_add_arg" scope was "static" and is now "extern" scope. Synchronize "piped_child" function arguments with feature branch. All "run_arg" calls are fixed with macro defined in "../src/cvs.h". FIXME: Functions "run_add_arg_p" and "run_arg_free_p" are undefined. "src" directory changes follow: * cvs.h: Replace "run_arg" function with "#define run_arg run_add_arg", add "run_add_arg" prototype, change "piped_child" prototype to be same as feature branch to reflect "(os2,src,windows-NT)/run.c" changes. * run.c: Remove "run_arg" to synchronize with "../windows-NT/run.c". Function "run_add_arg" scope was "static" and is now "extern" scope. Synchronize "piped_child" function arguments with feature branch. "windows-NT" directory changes follow: * run.c: Import feature branch revision 1.20 as base for adding new "run_add_arg_p" and "run_arg_free_p" functions. Imported revision removes "run_arg" function and adds unused "run_piped" function. All "run_arg" calls are fixed with macro defined in "../src/cvs.h". FIXME: Functions "run_add_arg_p" and "run_arg_free_p" are undefined. File Changes: Directory: /ccvs/os2/ ===================== File [changed]: ChangeLog Url: https://ccvs.cvshome.org/source/browse/ccvs/os2/ChangeLog?r1=1.192.4.4&r2=1.192.4.5 Delta lines: +8 -0 ------------------- --- ChangeLog 5 Apr 2004 00:29:32 -0000 1.192.4.4 +++ ChangeLog 28 May 2005 06:53:24 -0000 1.192.4.5 @@ -1,3 +1,11 @@ +2005-05-27 Conrad T. Pino <[email protected]> + + * run.c: Remove "run_arg" to synchronize with "../windows-NT/run.c". + Function "run_add_arg" scope was "static" and is now "extern" scope. + Synchronize "piped_child" function arguments with feature branch. + All "run_arg" calls are fixed with macro defined in "../src/cvs.h". + FIXME: Functions "run_add_arg_p" and "run_arg_free_p" are undefined. + 2004-04-04 Derek Price <[email protected]> * filesubr.c (isabsolute): Remove this function. File [changed]: run.c Url: https://ccvs.cvshome.org/source/browse/ccvs/os2/run.c?r1=1.24&r2=1.24.4.1 Delta lines: +4 -12 -------------------- --- run.c 6 Dec 2002 19:58:39 -0000 1.24 +++ run.c 28 May 2005 06:53:24 -0000 1.24.4.1 @@ -31,7 +31,6 @@ #define STDOUT 1 #define STDERR 2 -static void run_add_arg PROTO((const char *s)); static void run_init_prog PROTO((void)); extern char *strtok (); @@ -42,8 +41,8 @@ * arguments will be parsed into whitespace separated words and added to the * global run_argv list. * - * Then, optionally call run_arg() for each additional argument that you'd like - * to pass to the executed program. + * Then, optionally call run_add_arg() for each additional argument that + * you'd like to pass to the executed program. * * Finally, call run_exec() to execute the program with the specified * arguments. @@ -82,13 +81,6 @@ free (run_prog) } -void -run_arg (s) - const char *s; -{ - run_add_arg (s); -} - /* Return a malloc'd copy of s, with double quotes around it. */ static char * quote (const char *s) @@ -106,7 +98,7 @@ return copy; } -static void +void run_add_arg (s) const char *s; { @@ -423,7 +415,7 @@ Return the handle of the child process (this is what _cwait and waitpid expect). */ int -piped_child (char **argv, int *to, int *from) +piped_child (char *const *argv, int *to, int *from) { fprintf (stderr, "Error: piped_child() is unimplemented.\n"); Directory: /ccvs/src/ ===================== File [changed]: ChangeLog Url: https://ccvs.cvshome.org/source/browse/ccvs/src/ChangeLog?r1=1.2336.2.376&r2=1.2336.2.377 Delta lines: +9 -0 ------------------- --- ChangeLog 27 May 2005 18:17:01 -0000 1.2336.2.376 +++ ChangeLog 28 May 2005 06:53:24 -0000 1.2336.2.377 @@ -1,3 +1,12 @@ +2005-05-27 Conrad T. Pino <[email protected]> + + * cvs.h: Replace "run_arg" function with "#define run_arg run_add_arg", + add "run_add_arg" prototype, change "piped_child" prototype to be same + as feature branch to reflect "(os2,src,windows-NT)/run.c" changes. + * run.c: Remove "run_arg" to synchronize with "../windows-NT/run.c". + Function "run_add_arg" scope was "static" and is now "extern" scope. + Synchronize "piped_child" function arguments with feature branch. + 2005-05-27 Derek Price <[email protected]> * client.c (send_arg): Make arg const. File [changed]: cvs.h Url: https://ccvs.cvshome.org/source/browse/ccvs/src/cvs.h?r1=1.235.4.32&r2=1.235.4.33 Delta lines: +4 -2 ------------------- --- cvs.h 27 May 2005 16:25:10 -0000 1.235.4.32 +++ cvs.h 28 May 2005 06:53:25 -0000 1.235.4.33 @@ -698,17 +698,19 @@ #define RUN_SIGIGNORE 0x0010 /* ignore interrupts for command */ #define RUN_TTY (char *)0 /* for the benefit of lint */ +void run_add_arg PROTO ((const char *s)); void run_add_arg_p PROTO ((int *, size_t *, char ***, const char *s)); +#define run_arg run_add_arg void run_arg_free_p PROTO ((int, char **)); -void run_arg PROTO((const char *s)); void run_print PROTO((FILE * fp)); void run_setup PROTO ((const char *prog)); int run_exec PROTO((const char *stin, const char *stout, const char *sterr, int flags)); +int run_piped PROTO ((int *, int *)); /* other similar-minded stuff from run.c. */ FILE *run_popen PROTO((const char *, const char *)); -int piped_child PROTO((const char **, int *, int *)); +int piped_child PROTO((const char *const *, int *, int *)); void close_on_exec PROTO((int)); pid_t waitpid PROTO((pid_t, int *, int)); File [changed]: run.c Url: https://ccvs.cvshome.org/source/browse/ccvs/src/run.c?r1=1.33.6.4&r2=1.33.6.5 Delta lines: +4 -13 -------------------- --- run.c 27 May 2005 16:25:11 -0000 1.33.6.4 +++ run.c 28 May 2005 06:53:25 -0000 1.33.6.5 @@ -18,8 +18,6 @@ extern int execvp PROTO((char *file, char **argv)); #endif -static void run_add_arg PROTO((const char *s)); - extern char *strtok (); /* @@ -27,8 +25,8 @@ * arguments. The argument to run_setup will be parsed into whitespace * separated words and added to the global run_argv list. * - * Then, optionally call run_arg() for each additional argument that you'd like - * to pass to the executed program. + * Then, optionally call run_add_arg() for each additional argument that + * you'd like to pass to the executed program. * * Finally, call run_exec() to execute the program with the specified arguments. * The execvp() syscall will be used, so that the PATH is searched correctly. @@ -70,13 +68,6 @@ free (run_prog); } -void -run_arg (s) - const char *s; -{ - run_add_arg (s); -} - void @@ -101,7 +92,7 @@ -static void +void run_add_arg (s) const char *s; { @@ -419,7 +410,7 @@ int piped_child (command, tofdp, fromfdp) - const char **command; + const char *const *command; int *tofdp; int *fromfdp; { Directory: /ccvs/windows-NT/ ============================ File [changed]: ChangeLog Url: https://ccvs.cvshome.org/source/browse/ccvs/windows-NT/ChangeLog?r1=1.158.2.33&r2=1.158.2.34 Delta lines: +8 -0 ------------------- --- ChangeLog 9 Feb 2005 03:52:28 -0000 1.158.2.33 +++ ChangeLog 28 May 2005 06:53:25 -0000 1.158.2.34 @@ -1,3 +1,11 @@ +2005-05-27 Conrad T. Pino <[email protected]> + + * run.c: Import feature branch revision 1.20 as base for adding new + "run_add_arg_p" and "run_arg_free_p" functions. Imported revision + removes "run_arg" function and adds unused "run_piped" function. + All "run_arg" calls are fixed with macro defined in "../src/cvs.h". + FIXME: Functions "run_add_arg_p" and "run_arg_free_p" are undefined. + 2005-02-08 Derek Price <[email protected]> * config.h.in: Clarify comments. File [changed]: run.c Url: https://ccvs.cvshome.org/source/browse/ccvs/windows-NT/run.c?r1=1.16.8.1&r2=1.16.8.2 Delta lines: +21 -16 --------------------- --- run.c 20 Mar 2004 18:15:24 -0000 1.16.8.1 +++ run.c 28 May 2005 06:53:25 -0000 1.16.8.2 @@ -22,10 +22,7 @@ #include <io.h> #include <fcntl.h> -static void run_add_arg PROTO((const char *s)); -static void run_init_prog PROTO((void)); -extern char *strtok (); /* * To exec a program under CVS, first call run_setup() to setup any initial @@ -72,12 +69,7 @@ free (run_prog); } -void -run_arg (s) - const char *s; -{ - run_add_arg (s); -} + /* Return a malloc'd copy of s, with double quotes around it. */ static char * @@ -108,7 +100,9 @@ return copy; } -static void + + +void run_add_arg (s) const char *s; { @@ -116,8 +110,7 @@ if (run_argc >= run_argc_allocated) { run_argc_allocated += 50; - run_argv = (char **) xrealloc ((char *) run_argv, - run_argc_allocated * sizeof (char **)); + run_argv = xrealloc (run_argv, run_argc_allocated * sizeof (char **)); } if (s) @@ -126,9 +119,11 @@ run_argc++; } else - run_argv[run_argc] = (char *) 0; /* not post-incremented on purpose! */ + run_argv[run_argc] = NULL; /* not post-incremented on purpose! */ } + + int run_exec (stin, stout, sterr, flags) const char *stin; @@ -524,7 +519,7 @@ construct a command line that one might pass to CreateProcess. Try to quote things appropriately. */ static char * -build_command (char **argv) +build_command (char *const *argv) { int len; @@ -597,7 +592,7 @@ Return the handle of the child process (this is what _cwait and waitpid expect). */ int -piped_child (const char **argv, int *to, int *from) +piped_child (char *const *argv, int *to, int *from) { int child; HANDLE pipein[2], pipeout[2]; @@ -605,7 +600,7 @@ /* Turn argv into a form acceptable to CreateProcess. */ command = build_command (argv); - if (! command) + if (!command) return -1; /* Create pipes for communicating with child. Arrange for @@ -697,6 +692,16 @@ } + +int +run_piped (int *tofdp, int *fromfdp) +{ + run_add_arg (NULL); + return piped_child (run_argv, tofdp, fromfdp); +} + + + /* Arrange for the file descriptor FD to not be inherited by child processes. At the moment, CVS uses this function only on pipes returned by piped_child, and our implementation of piped_child