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
09125ef8
Commit
09125ef8
authored
Feb 06, 2011
by
Paul Eggert
Browse files
* print.c: conform to C89 pointer rules
parent
57ace6d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
src/ChangeLog
src/ChangeLog
+2
-1
src/print.c
src/print.c
+9
-7
No files found.
src/ChangeLog
View file @
09125ef8
...
...
@@ -10,7 +10,8 @@
* alloc.c (make_string, make_specified_string, make_pure_string):
Likewise.
* data.c (Fstring_to_number): Likewise.
* print.c (float_to_string): Likewise.
* print.c (float_to_string, PRINTFINISH, printchar, strout):
(print_object): Likewise.
2011-02-06 Paul Eggert <eggert@cs.ucla.edu>
src/print.c
View file @
09125ef8
...
...
@@ -177,8 +177,8 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1;
{ \
unsigned char *temp \
= (unsigned char *) alloca (print_buffer_pos + 1); \
copy_text (
print_buffer, temp,
print_buffer
_pos_byte,
\
1, 0);
\
copy_text (
(unsigned char *)
print_buffer
, temp,
\
print_buffer_pos_byte,
1, 0); \
insert_1_both ((char *) temp, print_buffer_pos, \
print_buffer_pos, 0, 1, 0); \
} \
...
...
@@ -254,7 +254,7 @@ printchar (unsigned int ch, Lisp_Object fun)
setup_echo_area_for_printing
(
multibyte_p
);
insert_char
(
ch
);
message_dolog
(
str
,
len
,
0
,
multibyte_p
);
message_dolog
(
(
char
*
)
str
,
len
,
0
,
multibyte_p
);
}
}
}
...
...
@@ -317,7 +317,8 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte,
int
len
;
for
(
i
=
0
;
i
<
size_byte
;
i
+=
len
)
{
int
ch
=
STRING_CHAR_AND_LENGTH
(
ptr
+
i
,
len
);
int
ch
=
STRING_CHAR_AND_LENGTH
((
const
unsigned
char
*
)
ptr
+
i
,
len
);
insert_char
(
ch
);
}
}
...
...
@@ -343,7 +344,8 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte,
corresponding character code before handing it to
PRINTCHAR. */
int
len
;
int
ch
=
STRING_CHAR_AND_LENGTH
(
ptr
+
i
,
len
);
int
ch
=
STRING_CHAR_AND_LENGTH
((
const
unsigned
char
*
)
ptr
+
i
,
len
);
PRINTCHAR
(
ch
);
i
+=
len
;
}
...
...
@@ -1519,7 +1521,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
For a char code that could be in a unibyte string,
when found in a multibyte string, always use a hex escape
so it reads back as multibyte. */
unsigned
char
outbuf
[
50
];
char
outbuf
[
50
];
if
(
CHAR_BYTE8_P
(
c
))
sprintf
(
outbuf
,
"
\\
%03o"
,
CHAR_TO_BYTE8
(
c
));
...
...
@@ -1538,7 +1540,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
or when explicitly requested,
print single-byte non-ASCII string chars
using octal escapes. */
unsigned
char
outbuf
[
5
];
char
outbuf
[
5
];
sprintf
(
outbuf
,
"
\\
%03o"
,
c
);
strout
(
outbuf
,
-
1
,
-
1
,
printcharfun
,
0
);
}
...
...
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