Mercurial > emacs
comparison src/charset.c @ 35478:340a9e4aeb29
comment fixes
author | Dave Love <fx@gnu.org> |
---|---|
date | Mon, 22 Jan 2001 23:20:06 +0000 |
parents | 916718dc2950 |
children | d2c753cf5c34 |
comparison
equal
deleted
inserted
replaced
35477:e6bffd5c5287 | 35478:340a9e4aeb29 |
---|---|
1459 } | 1459 } |
1460 | 1460 |
1461 return chars; | 1461 return chars; |
1462 } | 1462 } |
1463 | 1463 |
1464 /* Parse unibyte text at STR of LEN bytes as a multibyte text, and | 1464 /* Parse unibyte text at STR of LEN bytes as multibyte text, and |
1465 count the numbers of characters and bytes in it. On counting | 1465 count the numbers of characters and bytes in it. On counting |
1466 bytes, pay attention to that 8-bit characters in the range | 1466 bytes, pay attention to the fact that 8-bit characters in the range |
1467 0x80..0x9F are represented by 2-byte in a multibyte text. */ | 1467 0x80..0x9F are represented by 2 bytes in multibyte text. */ |
1468 void | 1468 void |
1469 parse_str_as_multibyte (str, len, nchars, nbytes) | 1469 parse_str_as_multibyte (str, len, nchars, nbytes) |
1470 unsigned char *str; | 1470 unsigned char *str; |
1471 int len, *nchars, *nbytes; | 1471 int len, *nchars, *nbytes; |
1472 { | 1472 { |
1484 *nchars = chars; | 1484 *nchars = chars; |
1485 *nbytes = bytes; | 1485 *nbytes = bytes; |
1486 return; | 1486 return; |
1487 } | 1487 } |
1488 | 1488 |
1489 /* Arrange unibyte text at STR of NBYTES bytes as a multibyte text. | 1489 /* Arrange unibyte text at STR of NBYTES bytes as multibyte text. |
1490 It actually converts only 8-bit characters in the range 0x80..0x9F | 1490 It actually converts only 8-bit characters in the range 0x80..0x9F |
1491 that don't contruct multibyte characters to multibyte forms. If | 1491 that don't contruct multibyte characters to multibyte forms. If |
1492 NCHARS is nonzero, set *NCHARS to the number of characters in the | 1492 NCHARS is nonzero, set *NCHARS to the number of characters in the |
1493 text. It is assured that we can use LEN bytes at STR as a work | 1493 text. It is assured that we can use LEN bytes at STR as a work |
1494 area and that is enough. Return the number of bytes of the | 1494 area and that is enough. Return the number of bytes of the |
1533 if (nchars) | 1533 if (nchars) |
1534 *nchars = chars; | 1534 *nchars = chars; |
1535 return (to - str); | 1535 return (to - str); |
1536 } | 1536 } |
1537 | 1537 |
1538 /* Convert unibyte text at STR of NBYTES bytes to a multibyte text | 1538 /* Convert unibyte text at STR of NBYTES bytes to multibyte text |
1539 that contains the same single-byte characters. It actually | 1539 that contains the same single-byte characters. It actually |
1540 converts all 8-bit characters to multibyte forms. It is assured | 1540 converts all 8-bit characters to multibyte forms. It is assured |
1541 that we can use LEN bytes at STR as a work area and that is | 1541 that we can use LEN bytes at STR as a work area and that is |
1542 enough. */ | 1542 enough. */ |
1543 | 1543 |