Support proper %g, %f, and %a float formatting

See #61
See #104
This commit is contained in:
Justine Tunney 2021-03-05 10:31:16 -08:00
parent e26bdbec52
commit f064183646
48 changed files with 1034 additions and 921 deletions

View file

@ -135,8 +135,8 @@ int getopt(int nargc, char *const nargv[], const char *ostr) {
if (optopt == ':' || (oli = strchr(ostr, optopt)) == NULL) {
if (*getopt_place == 0) ++optind;
if (opterr && *ostr != ':') {
fprintf(stderr, "%s: illegal option -- %c\n", program_invocation_name,
optopt);
fprintf(stderr, "%s%s%c\n", program_invocation_name,
": illegal option -- ", optopt);
}
return (BADCH);
}
@ -157,8 +157,8 @@ int getopt(int nargc, char *const nargv[], const char *ostr) {
getopt_place = kGetoptEmsg;
if (*ostr == ':') return (BADARG);
if (opterr)
fprintf(stderr, "%s: option requires an argument -- %c\n",
program_invocation_name, optopt);
fprintf(stderr, "%s%s%c\n", program_invocation_name,
": option requires an argument -- ", optopt);
return (BADCH);
}
getopt_place = kGetoptEmsg;