out ignominiously when given no arguments :-)
git-svn-id: svn://svn.tartarus.org/sgt/putty@1815
cda61777-01e9-0310-a592-
d414129be87e
#ifdef TESTMODE
/* Definitions to allow this module to be compiled standalone for testing. */
#define smalloc malloc
+#define srealloc realloc
+#define sfree free
#endif
/*
*/
/*
+ * First deal with the simplest of all special cases: if there
+ * aren't any arguments, return 0,NULL,NULL.
+ */
+ while (*cmdline && isspace(*cmdline)) cmdline++;
+ if (!*cmdline) {
+ if (argc) *argc = 0;
+ if (argv) *argv = NULL;
+ if (argstart) *argstart = NULL;
+ return;
+ }
+
+ /*
* This will guaranteeably be big enough; we can realloc it
* down later.
*/
return 0;
}
-#endif
\ No newline at end of file
+#endif