Deleted Added
full compact
el.c (24156) el.c (26926)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Christos Zoulas of Cornell University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 287 unchanged lines hidden (view full) ---

296 (void)snprintf(path, sizeof(path), "%s%s", ptr, elpath);
297 fname = path;
298 }
299 }
300
301 if ((fp = fopen(fname, "r")) == NULL)
302 return -1;
303
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Christos Zoulas of Cornell University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 287 unchanged lines hidden (view full) ---

296 (void)snprintf(path, sizeof(path), "%s%s", ptr, elpath);
297 fname = path;
298 }
299 }
300
301 if ((fp = fopen(fname, "r")) == NULL)
302 return -1;
303
304 while ((ptr = fgetln(fp, &len)) != NULL)
305 ptr[len - 1] = '\0';
304 while ((ptr = fgetln(fp, &len)) != NULL) {
305 if (ptr[len - 1] == '\n')
306 --len;
307 ptr[len] = '\0';
308
306 if (parse_line(el, ptr) == -1) {
307 (void) fclose(fp);
308 return -1;
309 }
309 if (parse_line(el, ptr) == -1) {
310 (void) fclose(fp);
311 return -1;
312 }
313 }
310
311 (void) fclose(fp);
312 return 0;
313}
314
315
316/* el_resize():
317 * Called from program when terminal is resized

--- 17 unchanged lines hidden ---
314
315 (void) fclose(fp);
316 return 0;
317}
318
319
320/* el_resize():
321 * Called from program when terminal is resized

--- 17 unchanged lines hidden ---