FreeBSD Bugzilla – Attachment 5647 Details for
Bug 13364
Patch to wc(1) for Unix 98 compliance.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.30 KB, created by
howardjp
on 1999-08-25 03:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
howardjp
Created:
1999-08-25 03:50:01 UTC
Size:
2.30 KB
patch
obsolete
>diff -c /usr/src/usr.bin/wc/wc.1 /usr/local/src/wc/wc.1 >*** /usr/src/usr.bin/wc/wc.1 Mon Aug 25 06:44:58 1997 >--- /usr/local/src/wc/wc.1 Tue Aug 24 16:26:35 1999 >*************** >*** 40,49 **** > .Os > .Sh NAME > .Nm wc >! .Nd word, line, and byte count > .Sh SYNOPSIS > .Nm wc >! .Op Fl clw > .Op Ar > .Sh DESCRIPTION > The >--- 40,49 ---- > .Os > .Sh NAME > .Nm wc >! .Nd word, line, byte, and character count > .Sh SYNOPSIS > .Nm wc >! .Op Fl clmw > .Op Ar > .Sh DESCRIPTION > The >*************** >*** 71,76 **** >--- 71,79 ---- > .It Fl l > The number of lines in each input file > is written to the standard output. >+ .It Fl m >+ The number of characters in each input file >+ is written to the standard output. > .It Fl w > The number of words in each input file > is written to the standard output. >*************** >*** 80,85 **** >--- 83,93 ---- > .Nm > only reports the information requested by that option. > The default action is equivalent to specifying all of the flags. >+ If >+ .Fl c >+ and >+ .Fl m >+ are both specified, the information is given only once. > .Pp > If no files are specified, the standard input is used and no > file name is displayed. >diff -c /usr/src/usr.bin/wc/wc.c /usr/local/src/wc/wc.c >*** /usr/src/usr.bin/wc/wc.c Mon Aug 25 06:44:59 1997 >--- /usr/local/src/wc/wc.c Tue Aug 24 16:03:02 1999 >*************** >*** 74,80 **** > > (void) setlocale(LC_CTYPE, ""); > >! while ((ch = getopt(argc, argv, "lwc")) != -1) > switch((char)ch) { > case 'l': > doline = 1; >--- 74,80 ---- > > (void) setlocale(LC_CTYPE, ""); > >! while ((ch = getopt(argc, argv, "lwmc")) != -1) > switch((char)ch) { > case 'l': > doline = 1; >*************** >*** 82,87 **** >--- 82,97 ---- > case 'w': > doword = 1; > break; >+ case 'm': >+ /* >+ * Unix 98 demands that wc accept a -m argument >+ * which counts the number of characters in >+ * a file. This is for systems which might >+ * have a two byte newline or other strange >+ * characters. Under FreeBSD, this will be >+ * identical to -c. >+ */ >+ /* FALLTHROUGH */ > case 'c': > dochar = 1; > break; >*************** >*** 236,241 **** > void > usage() > { >! (void)fprintf(stderr, "usage: wc [-clw] [file ...]\n"); > exit(1); > } >--- 246,251 ---- > void > usage() > { >! (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); > exit(1); > }
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 13364
: 5647