Commit 7e6734a0 authored by Gerald Carter's avatar Gerald Carter Committed by Gerald (Jerry) Carter
Browse files

r1087: BUG 1221: revert old change that used single and double quotes as...

r1087: BUG 1221: revert old change that used single and double quotes as delimters in next_token(), and change print_parameter() to print out parm values surrounded by double quotes (instead of single quotes)
(This used to be commit b0739b073a1db8b0b163726a1d181b2f05d71883)
parent 2fc57c9a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ BOOL next_token(const char **ptr,char *buff, const char *sep, size_t bufsize)
	/* copy over the token */
	pbuf = buff;
	for (quoted = False; len < bufsize && *s && (quoted || !strchr_m(sep,*s)); s++) {
		if (*s == '\"' || *s == '\'') {
		if ( *s == '\"' ) {
			quoted = !quoted;
		} else {
			len++;
+2 −2
Original line number Diff line number Diff line
@@ -3273,9 +3273,9 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f)
				char **list = *(char ***)ptr;
				
				for (; *list; list++) {
					/* surround strings with whitespace in single quotes */
					/* surround strings with whitespace in double quotes */
					if ( strchr_m( *list, ' ' ) )
						fprintf(f, "\'%s\'%s", *list, ((*(list+1))?", ":""));
						fprintf(f, "\"%s\"%s", *list, ((*(list+1))?", ":""));
					else
						fprintf(f, "%s%s", *list, ((*(list+1))?", ":""));
				}