Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
308dd672
Commit
308dd672
authored
Jan 02, 2002
by
Richard M. Stallman
Browse files
(Fformat): Update thissize from field_width
based on the actual width, in the string case.
parent
7bc60154
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
src/ChangeLog
src/ChangeLog
+5
-0
src/editfns.c
src/editfns.c
+3
-1
No files found.
src/ChangeLog
View file @
308dd672
2002-01-02 Richard M. Stallman <rms@gnu.org>
* editfns.c (Fformat): Update thissize from field_width
based on the actual width, in the string case.
2002-01-01 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
* charset.h (UNIBYTE_STR_AS_MULTIBYTE_P): Parenthesize assignment
...
...
src/editfns.c
View file @
308dd672
...
...
@@ -3217,6 +3217,7 @@ usage: (format STRING &rest OBJECTS) */)
if
(
*
format
++
==
'%'
)
{
int
thissize
=
0
;
int
actual_width
=
0
;
unsigned
char
*
this_format_start
=
format
-
1
;
int
field_width
,
precision
;
...
...
@@ -3297,6 +3298,7 @@ usage: (format STRING &rest OBJECTS) */)
if
(
*
format
!=
's'
&&
*
format
!=
'S'
)
error
(
"Format specifier doesn't match argument type"
);
thissize
=
CONVERTED_BYTE_SIZE
(
multibyte
,
args
[
n
]);
actual_width
=
lisp_string_width
(
args
[
n
],
-
1
,
NULL
,
NULL
);
}
/* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */
else
if
(
INTEGERP
(
args
[
n
])
&&
*
format
!=
's'
)
...
...
@@ -3350,7 +3352,7 @@ usage: (format STRING &rest OBJECTS) */)
goto
string
;
}
thissize
=
max
(
field_width
,
thissize
);
thissize
+
=
max
(
0
,
field_width
-
actual_width
);
total
+=
thissize
+
4
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment