Lines Matching defs: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++;
190 *line = '\0'; /* zero terminate */
193 line++;
195 while(*line && ISSPACE(*line))
196 line++;
198 switch(*line) {
206 " the line that may cause side-effects!\n",
284 * Copies the string from line to the buffer at param, unquoting
290 static const char *unslashquote(const char *line, char *param)
292 while(*line && (*line != '\"')) {
293 if(*line == '\\') {
295 line++;
298 switch(out = *line) {
315 line++;
318 *param++ = *line++;
321 return line;
325 * Reads a line from the given file, ensuring is NUL terminated.
333 char *line = NULL;
338 if(!line) {
339 line = strdup(buf);
340 if(!line)
345 size_t linelen = strlen(line);
346 ptr = realloc(line, linelen + strlen(buf) + 1);
348 Curl_safefree(line);
351 line = ptr;
352 strcpy(&line[linelen], buf);
354 nl = strchr(line, '\n');
360 return line;