The NetBSD Project

CVS log for src/lib/libedit/chartype.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libedit

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.30 / (download) - annotate - [select for diffs], Mon May 9 21:46:56 2016 UTC (3 months, 3 weeks ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, HEAD
Changes since 1.29: +9 -9 lines
Diff to previous 1.29 (colored)

s/protected/libedit_private/g

Revision 1.29 / (download) - annotate - [select for diffs], Mon May 2 16:48:34 2016 UTC (3 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.28: +31 -38 lines
Diff to previous 1.28 (colored)

eliminate static buffer with custom resizing code.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Apr 11 18:56:31 2016 UTC (4 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.27: +8 -8 lines
Diff to previous 1.27 (colored)

Get rid of private/public; keep protected (Ingo Schwarze)

Revision 1.27 / (download) - annotate - [select for diffs], Mon Apr 11 16:06:52 2016 UTC (4 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.26: +7 -4 lines
Diff to previous 1.26 (colored)

chartype cleanups from Ingo Schwarze:

 - The file tokenizer.c no longer uses chartype.h,
   so don't include the header.

 - The dummy definitions of ct_{de,en}code_string() for the
   NARROWCHAR case are only used in history.c, so move them there.

 - Now the whole content of chartype.h is for the wide character
   case only.  So remove the NARROWCHAR ifdef and include the
   header only in the wide character case.

 - In chartype.h, move ct_encode_char() below the comment explaining it.

 - No more need for underscores before ct_{de,en}code_string().

 - Make the conversion buffer resize functions private.
   They are only called from the decoding and encoding functions
   inside chartype.c, and no need can possibly arise to call them
   from anywhere else.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Apr 11 00:50:13 2016 UTC (4 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.25: +16 -16 lines
Diff to previous 1.25 (colored)

Char -> wchar_t from Ingo Schwarze.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Apr 9 18:43:17 2016 UTC (4 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.24: +8 -17 lines
Diff to previous 1.24 (colored)

More WIDECHAR elimination (Ingo Schwarze)

Revision 1.24 / (download) - annotate - [select for diffs], Wed Mar 23 22:27:48 2016 UTC (5 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.23: +2 -32 lines
Diff to previous 1.23 (colored)

Start removing the WIDECHAR ifdefs; building without it has stopped working
anyway. (Ingo Schwarze)

Revision 1.23 / (download) - annotate - [select for diffs], Sun Feb 28 23:02:24 2016 UTC (6 months ago) by christos
Branch: MAIN
Changes since 1.22: +2 -9 lines
Diff to previous 1.22 (colored)

remove 4 clause licenses.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Feb 24 17:20:01 2016 UTC (6 months ago) by christos
Branch: MAIN
Changes since 1.21: +12 -5 lines
Diff to previous 1.21 (colored)

Tuck in mbstate_t to the wide char version only to avoid exposing the zeroing
hack and doing it in the narrow case.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Feb 24 17:13:22 2016 UTC (6 months ago) by christos
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Make the read_char function always take a wchar_t * argument (Ingo Schwarze)

Revision 1.20 / (download) - annotate - [select for diffs], Wed Feb 24 14:25:38 2016 UTC (6 months ago) by christos
Branch: MAIN
Changes since 1.19: +4 -3 lines
Diff to previous 1.19 (colored)

Get split el_getc and el_wgetc completely and call el_wgetc internally.
Change some character constants to they wide versions. (Ingo Schwarze)

Revision 1.19 / (download) - annotate - [select for diffs], Wed Feb 17 19:47:49 2016 UTC (6 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

whitespace and header sorting changes (Ingo Schwarze). No functional changes.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Feb 16 22:53:14 2016 UTC (6 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.17: +7 -3 lines
Diff to previous 1.17 (colored)

More header cleanups from Ingo Schwarze.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Feb 16 15:53:48 2016 UTC (6 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.16: +3 -7 lines
Diff to previous 1.16 (colored)

From Ingo Scharze:
Let "el.h" include everything needed for struct editline,
and don't include that stuff multiple times.  That also improves
consistency, also avoids circular inclusions, and also makes it
easier to follow what is going on, even though not quite as nice.
But it seems like the best we can do...

Revision 1.16 / (download) - annotate - [select for diffs], Tue Feb 16 14:08:25 2016 UTC (6 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.15: +5 -3 lines
Diff to previous 1.15 (colored)

cleanup chartype.h includes (Ingo Schwarze)

Revision 1.15 / (download) - annotate - [select for diffs], Tue Feb 16 14:06:05 2016 UTC (6 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.14: +4 -2 lines
Diff to previous 1.14 (colored)

cleanup inclusion of histedit.h (Ingo Schwarze)

Revision 1.14 / (download) - annotate - [select for diffs], Sun Feb 14 14:47:48 2016 UTC (6 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.13: +16 -2 lines
Diff to previous 1.13 (colored)

From Ingo Schwartze:

Next step:  Remove #ifdef'ing in read_char(), in the same style
as we did for setlocale(3) in el.c.

A few remarks are required to explain the choices made.

 * On first sight, handling mbrtowc(3) seems a bit less trivial
   than handling setlocale(3) because its prototype uses the data
   type mbstate_t from <wchar.h>.  However, it turns out that
   "histedit.h" already includes <wchar.h> unconditionally (i don't
   like headers including other headers, but that ship has sailed,
   people are by now certainly used to the fact that including
   "histedit.h" doesn't require including <wchar.h> before), and
   "histedit.h" is of course included all over the place.  So from
   that perspective, there is no problem with using mbrtowc(3)
   unconditionally ever for !WIDECHAR.

 * However, <wchar.h> also defines the mbrtowc(3) prototype,
   so we cannot just #define mbrtowc away, or including the header
   will break.  It would also be a bad idea to porovide a local
   implementation of mbrtowc() and hope that it overrides the one
   in libc.  Besides, the required prototype is subtly different:
   While mbrtowc(3) takes "wchar_t *" as its first argument, we
   need a function that takes "Char *".  So unfortunately, we have
   to keep a ct_mbrtowc #define, at least until we can maybe get
   rid of "Char *" in the more remote future.

 * After getting rid of the #else clause in read_char(), we can
   pull "return 1;" into the default: clause.  After that, we can
   get rid of the ugly "goto again_lastbyte;" and just "break;".
   As a bonus, that also gets rid of the ugly CONSTCOND.

 * While here, delete the unused ct_mbtowc() from chartype.h.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Feb 11 19:21:04 2016 UTC (6 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

- Add some more Char casts
- reduce ifdefs by providing empty defs for nls functions (Ingo Schwarze)

Revision 1.10.20.1 / (download) - annotate - [select for diffs], Tue Apr 14 05:30:24 2015 UTC (16 months, 2 weeks ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.10: +54 -46 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Pull up following revision(s) (requested by christos in ticket #679):
	lib/libedit/chartype.c: revisions 1.11, 1.12
	lib/libedit/chartype.h: revisions 1.12, 1.13
PR/49683: Amir Plivatsky: Off-by-one comparison in ct_decode_string() leading
to out of bounds referrence.
--
split the allocation functions, their mixed usage was too confusing.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Feb 22 02:16:19 2015 UTC (18 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.11: +41 -30 lines
Diff to previous 1.11 (colored)

split the allocation functions, their mixed usage was too confusing.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Feb 22 00:46:58 2015 UTC (18 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.10: +24 -27 lines
Diff to previous 1.10 (colored)

PR/49683: Amir Plivatsky: Off-by-one comparison in ct_decode_string() leading
to out of bounds referrence.
XXX: pullup-7

Revision 1.10 / (download) - annotate - [select for diffs], Tue Aug 16 16:25:15 2011 UTC (5 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, agc-symver-base, agc-symver
Branch point for: netbsd-7
Changes since 1.9: +7 -7 lines
Diff to previous 1.9 (colored)

re-enable -Wconversion

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 29 23:44:44 2011 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.8: +11 -10 lines
Diff to previous 1.8 (colored)

pass -Wconversion

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 29 15:16:33 2011 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

KNF return (\1); -> return \1;

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jul 28 20:50:55 2011 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

kill ptr_t and ioctl_t, add  * sizeof(*foo) to all allocations.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jul 28 00:48:21 2011 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.5: +7 -5 lines
Diff to previous 1.5 (colored)

- fix memory allocation botch in wide strings
- check mbstowcs return code

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jul 27 02:18:30 2011 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.4: +8 -15 lines
Diff to previous 1.4 (colored)

fix buffer growing code.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Apr 15 00:55:57 2010 UTC (6 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.3: +5 -6 lines
Diff to previous 1.3 (colored)

From Jess Thrysoee
	expose ct_enc_width()

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 12 19:37:18 2010 UTC (6 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.2: +5 -5 lines
Diff to previous 1.2 (colored)

- in the argv conversion, handle NULL as NULL
- when printing tab/nl print them, don't handle them specially.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 31 18:32:37 2009 UTC (6 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

expose the encode and decode string functions for the benefit of history
and readline.

Revision 1.1 / (download) - annotate - [select for diffs], Wed Dec 30 22:37:40 2009 UTC (6 years, 8 months ago) by christos
Branch: MAIN

Wide character support (UTF-8) from Johny Mattsson; currently disabled.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>