Changeset c529ac8


Ignore:
Timestamp:
Aug 15, 2009, 7:08:17 PM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
65b2173
Parents:
712caac
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 03:11:28)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:17)
Message:
Add new function strs, to (later) cast char *const * to const char *const *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cmd.c

    r4d86e06 rc529ac8  
    9595  if (argc < 1) return(NULL);
    9696
    97   retval = _owl_cmddict_execute(cd, ctx, argv, argc, cmdbuff);
     97  retval = _owl_cmddict_execute(cd, ctx, strs(argv), argc, cmdbuff);
    9898
    9999  owl_parsefree(argv, argc);
  • filter.c

    rd43edd2 rc529ac8  
    88
    99  argv=owl_parseline(string, &argc);
    10   out=owl_filter_init(f, name, argc, argv);
     10  out=owl_filter_init(f, name, argc, strs(argv));
    1111  owl_parsefree(argv, argc);
    1212  return(out);
  • owl.c

    r4d86e06 rc529ac8  
    5858
    5959  argcsave=argc;
    60   argvsave=argv;
     60  argvsave=strs(argv);
    6161  configfile=NULL;
    6262  confdir = NULL;
  • owl.h

    r712caac rc529ac8  
    201201}
    202202#endif
     203
     204/* Convert char ** into char **.  This conversion is safe,
     205 * and implicit in C++ (conv.qual 4) but for some reason not in C. */
     206static inline char **strs(char **pstr)
     207{
     208  return (char **)pstr;
     209}
    203210
    204211typedef struct _owl_variable {
  • zwrite.c

    rd43edd2 rc529ac8  
    2525
    2626  /* parse the command line for options */
    27   argv=myargv=owl_parseline(line, &argc);
     27  argv=owl_parseline(line, &argc);
     28  myargv=strs(argv);
    2829  if (argc<0) {
    2930    owl_function_error("Unbalanced quotes in zwrite");
Note: See TracChangeset for help on using the changeset viewer.