diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/alloc.c | 5 | ||||
| -rw-r--r-- | src/editfns.c | 39 | ||||
| -rw-r--r-- | src/print.c | 5 | ||||
| -rw-r--r-- | src/window.c | 3 |
5 files changed, 42 insertions, 25 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a15f25fbde8..a71cb27cf33 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2004-01-26 Andreas Schwab <schwab@suse.de> | ||
| 2 | |||
| 3 | * print.c (print_preprocess): Declare size as EMACS_INT to not | ||
| 4 | lose bits. | ||
| 5 | (print_object): Likewise. | ||
| 6 | * alloc.c (Fpurecopy): Likewise. | ||
| 7 | |||
| 8 | 2004-01-25 Luc Teirlinck <teirllm@auburn.edu> | ||
| 9 | |||
| 10 | * window.c (Fwindow_minibuffer_p): Doc fix. | ||
| 11 | |||
| 12 | 2004-01-24 Jonathan Yavner <jyavner@member.fsf.org> | ||
| 13 | |||
| 14 | * editfns.c (Fformat): Make both passes accept the same set of flags. | ||
| 15 | |||
| 1 | 2004-01-23 Kenichi Handa <handa@m17n.org> | 16 | 2004-01-23 Kenichi Handa <handa@m17n.org> |
| 2 | 17 | ||
| 3 | * fns.c (Fmd5): If OBJECT is a buffer different from the current | 18 | * fns.c (Fmd5): If OBJECT is a buffer different from the current |
diff --git a/src/alloc.c b/src/alloc.c index 4afcab2c20a..723d664cbe0 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4231,12 +4231,13 @@ Does not copy symbols. Copies strings without text properties. */) | |||
| 4231 | else if (COMPILEDP (obj) || VECTORP (obj)) | 4231 | else if (COMPILEDP (obj) || VECTORP (obj)) |
| 4232 | { | 4232 | { |
| 4233 | register struct Lisp_Vector *vec; | 4233 | register struct Lisp_Vector *vec; |
| 4234 | register int i, size; | 4234 | register int i; |
| 4235 | EMACS_INT size; | ||
| 4235 | 4236 | ||
| 4236 | size = XVECTOR (obj)->size; | 4237 | size = XVECTOR (obj)->size; |
| 4237 | if (size & PSEUDOVECTOR_FLAG) | 4238 | if (size & PSEUDOVECTOR_FLAG) |
| 4238 | size &= PSEUDOVECTOR_SIZE_MASK; | 4239 | size &= PSEUDOVECTOR_SIZE_MASK; |
| 4239 | vec = XVECTOR (make_pure_vector ((EMACS_INT) size)); | 4240 | vec = XVECTOR (make_pure_vector (size)); |
| 4240 | for (i = 0; i < size; i++) | 4241 | for (i = 0; i < size; i++) |
| 4241 | vec->contents[i] = Fpurecopy (XVECTOR (obj)->contents[i]); | 4242 | vec->contents[i] = Fpurecopy (XVECTOR (obj)->contents[i]); |
| 4242 | if (COMPILEDP (obj)) | 4243 | if (COMPILEDP (obj)) |
diff --git a/src/editfns.c b/src/editfns.c index a636c35a464..d3039ca0273 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3193,6 +3193,10 @@ It may contain %-sequences meaning to substitute the next argument. | |||
| 3193 | The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. | 3193 | The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. |
| 3194 | Use %% to put a single % into the output. | 3194 | Use %% to put a single % into the output. |
| 3195 | 3195 | ||
| 3196 | The basic structure of a %-sequence is | ||
| 3197 | % <flags> <width> <precision> character | ||
| 3198 | where flags is [- #0]+, width is [0-9]+, and precision is .[0-9]+ | ||
| 3199 | |||
| 3196 | usage: (format STRING &rest OBJECTS) */) | 3200 | usage: (format STRING &rest OBJECTS) */) |
| 3197 | (nargs, args) | 3201 | (nargs, args) |
| 3198 | int nargs; | 3202 | int nargs; |
| @@ -3300,7 +3304,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3300 | 3304 | ||
| 3301 | where | 3305 | where |
| 3302 | 3306 | ||
| 3303 | flags ::= [#-* 0]+ | 3307 | flags ::= [- #0]+ |
| 3304 | field-width ::= [0-9]+ | 3308 | field-width ::= [0-9]+ |
| 3305 | precision ::= '.' [0-9]* | 3309 | precision ::= '.' [0-9]* |
| 3306 | 3310 | ||
| @@ -3312,14 +3316,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3312 | digits to print after the '.' for floats, or the max. | 3316 | digits to print after the '.' for floats, or the max. |
| 3313 | number of chars to print from a string. */ | 3317 | number of chars to print from a string. */ |
| 3314 | 3318 | ||
| 3315 | /* NOTE the handling of specifiers here differs in some ways | 3319 | while (index ("-0# ", *format)) |
| 3316 | from the libc model. There are bugs in this code that lead | ||
| 3317 | to incorrect formatting when flags recognized by C but | ||
| 3318 | neither parsed nor rejected here are used. Further | ||
| 3319 | revisions will be made soon. */ | ||
| 3320 | |||
| 3321 | /* incorrect list of flags to skip; will be fixed */ | ||
| 3322 | while (index ("-*# 0", *format)) | ||
| 3323 | ++format; | 3320 | ++format; |
| 3324 | 3321 | ||
| 3325 | if (*format >= '0' && *format <= '9') | 3322 | if (*format >= '0' && *format <= '9') |
| @@ -3403,7 +3400,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3403 | if (*format == 'c') | 3400 | if (*format == 'c') |
| 3404 | { | 3401 | { |
| 3405 | if (! SINGLE_BYTE_CHAR_P (XINT (args[n])) | 3402 | if (! SINGLE_BYTE_CHAR_P (XINT (args[n])) |
| 3406 | /* Note: No one can remeber why we have to treat | 3403 | /* Note: No one can remember why we have to treat |
| 3407 | the character 0 as a multibyte character here. | 3404 | the character 0 as a multibyte character here. |
| 3408 | But, until it causes a real problem, let's | 3405 | But, until it causes a real problem, let's |
| 3409 | don't change it. */ | 3406 | don't change it. */ |
| @@ -3494,17 +3491,19 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3494 | discarded[format - format_start] = 1; | 3491 | discarded[format - format_start] = 1; |
| 3495 | format++; | 3492 | format++; |
| 3496 | 3493 | ||
| 3497 | /* Process a numeric arg and skip it. */ | 3494 | while (index("-0# ", *format)) |
| 3498 | /* NOTE atoi is the wrong thing to use here; will be fixed */ | 3495 | { |
| 3496 | if (*format == '-') | ||
| 3497 | { | ||
| 3498 | negative = 1; | ||
| 3499 | } | ||
| 3500 | discarded[format - format_start] = 1; | ||
| 3501 | ++format; | ||
| 3502 | } | ||
| 3503 | |||
| 3499 | minlen = atoi (format); | 3504 | minlen = atoi (format); |
| 3500 | if (minlen < 0) | 3505 | |
| 3501 | minlen = - minlen, negative = 1; | 3506 | while ((*format >= '0' && *format <= '9') || *format == '.') |
| 3502 | |||
| 3503 | /* NOTE the parsing here is not consistent with the first | ||
| 3504 | pass, and neither attempt is what we want to do. Will be | ||
| 3505 | fixed. */ | ||
| 3506 | while ((*format >= '0' && *format <= '9') | ||
| 3507 | || *format == '-' || *format == ' ' || *format == '.') | ||
| 3508 | { | 3507 | { |
| 3509 | discarded[format - format_start] = 1; | 3508 | discarded[format - format_start] = 1; |
| 3510 | format++; | 3509 | format++; |
diff --git a/src/print.c b/src/print.c index 597345c129c..89690fe5399 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1276,7 +1276,8 @@ static void | |||
| 1276 | print_preprocess (obj) | 1276 | print_preprocess (obj) |
| 1277 | Lisp_Object obj; | 1277 | Lisp_Object obj; |
| 1278 | { | 1278 | { |
| 1279 | int i, size; | 1279 | int i; |
| 1280 | EMACS_INT size; | ||
| 1280 | 1281 | ||
| 1281 | loop: | 1282 | loop: |
| 1282 | if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) | 1283 | if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) |
| @@ -1891,7 +1892,7 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1891 | } | 1892 | } |
| 1892 | else | 1893 | else |
| 1893 | { | 1894 | { |
| 1894 | int size = XVECTOR (obj)->size; | 1895 | EMACS_INT size = XVECTOR (obj)->size; |
| 1895 | if (COMPILEDP (obj)) | 1896 | if (COMPILEDP (obj)) |
| 1896 | { | 1897 | { |
| 1897 | PRINTCHAR ('#'); | 1898 | PRINTCHAR ('#'); |
diff --git a/src/window.c b/src/window.c index 14defa74257..363c8d0eaff 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -307,7 +307,8 @@ used by that frame. */) | |||
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0, | 309 | DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0, |
| 310 | doc: /* Returns non-nil if WINDOW is a minibuffer window. */) | 310 | doc: /* Returns non-nil if WINDOW is a minibuffer window. |
| 311 | WINDOW defaults to the selected window. */) | ||
| 311 | (window) | 312 | (window) |
| 312 | Lisp_Object window; | 313 | Lisp_Object window; |
| 313 | { | 314 | { |