Commit Graph

69 Commits

Author SHA1 Message Date
christos 28614955c7 PR/58136: Paul Ripke: Fix use after free. 2024-04-13 02:01:38 +00:00
rillig 388550b026 lib: remove CONSTCOND comment
Since 2021-01-31, lint doesn't need it anymore for the common pattern of
'do ... while (0)'.
2022-04-19 20:32:14 +00:00
kamil 77a1ad5f00 Switch the iconv(3) prototype to the POSIX conformant variation
Remove const from the 2nd argument.

const char ** and char ** are incompatible types and it was a cost to keep
the technically incompatible form for a more purist variation. NetBSD was
almost the last alive OS to still keep the const argument (known leftovers:
Minix and Illumos).

Keep the const form for the internal purposes inside citrus and rump.

Address the build breakage fallout in the same change.

There are no ABI changes.

Change accepted by core@.
2019-10-24 18:17:14 +00:00
christos 01d1183f90 Since ch gets reassigned, it is not certain that it will be & or | again,
so return an illegal token if it is not instead of telling the compiler
that this is impossible.
2019-10-03 16:37:45 +00:00
christos b490ea0c99 provide sizes so that we don't truncate accidentally. 2019-10-03 16:35:57 +00:00
mrg 82974f2217 check for snprintf() truncation and fail sanely if so, rather than
attempting to use a file that won't exist or isn't secure.
2019-02-04 08:21:11 +00:00
christos 8f54820655 back to the defines (fixing a typo -- extra 'g') 2015-06-08 15:04:20 +00:00
christos 981b1ee281 Another version using inline functions (just as a demo, I'll go back to
defines since they are shorter and inlines don't fix the problem).
2015-06-08 15:02:33 +00:00
christos 1c03a0ccd5 Make the cpp protection macro name consistent with other headers.
Fix problems caused by the new macros introduced for gnu gettext compatibility.
XXX: Must be a better way...
2015-06-05 20:12:56 +00:00
christos a059aa6763 bump for p functions 2015-05-29 12:27:03 +00:00
christos 5297022a79 Patch from William Orr in tech-userlevel:
- Added most *p*gettext functions
- Added basic function to concat msgctxt and msgid
- Simplify free handling

Need to write tests.
2015-05-29 12:26:28 +00:00
yamt 5c3967c0d3 comments 2012-07-30 23:04:42 +00:00
matt e1a2f47f12 Use C89 function definition 2012-03-21 10:10:36 +00:00
tnozaki dc7498df23 libintl crash when *.mo file lacks header section(old gettext format).
reported by jun@ -san, tested by tsutsui@ -san. thanks!
2012-01-21 13:35:49 +00:00
joerg f2ac4d0c2a Add __format_arg attribute to gettext(3) and friends. 2011-10-14 22:42:01 +00:00
joerg 2ec9715635 Do not use \." for comments, always use .\". Discussed with uwe@. 2009-11-12 00:43:52 +00:00
yamt ebdb9fb038 cache_cmp: fix comparison. 2009-02-18 13:08:22 +00:00
christos 46edb91e9f bump shared libraries. 2009-01-11 03:07:47 +00:00
junyoung 8fa93f7dc6 Farewell to gccism. 2007-09-25 08:22:44 +00:00
junyoung 4271bf2ec5 Massive cosmetic changes, notably:
* ANSIfy
 * De-__P
 * u_intXX_t -> uintXX_t
 * Remove "extern" from function prototypes
2007-09-25 08:19:09 +00:00
junyoung 0e2bf8ef62 Remove trailing spaces. 2007-09-25 08:16:08 +00:00
hubertf 55ac93d329 Remove more duplicate #includes, and a few spurious whitespaces at EOL
From Slava Semushin <slava.semushin@gmail.com>
2007-01-17 23:24:22 +00:00
lukem 9f3f3adf23 appease gcc -Wuninitialized 2005-06-01 11:08:57 +00:00
yamt 62de7e0c8d dcngettext: don't return stack garbage when there's no usable database. 2005-05-15 09:58:06 +00:00
tshiozak dd416aa868 add plural support. 2005-05-14 17:58:56 +00:00
yamt 4882631e1a correct size to malloc. 2005-04-27 09:51:52 +00:00
yamt c67c589db3 remove unnecessary #include. 2005-04-27 09:50:26 +00:00
wiz 894084c6c3 Correct ngettext arguments; bump date.
From Christian Biere in PR 28144.
2004-11-10 13:46:14 +00:00
tshiozak 922c0d0065 add system dependent strings support.
this hopefully allows to use .mo files generated by gettext-0.12 or later.
2004-09-23 21:35:27 +00:00
tshiozak 29be49b448 - add hash table support.
- make use of __UNCONST() instead of LINTED.
2004-09-23 16:44:26 +00:00
tshiozak f7d656a488 revert the last all changes related to iconv(3). 2004-08-02 13:38:21 +00:00
yamt dc8be105a2 follow the recent iconv(3) prototype change. 2004-08-02 03:15:33 +00:00
uebayasi 456930e651 Don't convert text if *.mo doesn't specify codeset.
Analyzed by Takehiko Nozaki, tested by Sean Davis, OK'ed by yamt.
2004-03-13 04:58:04 +00:00
wiz cef0afe940 Lots of grammar and wording changes from jmc@openbsd, with some
additional consistency changes by me.
2004-01-24 16:58:54 +00:00
yamt 0cb9ad6acb fix a comment; nl_langinfo(CODESET) belongs to LC_CTYPE, not LC_MESSAGES. 2004-01-20 12:04:48 +00:00
yamt 570948990d add an ARGSUSED. 2004-01-18 08:54:02 +00:00
yamt 1318d6326f comment. 2004-01-18 08:53:09 +00:00
yamt f3ec2d5725 implement gettext implicit iconv and bind_textdomain_codeset. 2004-01-18 08:40:40 +00:00
itojun 8047470762 sys/types.h is not needed here. kevlo@openbsd 2004-01-05 19:21:00 +00:00
itojun 0169ab0afa minor KNF 2004-01-02 22:19:51 +00:00
itojun edffd45884 use strlcpy 2004-01-02 12:10:48 +00:00
wiz 472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
drochner e0fb4a2b6b -in bindtextdomain(), don't crash if a NULL dirname is passed - return the
current path setting in this case (or default)
-fix return value
-don't copy a string to itself
2003-04-09 14:11:33 +00:00
lukem 2c76065bf9 enable __RCSID() (no need to protect in LIBC_SCCS or !__lint) 2003-03-09 01:02:34 +00:00
jmmv 656722d549 .fn -> .Fn 2003-02-27 20:03:30 +00:00
gmcgarry b4ed1bd48a Add Xref to nls(7). 2003-02-12 02:51:23 +00:00
yamt 6c208635b5 - give the precedence to LC_ALL environment variable
than other LC_* variables.
2002-02-13 08:01:13 +00:00
ross 814f296b77 Generate <>& symbolically. 2002-02-07 07:00:09 +00:00
wiz b9661d6129 Whitespace nits. 2002-01-15 02:47:02 +00:00
yamt 7cd60a32fc fix a bug that uninitialised buffer is used when LANG is like "en_US". 2001-12-29 05:54:36 +00:00