aboutsummaryrefslogtreecommitdiffstats
path: root/src/tparam.c
diff options
context:
space:
mode:
authorKaroly Lorentey2003-12-28 16:03:57 +0000
committerKaroly Lorentey2003-12-28 16:03:57 +0000
commit2e7f2ec031f1708b80df9dc1f60f6b1cb24a5c02 (patch)
tree6e682f963c37c5cb6610711ec395ed4e82fff7fc /src/tparam.c
parent53fed860b6a9e8f89eca3fd8a15e49c58aace85d (diff)
parent8af1a978a8f635a9d05f56200ba42613e3574c44 (diff)
downloademacs-2e7f2ec031f1708b80df9dc1f60f6b1cb24a5c02.tar.gz
emacs-2e7f2ec031f1708b80df9dc1f60f6b1cb24a5c02.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-138 Update from CVS * miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-139 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-15
Diffstat (limited to 'src/tparam.c')
-rw-r--r--src/tparam.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tparam.c b/src/tparam.c
index 7306e0d5c10..ea208692161 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -144,7 +144,9 @@ tparam1 (string, outstring, len, up, left, argp)
144 int outlen = 0; 144 int outlen = 0;
145 145
146 register int tem; 146 register int tem;
147 int *old_argp = argp; 147 int *old_argp = argp; /* can move */
148 int *fixed_argp = argp; /* never moves */
149 int explicit_param_p = 0; /* set by %p */
148 int doleft = 0; 150 int doleft = 0;
149 int doup = 0; 151 int doup = 0;
150 152
@@ -180,7 +182,10 @@ tparam1 (string, outstring, len, up, left, argp)
180 if (c == '%') 182 if (c == '%')
181 { 183 {
182 c = *p++; 184 c = *p++;
183 tem = *argp; 185 if (explicit_param_p)
186 explicit_param_p = 0;
187 else
188 tem = *argp;
184 switch (c) 189 switch (c)
185 { 190 {
186 case 'd': /* %d means output in decimal. */ 191 case 'd': /* %d means output in decimal. */
@@ -203,7 +208,10 @@ tparam1 (string, outstring, len, up, left, argp)
203 *op++ = tem % 10 + '0'; 208 *op++ = tem % 10 + '0';
204 argp++; 209 argp++;
205 break; 210 break;
206 211 case 'p': /* %pN means use param N for next subst. */
212 tem = fixed_argp[(*p++) - '1'];
213 explicit_param_p = 1;
214 break;
207 case 'C': 215 case 'C':
208 /* For c-100: print quotient of value by 96, if nonzero, 216 /* For c-100: print quotient of value by 96, if nonzero,
209 then do like %+. */ 217 then do like %+. */