comparison lib/xwrap.c @ 1666:10922d83392a draft

Remove trailing whitespace.
author Rob Landley <rob@landley.net>
date Sun, 18 Jan 2015 14:06:14 -0600
parents 492bd41f8b9a
children 4a6a53da1c53
comparison
equal deleted inserted replaced
1665:5d003cc2fa16 1666:10922d83392a
347 if(stat(path, st)) perror_exit("Can't stat %s", path); 347 if(stat(path, st)) perror_exit("Can't stat %s", path);
348 } 348 }
349 349
350 // Cannonicalize path, even to file with one or more missing components at end. 350 // Cannonicalize path, even to file with one or more missing components at end.
351 // if exact, require last path component to exist 351 // if exact, require last path component to exist
352 char *xabspath(char *path, int exact) 352 char *xabspath(char *path, int exact)
353 { 353 {
354 struct string_list *todo, *done = 0; 354 struct string_list *todo, *done = 0;
355 int try = 9999, dirfd = open("/", 0);; 355 int try = 9999, dirfd = open("/", 0);;
356 char buf[4096], *ret; 356 char buf[4096], *ret;
357 357
608 double d; 608 double d;
609 long l; 609 long l;
610 610
611 if (CFG_TOYBOX_FLOAT) d = strtod(arg, &arg); 611 if (CFG_TOYBOX_FLOAT) d = strtod(arg, &arg);
612 else l = strtoul(arg, &arg, 10); 612 else l = strtoul(arg, &arg, 10);
613 613
614 // Parse suffix 614 // Parse suffix
615 if (*arg) { 615 if (*arg) {
616 int ismhd[]={1,60,3600,86400}, i = stridx("smhd", *arg); 616 int ismhd[]={1,60,3600,86400}, i = stridx("smhd", *arg);
617 617
618 if (i == -1) error_exit("Unknown suffix '%c'", *arg); 618 if (i == -1) error_exit("Unknown suffix '%c'", *arg);