FreeBSD Bugzilla – Attachment 5434 Details for
Bug 12994
Update to getopt.3 to agree with style.9
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.06 KB, created by
howardjp
on 1999-08-06 01:00:06 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
howardjp
Created:
1999-08-06 01:00:06 UTC
Size:
1.06 KB
patch
obsolete
>*** getopt.3.orig Thu Aug 5 19:31:46 1999 >--- getopt.3 Thu Aug 5 19:41:08 1999 >*************** >*** 245,251 **** > The following code fragment works in most cases. > .Bd -literal -offset indent > int length; >! char *p; > > while ((ch = getopt(argc, argv, "0123456789")) != -1) > switch (ch) { >--- 245,251 ---- > The following code fragment works in most cases. > .Bd -literal -offset indent > int length; >! char *p, *ep; > > while ((ch = getopt(argc, argv, "0123456789")) != -1) > switch (ch) { >*************** >*** 253,261 **** > case '5': case '6': case '7': case '8': case '9': > p = argv[optind - 1]; > if (p[0] == '-' && p[1] == ch && !p[2]) >! length = atoi(++p); > else >! length = atoi(argv[optind] + 1); > break; > } > .Ed >--- 253,263 ---- > case '5': case '6': case '7': case '8': case '9': > p = argv[optind - 1]; > if (p[0] == '-' && p[1] == ch && !p[2]) >! length = strtol(++p, &ep, 10); > else >! length = strtol(argv[optind] + 1, &ep, 10); >! if (length <= 0 || *ep != '\e0') >! err("illegal number -- %s", optarg); > break; > } > .Ed
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12994
: 5434