Home | History | Annotate | Download | only in src

Lines Matching refs:line

43 static const char *unslashquote(const char *line, char *param);
123 char *line;
133 line = aline;
136 /* line with # in the first non-blank column is a comment! */
137 while(*line && ISSPACE(*line))
138 line++;
140 switch(*line) {
152 option = line;
157 while(*line && !ISSPACE(*line) && !ISSEP(*line, dashed_option))
158 line++;
161 if(*line)
162 *line++ = '\0'; /* zero terminate, we have a local copy of the data */
169 while(*line && (ISSPACE(*line) || ISSEP(*line, dashed_option)))
170 line++;
173 if(*line == '\"') {
175 line++;
176 param = malloc(strlen(line) + 1); /* parameter */
184 (void)unslashquote(line, param);
187 param = line; /* parameter starts here */
188 while(*line && !ISSPACE(*line))
189 line++;
191 if(*line) {
192 *line = '\0'; /* zero terminate */
195 line++;
197 while(*line && ISSPACE(*line))
198 line++;
200 switch(*line) {
208 "white space in the line that may cause side-effects!\n",
283 * Copies the string from line to the buffer at param, unquoting
289 static const char *unslashquote(const char *line, char *param)
291 while(*line && (*line != '\"')) {
292 if(*line == '\\') {
294 line++;
297 switch(out = *line) {
314 line++;
317 *param++ = *line++;
320 return line;
324 * Reads a line from the given file, ensuring is NUL terminated.
332 char *line = NULL;
337 if(!line) {
338 line = strdup(buf);
339 if(!line)
344 size_t linelen = strlen(line);
345 ptr = realloc(line, linelen + strlen(buf) + 1);
347 Curl_safefree(line);
350 line = ptr;
351 strcpy(&line[linelen], buf);
353 nl = strchr(line, '\n');
359 return line;