FreeBSD Bugzilla – Attachment 9829 Details for
Bug 19959
new variable modifiers for make(1)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.26 KB, created by
Gaspar Chilingarov
on 2000-07-15 23:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Gaspar Chilingarov
Created:
2000-07-15 23:40:01 UTC
Size:
2.26 KB
patch
obsolete
>--- make.1.orig Sun Jul 16 03:34:44 2000 >+++ make.1 Sun Jul 16 03:38:05 2000 >@@ -595,6 +595,8 @@ > Replaces each word in the variable with its suffix. > .It Cm H > Replaces each word in the variable with everything but the last component. >+.It Cm L >+Converts variable to lower-case letters. > .It Cm M Ns Ar pattern > Select only those words that match the rest of the modifier. > The standard shell wildcard characters >@@ -684,6 +686,8 @@ > .Ar old_string > to be replaced in > .Ar new_string >+.It Cm U >+Converts variable to upper-case letters. > .El > .Sh DIRECTIVES, CONDITIONALS, AND FOR LOOPS > Directives, conditionals, and for loops reminiscent >--- var.c.orig Sun Jul 16 02:57:12 2000 >+++ var.c Sun Jul 16 03:33:21 2000 >@@ -1428,6 +1428,10 @@ > * (pathname minus the suffix). > * :lhs=rhs Like :S, but the rhs goes to the end of > * the invocation. >+ * :Q Quotes every shell meta-character in the >+ * variable >+ * :U Converts variable to UPPER-CASE >+ * :L Converts variable to lower-case > */ > if ((str != (char *)NULL) && haveModifier) { > /* >@@ -1442,6 +1446,42 @@ > printf("Applying :%c to \"%s\"\n", *tstr, str); > } > switch (*tstr) { >+ case 'U': >+ if (tstr[1] == endc || tstr[1] == ':') { >+ /* XXX are there more effective way of doing the >+ same thing ?*/ >+ Buffer buf; >+ buf = Buf_Init (MAKE_BSIZE); >+ for (cp = str; *cp; cp++) >+ Buf_AddByte(buf, (Byte)toupper(*cp)); >+ >+ Buf_AddByte(buf, (Byte) '\0'); >+ newStr = (char *)Buf_GetAll (buf, (int *)NULL); >+ Buf_Destroy (buf, FALSE); >+ >+ cp = tstr + 1; >+ termc = *cp; >+ break; >+ } >+ /*FALLTHRU*/ >+ case 'L': >+ if (tstr[1] == endc || tstr[1] == ':') { >+ /* XXX are there more effective way of doing the >+ same thing ?*/ >+ Buffer buf; >+ buf = Buf_Init (MAKE_BSIZE); >+ for (cp = str; *cp; cp++) >+ Buf_AddByte(buf, (Byte)tolower(*cp)); >+ >+ Buf_AddByte(buf, (Byte) '\0'); >+ newStr = (char *)Buf_GetAll (buf, (int *)NULL); >+ Buf_Destroy (buf, FALSE); >+ >+ cp = tstr + 1; >+ termc = *cp; >+ break; >+ } >+ /*FALLTHRU*/ > case 'N': > case 'M': > { >--cutline--
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 19959
: 9829