Mercurial > hg > xemacs-beta
comparison src/text.h @ 2421:ab71ad6ff3dd
[xemacs-hg @ 2004-12-06 03:50:53 by ben]
(none)
README.packages: Document use of --package-prefix.
Fix error in specifying standard package location.
make-docfile.c: Use QXE_PATH_MAX.
info.el: Correct doc string giving example package path.
menubar-items.el: Move Prefix Rectangle command up one level.
xemacs/packages.texi: Add long form of Lisp Reference Manual to links.
Add links pointing to Lisp Reference Manual for more detailed
package discussion.
lispref/range-tables.texi: Document range-table changes.
internals/internals.texi: Update history section.
elhash.c, elhash.h, profile.c: Create inchash_eq() to allow direct incrementing of hash-table
entry. Use in profile.c to try to reduce profiling overhead.
Increase initial size of profile hash tables to reduce profiling
overhead.
buffer.c, device-msw.c, dialog-msw.c, dired-msw.c, editfns.c, event-msw.c, events.c, glyphs-msw.c, keymap.c, objects-msw.c, process-nt.c, syswindows.h, text.c, text.h, unexnt.c: Rename xetcs* -> qxetcs* for consistency with qxestr*.
Rename ei*_c(_*) -> ei*_ascii(_*) since they work with ASCII-only
strings not "C strings", whatever those are. This is the last
place where "c" was incorrectly being used for "ascii".
dialog-msw.c, dumper.c, event-msw.c, fileio.c, glyphs-gtk.c, glyphs-x.c, nt.c, process-nt.c, realpath.c, sysdep.c, sysfile.h, unexcw.c, unexnext.c, unexnt.c: Try to avoid differences in systems that do or do not include
final null byte in PATH_MAX. Create PATH_MAX_INTERNAL and
PATH_MAX_EXTERNAL and use them everywhere. Rewrite code in
dumper.c to avoid use of PATH_MAX. When necessary in nt.c,
use _MAX_PATH instead of MAX_PATH to be consistent with
other places.
text.c: Code to short-circuit when binary or Unicode was not working
due to EOL wrapping. Fix this code to work when either no
EOL autodetection or no CR's or LF's in the text.
lisp.h, rangetab.c, rangetab.h, regex.c, search.c: Implement different types of ranges (open/closed start and end).
Change default to be start-closed, end-open.
author | ben |
---|---|
date | Mon, 06 Dec 2004 03:52:23 +0000 |
parents | ac4ffbd57062 |
children | 3d8143fc88e1 |
comparison
equal
deleted
inserted
replaced
2420:ad56e5a6d09f | 2421:ab71ad6ff3dd |
---|---|
1418 void eicpy_rawz_fmt (Eistring *eistr, const Ibyte *data, | 1418 void eicpy_rawz_fmt (Eistring *eistr, const Ibyte *data, |
1419 Internal_Format intfmt, Lisp_Object object); | 1419 Internal_Format intfmt, Lisp_Object object); |
1420 ... from raw internal-format data in the specified format that is | 1420 ... from raw internal-format data in the specified format that is |
1421 "null-terminated" (the meaning of this depends on the nature of | 1421 "null-terminated" (the meaning of this depends on the nature of |
1422 the specific format). | 1422 the specific format). |
1423 void eicpy_c (Eistring *eistr, const Ascbyte *c_string); | 1423 void eicpy_ascii (Eistring *eistr, const Ascbyte *ascstr); |
1424 ... from an ASCII null-terminated string. Non-ASCII characters in | 1424 ... from an ASCII null-terminated string. Non-ASCII characters in |
1425 the string are *ILLEGAL* (read abort() with error-checking defined). | 1425 the string are *ILLEGAL* (read abort() with error-checking defined). |
1426 void eicpy_c_len (Eistring *eistr, const Ascbyte *c_string, len); | 1426 void eicpy_ascii_len (Eistring *eistr, const Ascbyte *ascstr, len); |
1427 ... from an ASCII string, with length specified. Non-ASCII characters | 1427 ... from an ASCII string, with length specified. Non-ASCII characters |
1428 in the string are *ILLEGAL* (read abort() with error-checking defined). | 1428 in the string are *ILLEGAL* (read abort() with error-checking defined). |
1429 void eicpy_ext (Eistring *eistr, const Extbyte *extdata, | 1429 void eicpy_ext (Eistring *eistr, const Extbyte *extdata, |
1430 Lisp_Object codesys); | 1430 Lisp_Object codesys); |
1431 ... from external null-terminated data, with coding system specified. | 1431 ... from external null-terminated data, with coding system specified. |
1561 Concatenate onto the end of the Eistring, with data coming from the | 1561 Concatenate onto the end of the Eistring, with data coming from the |
1562 same places as above: | 1562 same places as above: |
1563 | 1563 |
1564 void eicat_ei (Eistring *eistr, Eistring *eistr2); | 1564 void eicat_ei (Eistring *eistr, Eistring *eistr2); |
1565 ... from another Eistring. | 1565 ... from another Eistring. |
1566 void eicat_c (Eistring *eistr, Ascbyte *c_string); | 1566 void eicat_ascii (Eistring *eistr, Ascbyte *ascstr); |
1567 ... from an ASCII null-terminated string. Non-ASCII characters in | 1567 ... from an ASCII null-terminated string. Non-ASCII characters in |
1568 the string are *ILLEGAL* (read abort() with error-checking defined). | 1568 the string are *ILLEGAL* (read abort() with error-checking defined). |
1569 void eicat_raw (ei, const Ibyte *data, Bytecount len); | 1569 void eicat_raw (ei, const Ibyte *data, Bytecount len); |
1570 ... from raw internal-format data in the default internal format. | 1570 ... from raw internal-format data in the default internal format. |
1571 void eicat_rawz (ei, const Ibyte *data); | 1571 void eicat_rawz (ei, const Ibyte *data); |
1590 Replace a section of the Eistring, specifically: | 1590 Replace a section of the Eistring, specifically: |
1591 | 1591 |
1592 void eisub_ei (Eistring *eistr, Bytecount off, Charcount charoff, | 1592 void eisub_ei (Eistring *eistr, Bytecount off, Charcount charoff, |
1593 Bytecount len, Charcount charlen, Eistring *eistr2); | 1593 Bytecount len, Charcount charlen, Eistring *eistr2); |
1594 ... with another Eistring. | 1594 ... with another Eistring. |
1595 void eisub_c (Eistring *eistr, Bytecount off, Charcount charoff, | 1595 void eisub_ascii (Eistring *eistr, Bytecount off, Charcount charoff, |
1596 Bytecount len, Charcount charlen, Ascbyte *c_string); | 1596 Bytecount len, Charcount charlen, Ascbyte *ascstr); |
1597 ... with an ASCII null-terminated string. Non-ASCII characters in | 1597 ... with an ASCII null-terminated string. Non-ASCII characters in |
1598 the string are *ILLEGAL* (read abort() with error-checking defined). | 1598 the string are *ILLEGAL* (read abort() with error-checking defined). |
1599 void eisub_ch (Eistring *eistr, Bytecount off, Charcount charoff, | 1599 void eisub_ch (Eistring *eistr, Bytecount off, Charcount charoff, |
1600 Bytecount len, Charcount charlen, Ichar ch); | 1600 Bytecount len, Charcount charlen, Ichar ch); |
1601 ... with an Ichar. | 1601 ... with an Ichar. |
1658 Bytecount eirstr_ei_off (Eistring *eistr, Eistring *eistr2, Bytecount off, | 1658 Bytecount eirstr_ei_off (Eistring *eistr, Eistring *eistr2, Bytecount off, |
1659 Charcount charoff); | 1659 Charcount charoff); |
1660 Charcount eirstr_ei_off_char (Eistring *eistr, Eistring *eistr2, | 1660 Charcount eirstr_ei_off_char (Eistring *eistr, Eistring *eistr2, |
1661 Bytecount off, Charcount charoff); | 1661 Bytecount off, Charcount charoff); |
1662 | 1662 |
1663 Bytecount eistr_c (Eistring *eistr, Ascbyte *c_string); | 1663 Bytecount eistr_ascii (Eistring *eistr, Ascbyte *ascstr); |
1664 Charcount eistr_c_char (Eistring *eistr, Ascbyte *c_string); | 1664 Charcount eistr_ascii_char (Eistring *eistr, Ascbyte *ascstr); |
1665 Bytecount eistr_c_off (Eistring *eistr, Ascbyte *c_string, Bytecount off, | 1665 Bytecount eistr_ascii_off (Eistring *eistr, Ascbyte *ascstr, Bytecount off, |
1666 Charcount charoff); | 1666 Charcount charoff); |
1667 Charcount eistr_c_off_char (Eistring *eistr, Ascbyte *c_string, | 1667 Charcount eistr_ascii_off_char (Eistring *eistr, Ascbyte *ascstr, |
1668 Bytecount off, Charcount charoff); | 1668 Bytecount off, Charcount charoff); |
1669 Bytecount eirstr_c (Eistring *eistr, Ascbyte *c_string); | 1669 Bytecount eirstr_ascii (Eistring *eistr, Ascbyte *ascstr); |
1670 Charcount eirstr_c_char (Eistring *eistr, Ascbyte *c_string); | 1670 Charcount eirstr_ascii_char (Eistring *eistr, Ascbyte *ascstr); |
1671 Bytecount eirstr_c_off (Eistring *eistr, Ascbyte *c_string, | 1671 Bytecount eirstr_ascii_off (Eistring *eistr, Ascbyte *ascstr, |
1672 Bytecount off, Charcount charoff); | 1672 Bytecount off, Charcount charoff); |
1673 Charcount eirstr_c_off_char (Eistring *eistr, Ascbyte *c_string, | 1673 Charcount eirstr_ascii_off_char (Eistring *eistr, Ascbyte *ascstr, |
1674 Bytecount off, Charcount charoff); | 1674 Bytecount off, Charcount charoff); |
1675 | 1675 |
1676 | 1676 |
1677 ********************************************** | 1677 ********************************************** |
1678 * Comparison * | 1678 * Comparison * |
1709 int eicasecmp_i18n_ei (Eistring *eistr, Eistring *eistr2); | 1709 int eicasecmp_i18n_ei (Eistring *eistr, Eistring *eistr2); |
1710 int eicasecmp_i18n_off_ei (Eistring *eistr, Bytecount off, | 1710 int eicasecmp_i18n_off_ei (Eistring *eistr, Bytecount off, |
1711 Charcount charoff, Bytecount len, | 1711 Charcount charoff, Bytecount len, |
1712 Charcount charlen, Eistring *eistr2); | 1712 Charcount charlen, Eistring *eistr2); |
1713 | 1713 |
1714 int eicmp_c (Eistring *eistr, Ascbyte *c_string); | 1714 int eicmp_ascii (Eistring *eistr, Ascbyte *ascstr); |
1715 int eicmp_off_c (Eistring *eistr, Bytecount off, Charcount charoff, | 1715 int eicmp_off_ascii (Eistring *eistr, Bytecount off, Charcount charoff, |
1716 Bytecount len, Charcount charlen, Ascbyte *c_string); | 1716 Bytecount len, Charcount charlen, Ascbyte *ascstr); |
1717 int eicasecmp_c (Eistring *eistr, Ascbyte *c_string); | 1717 int eicasecmp_ascii (Eistring *eistr, Ascbyte *ascstr); |
1718 int eicasecmp_off_c (Eistring *eistr, Bytecount off, Charcount charoff, | 1718 int eicasecmp_off_ascii (Eistring *eistr, Bytecount off, Charcount charoff, |
1719 Bytecount len, Charcount charlen, | 1719 Bytecount len, Charcount charlen, |
1720 Ascbyte *c_string); | 1720 Ascbyte *ascstr); |
1721 int eicasecmp_i18n_c (Eistring *eistr, Ascbyte *c_string); | 1721 int eicasecmp_i18n_ascii (Eistring *eistr, Ascbyte *ascstr); |
1722 int eicasecmp_i18n_off_c (Eistring *eistr, Bytecount off, Charcount charoff, | 1722 int eicasecmp_i18n_off_ascii (Eistring *eistr, Bytecount off, Charcount charoff, |
1723 Bytecount len, Charcount charlen, | 1723 Bytecount len, Charcount charlen, |
1724 Ascbyte *c_string); | 1724 Ascbyte *ascstr); |
1725 | 1725 |
1726 | 1726 |
1727 ********************************************** | 1727 ********************************************** |
1728 * Case-changing the Eistring * | 1728 * Case-changing the Eistring * |
1729 ********************************************** | 1729 ********************************************** |
1980 Ibyte ei12p2[MAX_ICHAR_LEN]; \ | 1980 Ibyte ei12p2[MAX_ICHAR_LEN]; \ |
1981 Bytecount ei12p2len = set_itext_ichar (ei12p2, ch); \ | 1981 Bytecount ei12p2len = set_itext_ichar (ei12p2, ch); \ |
1982 EI_ALLOC_AND_COPY (ei, ei12p2, ei12p2len, 1); \ | 1982 EI_ALLOC_AND_COPY (ei, ei12p2, ei12p2len, 1); \ |
1983 } while (0) | 1983 } while (0) |
1984 | 1984 |
1985 #define eicpy_c(ei, c_string) \ | 1985 #define eicpy_ascii(ei, ascstr) \ |
1986 do { \ | 1986 do { \ |
1987 const Ascbyte *ei4 = (c_string); \ | 1987 const Ascbyte *ei4 = (ascstr); \ |
1988 \ | 1988 \ |
1989 ASSERT_ASCTEXT_ASCII (ei4); \ | 1989 ASSERT_ASCTEXT_ASCII (ei4); \ |
1990 eicpy_ext (ei, ei4, Qbinary); \ | 1990 eicpy_ext (ei, ei4, Qbinary); \ |
1991 } while (0) | 1991 } while (0) |
1992 | 1992 |
1993 #define eicpy_c_len(ei, c_string, c_len) \ | 1993 #define eicpy_ascii_len(ei, ascstr, c_len) \ |
1994 do { \ | 1994 do { \ |
1995 const Ascbyte *ei6 = (c_string); \ | 1995 const Ascbyte *ei6 = (ascstr); \ |
1996 int ei6len = (c_len); \ | 1996 int ei6len = (c_len); \ |
1997 \ | 1997 \ |
1998 ASSERT_ASCTEXT_ASCII_LEN (ei6, ei6len); \ | 1998 ASSERT_ASCTEXT_ASCII_LEN (ei6, ei6len); \ |
1999 eicpy_ext_len (ei, ei6, ei6len, Qbinary); \ | 1999 eicpy_ext_len (ei, ei6, ei6len, Qbinary); \ |
2000 } while (0) | 2000 } while (0) |
2205 do { \ | 2205 do { \ |
2206 const Eistring *ei9 = (ei2); \ | 2206 const Eistring *ei9 = (ei2); \ |
2207 eicat_1 (ei, ei9->data_, ei9->bytelen_, ei9->charlen_); \ | 2207 eicat_1 (ei, ei9->data_, ei9->bytelen_, ei9->charlen_); \ |
2208 } while (0) | 2208 } while (0) |
2209 | 2209 |
2210 #define eicat_c(ei, c_string) \ | 2210 #define eicat_ascii(ei, ascstr) \ |
2211 do { \ | 2211 do { \ |
2212 const Ascbyte *ei15 = (c_string); \ | 2212 const Ascbyte *ei15 = (ascstr); \ |
2213 int ei15len = strlen (ei15); \ | 2213 int ei15len = strlen (ei15); \ |
2214 \ | 2214 \ |
2215 ASSERT_ASCTEXT_ASCII_LEN (ei15, ei15len); \ | 2215 ASSERT_ASCTEXT_ASCII_LEN (ei15, ei15len); \ |
2216 eicat_1 (ei, ei15, ei15len, \ | 2216 eicat_1 (ei, ei15, ei15len, \ |
2217 bytecount_to_charcount ((Ibyte *) ei15, ei15len)); \ | 2217 bytecount_to_charcount ((Ibyte *) ei15, ei15len)); \ |
2284 const Eistring *ei19 = (ei2); \ | 2284 const Eistring *ei19 = (ei2); \ |
2285 eisub_1 (ei, off, charoff, len, charlen, ei19->data_, ei19->bytelen_, \ | 2285 eisub_1 (ei, off, charoff, len, charlen, ei19->data_, ei19->bytelen_, \ |
2286 ei19->charlen_); \ | 2286 ei19->charlen_); \ |
2287 } while (0) | 2287 } while (0) |
2288 | 2288 |
2289 #define eisub_c(ei, off, charoff, len, charlen, c_string) \ | 2289 #define eisub_ascii(ei, off, charoff, len, charlen, ascstr) \ |
2290 do { \ | 2290 do { \ |
2291 const Ascbyte *ei20 = (c_string); \ | 2291 const Ascbyte *ei20 = (ascstr); \ |
2292 int ei20len = strlen (ei20); \ | 2292 int ei20len = strlen (ei20); \ |
2293 ASSERT_ASCTEXT_ASCII_LEN (ei20, ei20len); \ | 2293 ASSERT_ASCTEXT_ASCII_LEN (ei20, ei20len); \ |
2294 eisub_1 (ei, off, charoff, len, charlen, ei20, ei20len, -1); \ | 2294 eisub_1 (ei, off, charoff, len, charlen, ei20, ei20len, -1); \ |
2295 } while (0) | 2295 } while (0) |
2296 | 2296 |
2367 #define eirstr_ei_off(eistr, eistr2, off, charoff) \ | 2367 #define eirstr_ei_off(eistr, eistr2, off, charoff) \ |
2368 NOT YET IMPLEMENTED | 2368 NOT YET IMPLEMENTED |
2369 #define eirstr_ei_off_char(eistr, eistr2, off, charoff) \ | 2369 #define eirstr_ei_off_char(eistr, eistr2, off, charoff) \ |
2370 NOT YET IMPLEMENTED | 2370 NOT YET IMPLEMENTED |
2371 | 2371 |
2372 #define eistr_c(eistr, c_string) \ | 2372 #define eistr_ascii(eistr, ascstr) \ |
2373 NOT YET IMPLEMENTED | 2373 NOT YET IMPLEMENTED |
2374 #define eistr_c_char(eistr, c_string) \ | 2374 #define eistr_ascii_char(eistr, ascstr) \ |
2375 NOT YET IMPLEMENTED | 2375 NOT YET IMPLEMENTED |
2376 #define eistr_c_off(eistr, c_string, off, charoff) \ | 2376 #define eistr_ascii_off(eistr, ascstr, off, charoff) \ |
2377 NOT YET IMPLEMENTED | 2377 NOT YET IMPLEMENTED |
2378 #define eistr_c_off_char(eistr, c_string, off, charoff) \ | 2378 #define eistr_ascii_off_char(eistr, ascstr, off, charoff) \ |
2379 NOT YET IMPLEMENTED | 2379 NOT YET IMPLEMENTED |
2380 #define eirstr_c(eistr, c_string) \ | 2380 #define eirstr_ascii(eistr, ascstr) \ |
2381 NOT YET IMPLEMENTED | 2381 NOT YET IMPLEMENTED |
2382 #define eirstr_c_char(eistr, c_string) \ | 2382 #define eirstr_ascii_char(eistr, ascstr) \ |
2383 NOT YET IMPLEMENTED | 2383 NOT YET IMPLEMENTED |
2384 #define eirstr_c_off(eistr, c_string, off, charoff) \ | 2384 #define eirstr_ascii_off(eistr, ascstr, off, charoff) \ |
2385 NOT YET IMPLEMENTED | 2385 NOT YET IMPLEMENTED |
2386 #define eirstr_c_off_char(eistr, c_string, off, charoff) \ | 2386 #define eirstr_ascii_off_char(eistr, ascstr, off, charoff) \ |
2387 NOT YET IMPLEMENTED | 2387 NOT YET IMPLEMENTED |
2388 | 2388 |
2389 | 2389 |
2390 /* ----- Comparison ----- */ | 2390 /* ----- Comparison ----- */ |
2391 | 2391 |
2404 #define eicasecmp_i18n_ei(eistr, eistr2) \ | 2404 #define eicasecmp_i18n_ei(eistr, eistr2) \ |
2405 eicmp_1 (eistr, 0, -1, -1, -1, 0, eistr2, 0, 2) | 2405 eicmp_1 (eistr, 0, -1, -1, -1, 0, eistr2, 0, 2) |
2406 #define eicasecmp_i18n_off_ei(eistr, off, charoff, len, charlen, eistr2) \ | 2406 #define eicasecmp_i18n_off_ei(eistr, off, charoff, len, charlen, eistr2) \ |
2407 eicmp_1 (eistr, off, charoff, len, charlen, 0, eistr2, 0, 2) | 2407 eicmp_1 (eistr, off, charoff, len, charlen, 0, eistr2, 0, 2) |
2408 | 2408 |
2409 #define eicmp_c(eistr, c_string) \ | 2409 #define eicmp_ascii(eistr, ascstr) \ |
2410 eicmp_1 (eistr, 0, -1, -1, -1, c_string, 0, 1, 0) | 2410 eicmp_1 (eistr, 0, -1, -1, -1, (const Ibyte *) ascstr, 0, 1, 0) |
2411 #define eicmp_off_c(eistr, off, charoff, len, charlen, c_string) \ | 2411 #define eicmp_off_ascii(eistr, off, charoff, len, charlen, ascstr) \ |
2412 eicmp_1 (eistr, off, charoff, len, charlen, c_string, 0, 1, 0) | 2412 eicmp_1 (eistr, off, charoff, len, charlen, (const Ibyte *) ascstr, 0, 1, 0) |
2413 #define eicasecmp_c(eistr, c_string) \ | 2413 #define eicasecmp_ascii(eistr, ascstr) \ |
2414 eicmp_1 (eistr, 0, -1, -1, -1, c_string, 0, 1, 1) | 2414 eicmp_1 (eistr, 0, -1, -1, -1, (const Ibyte *) ascstr, 0, 1, 1) |
2415 #define eicasecmp_off_c(eistr, off, charoff, len, charlen, c_string) \ | 2415 #define eicasecmp_off_ascii(eistr, off, charoff, len, charlen, ascstr) \ |
2416 eicmp_1 (eistr, off, charoff, len, charlen, c_string, 0, 1, 1) | 2416 eicmp_1 (eistr, off, charoff, len, charlen, (const Ibyte *) ascstr, 0, 1, 1) |
2417 #define eicasecmp_i18n_c(eistr, c_string) \ | 2417 #define eicasecmp_i18n_ascii(eistr, ascstr) \ |
2418 eicmp_1 (eistr, 0, -1, -1, -1, c_string, 0, 1, 2) | 2418 eicmp_1 (eistr, 0, -1, -1, -1, (const Ibyte *) ascstr, 0, 1, 2) |
2419 #define eicasecmp_i18n_off_c(eistr, off, charoff, len, charlen, c_string) \ | 2419 #define eicasecmp_i18n_off_ascii(eistr, off, charoff, len, charlen, ascstr) \ |
2420 eicmp_1 (eistr, off, charoff, len, charlen, c_string, 0, 1, 2) | 2420 eicmp_1 (eistr, off, charoff, len, charlen, (const Ibyte *) ascstr, 0, 1, 2) |
2421 | 2421 |
2422 | 2422 |
2423 /* ----- Case-changing the Eistring ----- */ | 2423 /* ----- Case-changing the Eistring ----- */ |
2424 | 2424 |
2425 int eistr_casefiddle_1 (Ibyte *olddata, Bytecount len, Ibyte *newdata, | 2425 int eistr_casefiddle_1 (Ibyte *olddata, Bytecount len, Ibyte *newdata, |