[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/coding.c
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/src/coding.c |
Date: |
Tue, 28 Dec 2004 10:03:53 -0500 |
Index: emacs/src/coding.c
diff -c emacs/src/coding.c:1.310 emacs/src/coding.c:1.311
*** emacs/src/coding.c:1.310 Mon Dec 27 05:51:40 2004
--- emacs/src/coding.c Tue Dec 28 14:50:49 2004
***************
*** 147,153 ****
static void
decode_coding_XXX (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! unsigned char *source, *destination;
int src_bytes, dst_bytes;
{
...
--- 147,154 ----
static void
decode_coding_XXX (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! const unsigned char *source;
! unsigned char *destination;
int src_bytes, dst_bytes;
{
...
***************
*** 800,811 ****
decode_composition_emacs_mule (coding, src, src_end,
destination, dst_end, dst_bytes)
struct coding_system *coding;
! unsigned char *src, *src_end, **destination, *dst_end;
int dst_bytes;
{
unsigned char *dst = *destination;
int method, data_len, nchars;
! unsigned char *src_base = src++;
/* Store components of composition. */
int component[COMPOSITION_DATA_MAX_BUNCH_LENGTH];
int ncomponent;
--- 801,813 ----
decode_composition_emacs_mule (coding, src, src_end,
destination, dst_end, dst_bytes)
struct coding_system *coding;
! const unsigned char *src, *src_end;
! unsigned char **destination, *dst_end;
int dst_bytes;
{
unsigned char *dst = *destination;
int method, data_len, nchars;
! const unsigned char *src_base = src++;
/* Store components of composition. */
int component[COMPOSITION_DATA_MAX_BUNCH_LENGTH];
int ncomponent;
***************
*** 946,968 ****
static void
decode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! unsigned char *source, *destination;
int src_bytes, dst_bytes;
{
! unsigned char *src = source;
! unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
/* SRC_BASE remembers the start position in source in each loop.
The loop will be exited when there's not enough source code, or
when there's not enough destination area to produce a
character. */
! unsigned char *src_base;
coding->produced_char = 0;
while ((src_base = src) < src_end)
{
! unsigned char tmp[MAX_MULTIBYTE_LENGTH], *p;
int bytes;
if (*src == '\r')
--- 948,972 ----
static void
decode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! const unsigned char *source;
! unsigned char *destination;
int src_bytes, dst_bytes;
{
! const unsigned char *src = source;
! const unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
/* SRC_BASE remembers the start position in source in each loop.
The loop will be exited when there's not enough source code, or
when there's not enough destination area to produce a
character. */
! const unsigned char *src_base;
coding->produced_char = 0;
while ((src_base = src) < src_end)
{
! unsigned char tmp[MAX_MULTIBYTE_LENGTH];
! const unsigned char *p;
int bytes;
if (*src == '\r')
***************
*** 1116,1129 ****
static void
encode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! unsigned char *source, *destination;
int src_bytes, dst_bytes;
{
! unsigned char *src = source;
! unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
! unsigned char *src_base;
int c;
int char_offset;
int *data;
--- 1120,1134 ----
static void
encode_coding_emacs_mule (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! const unsigned char *source;
! unsigned char *destination;
int src_bytes, dst_bytes;
{
! const unsigned char *src = source;
! const unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
! const unsigned char *src_base;
int c;
int char_offset;
int *data;
***************
*** 1810,1820 ****
static void
decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! unsigned char *source, *destination;
int src_bytes, dst_bytes;
{
! unsigned char *src = source;
! unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
/* Charsets invoked to graphic plane 0 and 1 respectively. */
--- 1815,1826 ----
static void
decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! const unsigned char *source;
! unsigned char *destination;
int src_bytes, dst_bytes;
{
! const unsigned char *src = source;
! const unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
/* Charsets invoked to graphic plane 0 and 1 respectively. */
***************
*** 1825,1831 ****
(within macro ONE_MORE_BYTE), or when there's not enough
destination area to produce a character (within macro
EMIT_CHAR). */
! unsigned char *src_base;
int c, charset;
Lisp_Object translation_table;
Lisp_Object safe_chars;
--- 1831,1837 ----
(within macro ONE_MORE_BYTE), or when there's not enough
destination area to produce a character (within macro
EMIT_CHAR). */
! const unsigned char *src_base;
int c, charset;
Lisp_Object translation_table;
Lisp_Object safe_chars;
***************
*** 2596,2602 ****
encode_designation_at_bol (coding, translation_table, src, src_end, dst)
struct coding_system *coding;
Lisp_Object translation_table;
! unsigned char *src, *src_end, *dst;
{
int charset, c, found = 0, reg;
/* Table of charsets to be designated to each graphic register. */
--- 2602,2609 ----
encode_designation_at_bol (coding, translation_table, src, src_end, dst)
struct coding_system *coding;
Lisp_Object translation_table;
! const unsigned char *src, *src_end;
! unsigned char *dst;
{
int charset, c, found = 0, reg;
/* Table of charsets to be designated to each graphic register. */
***************
*** 2637,2647 ****
static void
encode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! unsigned char *source, *destination;
int src_bytes, dst_bytes;
{
! unsigned char *src = source;
! unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
/* Since the maximum bytes produced by each loop is 20, we subtract 19
--- 2644,2655 ----
static void
encode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! const unsigned char *source;
! unsigned char *destination;
int src_bytes, dst_bytes;
{
! const unsigned char *src = source;
! const unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
/* Since the maximum bytes produced by each loop is 20, we subtract 19
***************
*** 2653,2659 ****
analyze multi-byte codes (within macro ONE_MORE_CHAR), or when
there's not enough destination area to produce encoded codes
(within macro EMIT_BYTES). */
! unsigned char *src_base;
int c;
Lisp_Object translation_table;
Lisp_Object safe_chars;
--- 2661,2667 ----
analyze multi-byte codes (within macro ONE_MORE_CHAR), or when
there's not enough destination area to produce encoded codes
(within macro EMIT_BYTES). */
! const unsigned char *src_base;
int c;
Lisp_Object translation_table;
Lisp_Object safe_chars;
***************
*** 3047,3058 ****
decode_coding_sjis_big5 (coding, source, destination,
src_bytes, dst_bytes, sjis_p)
struct coding_system *coding;
! unsigned char *source, *destination;
int src_bytes, dst_bytes;
int sjis_p;
{
! unsigned char *src = source;
! unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
/* SRC_BASE remembers the start position in source in each loop.
--- 3055,3067 ----
decode_coding_sjis_big5 (coding, source, destination,
src_bytes, dst_bytes, sjis_p)
struct coding_system *coding;
! const unsigned char *source;
! unsigned char *destination;
int src_bytes, dst_bytes;
int sjis_p;
{
! const unsigned char *src = source;
! const unsigned char *src_end = source + src_bytes;
unsigned char *dst = destination;
unsigned char *dst_end = destination + dst_bytes;
/* SRC_BASE remembers the start position in source in each loop.
***************
*** 3060,3066 ****
(within macro ONE_MORE_BYTE), or when there's not enough
destination area to produce a character (within macro
EMIT_CHAR). */
! unsigned char *src_base;
Lisp_Object translation_table;
if (NILP (Venable_character_translation))
--- 3069,3075 ----
(within macro ONE_MORE_BYTE), or when there's not enough
destination area to produce a character (within macro
EMIT_CHAR). */
! const unsigned char *src_base;
Lisp_Object translation_table;
if (NILP (Venable_character_translation))
***************
*** 3320,3331 ****
static void
decode_eol (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! unsigned char *source, *destination;
int src_bytes, dst_bytes;
{
! unsigned char *src = source;
unsigned char *dst = destination;
! unsigned char *src_end = src + src_bytes;
unsigned char *dst_end = dst + dst_bytes;
Lisp_Object translation_table;
/* SRC_BASE remembers the start position in source in each loop.
--- 3329,3341 ----
static void
decode_eol (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! const unsigned char *source;
! unsigned char *destination;
int src_bytes, dst_bytes;
{
! const unsigned char *src = source;
unsigned char *dst = destination;
! const unsigned char *src_end = src + src_bytes;
unsigned char *dst_end = dst + dst_bytes;
Lisp_Object translation_table;
/* SRC_BASE remembers the start position in source in each loop.
***************
*** 3333,3339 ****
(within macro ONE_MORE_BYTE), or when there's not enough
destination area to produce a character (within macro
EMIT_CHAR). */
! unsigned char *src_base;
int c;
translation_table = Qnil;
--- 3343,3349 ----
(within macro ONE_MORE_BYTE), or when there's not enough
destination area to produce a character (within macro
EMIT_CHAR). */
! const unsigned char *src_base;
int c;
translation_table = Qnil;
***************
*** 4860,4866 ****
int
decode_coding (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! const unsigned char *source;
unsigned char *destination;
int src_bytes, dst_bytes;
{
--- 4870,4876 ----
int
decode_coding (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
! const const unsigned char *source;
unsigned char *destination;
int src_bytes, dst_bytes;
{