Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/winf.h')
-rw-r--r--winsup/cygwin/winf.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/winsup/cygwin/winf.h b/winsup/cygwin/winf.h
index 493350303..3dd63b5e0 100644
--- a/winsup/cygwin/winf.h
+++ b/winsup/cygwin/winf.h
@@ -34,18 +34,16 @@ class av
memcpy (argv, av_in, (argc + 1) * sizeof (char *));
}
void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;}
- void set (int ac_in, const char * const *av_in) {new (this) av (ac_in, av_in);}
~av ()
{
if (argv)
{
for (int i = 0; i < calloced; i++)
- if (argv[i])
- cfree (argv[i]);
+ cfree (argv[i]);
cfree (argv);
}
}
- int unshift (const char *what, int conv = 0);
+ int unshift (const char *what, int conv = 0) __reg2;
operator char **() {return argv;}
void all_calloced () {calloced = argc;}
void replace0_maybe (const char *arg0)
@@ -54,20 +52,17 @@ class av
if (!calloced)
{
argv[0] = cstrdup1 (arg0);
- calloced = true;
+ calloced = 1;
}
}
- void dup_maybe (int i)
- {
- if (i >= calloced)
- argv[i] = cstrdup1 (argv[i]);
- }
void dup_all ()
{
for (int i = calloced; i < argc; i++)
argv[i] = cstrdup1 (argv[i]);
+ calloced = argc;
}
- int fixup (const char *, path_conv&, const char *, bool);
+ int setup (const char *, path_conv&, const char *, int, const char *const *,
+ bool) __reg3;
};
class linebuf