head 1.45; access; symbols netbsd-10-0-RC6:1.44 netbsd-10-0-RC5:1.44 netbsd-10-0-RC4:1.44 netbsd-10-0-RC3:1.44 netbsd-10-0-RC2:1.44 netbsd-10-0-RC1:1.44 netbsd-10:1.44.0.6 netbsd-10-base:1.44 netbsd-9-3-RELEASE:1.43 cjep_sun2x-base1:1.44 cjep_sun2x:1.44.0.4 cjep_sun2x-base:1.44 cjep_staticlib_x-base1:1.44 netbsd-9-2-RELEASE:1.43 cjep_staticlib_x:1.44.0.2 cjep_staticlib_x-base:1.44 netbsd-9-1-RELEASE:1.43 phil-wifi-20200421:1.44 phil-wifi-20200411:1.44 is-mlppp:1.43.0.4 is-mlppp-base:1.43 phil-wifi-20200406:1.44 netbsd-8-2-RELEASE:1.42 netbsd-9-0-RELEASE:1.43 netbsd-9-0-RC2:1.43 netbsd-9-0-RC1:1.43 phil-wifi-20191119:1.43 netbsd-9:1.43.0.2 netbsd-9-base:1.43 phil-wifi-20190609:1.43 netbsd-8-1-RELEASE:1.42 netbsd-8-1-RC1:1.42 pgoyette-compat-merge-20190127:1.42.12.1 pgoyette-compat-20190127:1.43 pgoyette-compat-20190118:1.43 pgoyette-compat-1226:1.42 pgoyette-compat-1126:1.42 pgoyette-compat-1020:1.42 pgoyette-compat-0930:1.42 pgoyette-compat-0906:1.42 netbsd-7-2-RELEASE:1.40 pgoyette-compat-0728:1.42 netbsd-8-0-RELEASE:1.42 phil-wifi:1.42.0.14 phil-wifi-base:1.42 pgoyette-compat-0625:1.42 netbsd-8-0-RC2:1.42 pgoyette-compat-0521:1.42 pgoyette-compat-0502:1.42 pgoyette-compat-0422:1.42 netbsd-8-0-RC1:1.42 pgoyette-compat-0415:1.42 pgoyette-compat-0407:1.42 pgoyette-compat-0330:1.42 pgoyette-compat-0322:1.42 pgoyette-compat-0315:1.42 netbsd-7-1-2-RELEASE:1.40 pgoyette-compat:1.42.0.12 pgoyette-compat-base:1.42 netbsd-7-1-1-RELEASE:1.40 matt-nb8-mediatek:1.42.0.10 matt-nb8-mediatek-base:1.42 perseant-stdc-iso10646:1.42.0.8 perseant-stdc-iso10646-base:1.42 netbsd-8:1.42.0.6 netbsd-8-base:1.42 prg-localcount2-base3:1.42 prg-localcount2-base2:1.42 prg-localcount2-base1:1.42 prg-localcount2:1.42.0.4 prg-localcount2-base:1.42 pgoyette-localcount-20170426:1.42 bouyer-socketcan-base1:1.42 pgoyette-localcount-20170320:1.42 netbsd-7-1:1.40.0.10 netbsd-7-1-RELEASE:1.40 netbsd-7-1-RC2:1.40 netbsd-7-nhusb-base-20170116:1.40 bouyer-socketcan:1.42.0.2 bouyer-socketcan-base:1.42 pgoyette-localcount-20170107:1.42 netbsd-7-1-RC1:1.40 pgoyette-localcount-20161104:1.42 netbsd-7-0-2-RELEASE:1.40 localcount-20160914:1.41 netbsd-7-nhusb:1.40.0.8 netbsd-7-nhusb-base:1.40 pgoyette-localcount-20160806:1.41 pgoyette-localcount-20160726:1.41 pgoyette-localcount:1.41.0.2 pgoyette-localcount-base:1.41 netbsd-7-0-1-RELEASE:1.40 netbsd-7-0:1.40.0.6 netbsd-7-0-RELEASE:1.40 netbsd-7-0-RC3:1.40 netbsd-7-0-RC2:1.40 netbsd-7-0-RC1:1.40 netbsd-5-2-3-RELEASE:1.27.8.1 netbsd-5-1-5-RELEASE:1.27.18.1 netbsd-6-0-6-RELEASE:1.30 netbsd-6-1-5-RELEASE:1.30 netbsd-7:1.40.0.4 netbsd-7-base:1.40 yamt-pagecache-base9:1.40 yamt-pagecache-tag8:1.30 netbsd-6-1-4-RELEASE:1.30 netbsd-6-0-5-RELEASE:1.30 tls-earlyentropy:1.40.0.2 tls-earlyentropy-base:1.40 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.40 riastradh-drm2-base3:1.40 netbsd-6-1-3-RELEASE:1.30 netbsd-6-0-4-RELEASE:1.30 netbsd-5-2-2-RELEASE:1.27.8.1 netbsd-5-1-4-RELEASE:1.27.18.1 netbsd-6-1-2-RELEASE:1.30 netbsd-6-0-3-RELEASE:1.30 netbsd-5-2-1-RELEASE:1.27.8.1 netbsd-5-1-3-RELEASE:1.27.18.1 netbsd-6-1-1-RELEASE:1.30 riastradh-drm2-base2:1.38 riastradh-drm2-base1:1.38 riastradh-drm2:1.38.0.2 riastradh-drm2-base:1.38 netbsd-6-1:1.30.0.16 netbsd-6-0-2-RELEASE:1.30 netbsd-6-1-RELEASE:1.30 netbsd-6-1-RC4:1.30 netbsd-6-1-RC3:1.30 agc-symver:1.30.0.14 agc-symver-base:1.30 netbsd-6-1-RC2:1.30 netbsd-6-1-RC1:1.30 yamt-pagecache-base8:1.30 netbsd-5-2:1.27.8.1.0.2 netbsd-6-0-1-RELEASE:1.30 yamt-pagecache-base7:1.30 netbsd-5-2-RELEASE:1.27.8.1 netbsd-5-2-RC1:1.27.8.1 matt-nb6-plus-nbase:1.30 yamt-pagecache-base6:1.30 netbsd-6-0:1.30.0.10 netbsd-6-0-RELEASE:1.30 netbsd-6-0-RC2:1.30 tls-maxphys:1.30.0.8 tls-maxphys-base:1.40 matt-nb6-plus:1.30.0.6 matt-nb6-plus-base:1.30 netbsd-6-0-RC1:1.30 yamt-pagecache-base5:1.30 yamt-pagecache-base4:1.30 netbsd-6:1.30.0.4 netbsd-6-base:1.30 netbsd-5-1-2-RELEASE:1.27.18.1 netbsd-5-1-1-RELEASE:1.27.18.1 yamt-pagecache-base3:1.30 yamt-pagecache-base2:1.30 yamt-pagecache:1.30.0.2 yamt-pagecache-base:1.30 cherry-xenmp:1.29.0.4 cherry-xenmp-base:1.29 uebayasi-xip-base7:1.29 bouyer-quota2-nbase:1.29 bouyer-quota2:1.29.0.2 bouyer-quota2-base:1.29 matt-mips64-premerge-20101231:1.29 matt-nb5-mips64-premerge-20101231:1.27 matt-nb5-pq3:1.27.0.20 matt-nb5-pq3-base:1.27 netbsd-5-1:1.27.0.18 uebayasi-xip-base6:1.29 uebayasi-xip-base5:1.29 netbsd-5-1-RELEASE:1.27 uebayasi-xip-base4:1.29 uebayasi-xip-base3:1.29 netbsd-5-1-RC4:1.27 matt-nb5-mips64-k15:1.27 uebayasi-xip-base2:1.29 netbsd-5-1-RC3:1.27 netbsd-5-1-RC2:1.27 uebayasi-xip-base1:1.29 netbsd-5-1-RC1:1.27 uebayasi-xip:1.28.0.2 uebayasi-xip-base:1.28 netbsd-5-0-2-RELEASE:1.27 matt-nb5-mips64-premerge-20091211:1.27 matt-premerge-20091211:1.28 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.27 matt-nb4-mips64-k7-u2a-k9b:1.27 matt-nb5-mips64-u1-k1-k5:1.27 matt-nb5-mips64:1.27.0.16 netbsd-5-0-1-RELEASE:1.27 jym-xensuspend-nbase:1.27 netbsd-5-0:1.27.0.14 netbsd-5-0-RELEASE:1.27 netbsd-5-0-RC4:1.27 netbsd-5-0-RC3:1.27 netbsd-5-0-RC2:1.27 jym-xensuspend:1.27.0.12 jym-xensuspend-base:1.27 netbsd-5-0-RC1:1.27 christos-time_t-nbase:1.27 christos-time_t:1.27.0.10 christos-time_t-base:1.27 netbsd-5:1.27.0.8 netbsd-5-base:1.27 matt-mips64-base2:1.27 matt-mips64:1.26.0.18 netbsd-4-0-1-RELEASE:1.26 wrstuden-revivesa-base-3:1.27 wrstuden-revivesa-base-2:1.27 wrstuden-fixsa-newbase:1.26 wrstuden-revivesa-base-1:1.27 simonb-wapbl-nbase:1.27 yamt-pf42-base4:1.27 simonb-wapbl:1.27.0.4 simonb-wapbl-base:1.27 yamt-pf42-base3:1.27 hpcarm-cleanup-nbase:1.27 yamt-pf42-baseX:1.26 yamt-pf42-base2:1.27 wrstuden-revivesa:1.27.0.2 wrstuden-revivesa-base:1.27 yamt-pf42:1.26.0.16 yamt-pf42-base:1.26 keiichi-mipv6:1.26.0.14 keiichi-mipv6-base:1.26 matt-armv6-nbase:1.26 matt-armv6-prevmlocking:1.26 wrstuden-fixsa-base-1:1.26 netbsd-4-0:1.26.0.12 netbsd-4-0-RELEASE:1.26 cube-autoconf:1.26.0.10 cube-autoconf-base:1.26 netbsd-4-0-RC5:1.26 netbsd-4-0-RC4:1.26 netbsd-4-0-RC3:1.26 netbsd-4-0-RC2:1.26 netbsd-4-0-RC1:1.26 matt-armv6:1.26.0.8 matt-armv6-base:1.26 matt-mips64-base:1.26 hpcarm-cleanup:1.26.0.6 hpcarm-cleanup-base:1.26 netbsd-3-1-1-RELEASE:1.21.2.1 netbsd-3-0-3-RELEASE:1.21.2.1 wrstuden-fixsa:1.26.0.4 wrstuden-fixsa-base:1.26 abandoned-netbsd-4-base:1.25 abandoned-netbsd-4:1.25.0.2 netbsd-3-1:1.21.2.1.0.4 netbsd-3-1-RELEASE:1.21.2.1 netbsd-3-0-2-RELEASE:1.21.2.1 netbsd-3-1-RC4:1.21.2.1 netbsd-3-1-RC3:1.21.2.1 netbsd-3-1-RC2:1.21.2.1 netbsd-3-1-RC1:1.21.2.1 netbsd-4:1.26.0.2 netbsd-4-base:1.26 netbsd-3-0-1-RELEASE:1.21.2.1 netbsd-3-0:1.21.2.1.0.2 netbsd-3-0-RELEASE:1.21.2.1 netbsd-3-0-RC6:1.21.2.1 netbsd-3-0-RC5:1.21.2.1 netbsd-3-0-RC4:1.21.2.1 netbsd-3-0-RC3:1.21.2.1 netbsd-3-0-RC2:1.21.2.1 netbsd-3-0-RC1:1.21.2.1 netbsd-2-0-3-RELEASE:1.19 netbsd-2-1:1.19.0.6 netbsd-2-1-RELEASE:1.19 netbsd-2-1-RC6:1.19 netbsd-2-1-RC5:1.19 netbsd-2-1-RC4:1.19 netbsd-2-1-RC3:1.19 netbsd-2-1-RC2:1.19 netbsd-2-1-RC1:1.19 netbsd-2-0-2-RELEASE:1.19 netbsd-3:1.21.0.2 netbsd-3-base:1.21 netbsd-2-0-1-RELEASE:1.19 netbsd-2:1.19.0.4 netbsd-2-base:1.19 netbsd-2-0-RELEASE:1.19 netbsd-2-0-RC5:1.19 netbsd-2-0-RC4:1.19 netbsd-2-0-RC3:1.19 netbsd-2-0-RC2:1.19 netbsd-2-0-RC1:1.19 netbsd-2-0:1.19.0.2 netbsd-2-0-base:1.19 netbsd-1-6-PATCH002-RELEASE:1.12 netbsd-1-6-PATCH002:1.12 netbsd-1-6-PATCH002-RC4:1.12 netbsd-1-6-PATCH002-RC3:1.12 netbsd-1-6-PATCH002-RC2:1.12 netbsd-1-6-PATCH002-RC1:1.12 netbsd-1-6-PATCH001:1.12 netbsd-1-6-PATCH001-RELEASE:1.12 netbsd-1-6-PATCH001-RC3:1.12 netbsd-1-6-PATCH001-RC2:1.12 netbsd-1-6-PATCH001-RC1:1.12 nathanw_sa_before_merge:1.12 nathanw_sa_end:1.9.2.4 fvdl_fs64_base:1.12 nathanw_sa_base:1.12 netbsd-1-6-RELEASE:1.12 netbsd-1-6-RC3:1.12 netbsd-1-6-RC2:1.12 netbsd-1-6-RC1:1.12 netbsd-1-6:1.12.0.2 netbsd-1-6-base:1.12 netbsd-1-5-PATCH003:1.1 netbsd-1-5-PATCH002:1.1 netbsd-1-5-PATCH001:1.1 nathanw_sa:1.9.0.2 netbsd-1-5-RELEASE:1.1 netbsd-1-5-BETA2:1.1 netbsd-1-5-BETA:1.1 netbsd-1-5-ALPHA2:1.1 netbsd-1-5:1.1.0.4 netbsd-1-5-base:1.1 minoura-xpg4dl:1.1.0.2 minoura-xpg4dl-base:1.1; locks; strict; comment @ * @; 1.45 date 2023.07.31.17.38.28; author christos; state Exp; branches; next 1.44; commitid X94RwbX5lzcWPYyE; 1.44 date 2020.03.20.01.08.42; author joerg; state Exp; branches; next 1.43; commitid o7IZVAADx6MzP41C; 1.43 date 2018.12.28.13.11.46; author maya; state Exp; branches; next 1.42; commitid 35a0RFlwOJLLdz5B; 1.42 date 2016.10.15.14.22.00; author kamil; state Exp; branches 1.42.8.1 1.42.12.1 1.42.14.1; next 1.41; commitid dPVBM51aZRjQpfqz; 1.41 date 2014.10.13.00.47.03; author christos; state Exp; branches 1.41.2.1; next 1.40; commitid 1ldofCrtqRbewYTx; 1.40 date 2013.11.21.09.09.52; author degroote; state Exp; branches; next 1.39; commitid zhn45iiUZNUTL7ex; 1.39 date 2013.08.19.08.03.33; author joerg; state Exp; branches; next 1.38; commitid 5Q2ZBYAWt5uOq22x; 1.38 date 2013.05.28.16.57.56; author joerg; state Exp; branches; next 1.37; commitid Nxe0KTcTnQ0C3qRw; 1.37 date 2013.04.19.23.45.15; author joerg; state Exp; branches; next 1.36; 1.36 date 2013.04.19.23.32.16; author joerg; state Exp; branches; next 1.35; 1.35 date 2013.04.19.15.22.24; author joerg; state Exp; branches; next 1.34; 1.34 date 2013.04.18.23.24.26; author joerg; state Exp; branches; next 1.33; 1.33 date 2013.04.18.22.23.17; author joerg; state Exp; branches; next 1.32; 1.32 date 2013.04.16.16.52.13; author joerg; state Exp; branches; next 1.31; 1.31 date 2013.04.16.11.55.02; author joerg; state Exp; branches; next 1.30; 1.30 date 2011.07.17.20.54.34; author joerg; state Exp; branches 1.30.2.1 1.30.4.1 1.30.8.1; next 1.29; 1.29 date 2010.03.27.22.14.09; author tnozaki; state Exp; branches; next 1.28; 1.28 date 2009.11.15.22.21.03; author christos; state Exp; branches 1.28.2.1; next 1.27; 1.27 date 2008.04.28.20.22.54; author martin; state Exp; branches 1.27.8.1 1.27.10.1 1.27.18.1; next 1.26; 1.26 date 2006.08.22.20.50.46; author christos; state Exp; branches 1.26.16.1; next 1.25; 1.25 date 2006.04.15.12.17.22; author tnozaki; state Exp; branches 1.25.2.1; next 1.24; 1.24 date 2005.05.15.21.10.52; author christos; state Exp; branches; next 1.23; 1.23 date 2005.05.14.23.51.42; author christos; state Exp; branches; next 1.22; 1.22 date 2005.03.30.03.47.11; author christos; state Exp; branches; next 1.21; 1.21 date 2005.02.03.04.39.32; author perry; state Exp; branches 1.21.2.1; next 1.20; 1.20 date 2004.05.08.21.57.05; author kleink; state Exp; branches; next 1.19; 1.19 date 2003.07.08.05.39.23; author itojun; state Exp; branches; next 1.18; 1.18 date 2003.04.28.23.16.15; author bjh21; state Exp; branches; next 1.17; 1.17 date 2003.03.11.09.21.22; author tshiozak; state Exp; branches; next 1.16; 1.16 date 2003.03.07.07.11.35; author tshiozak; state Exp; branches; next 1.15; 1.15 date 2003.03.05.20.18.15; author tshiozak; state Exp; branches; next 1.14; 1.14 date 2003.03.03.07.39.53; author tshiozak; state Exp; branches; next 1.13; 1.13 date 2003.03.02.22.18.11; author tshiozak; state Exp; branches; next 1.12; 1.12 date 2002.03.14.21.22.28; author yamt; state Exp; branches; next 1.11; 1.11 date 2001.12.07.11.47.40; author yamt; state Exp; branches; next 1.10; 1.10 date 2001.09.27.16.30.35; author yamt; state Exp; branches; next 1.9; 1.9 date 2000.12.29.15.26.33; author kleink; state Exp; branches 1.9.2.1; next 1.8; 1.8 date 2000.12.22.05.31.42; author itojun; state Exp; branches; next 1.7; 1.7 date 2000.12.22.05.24.03; author itojun; state Exp; branches; next 1.6; 1.6 date 2000.12.21.11.29.48; author itojun; state Exp; branches; next 1.5; 1.5 date 2000.12.21.08.30.52; author itojun; state Exp; branches; next 1.4; 1.4 date 2000.12.21.05.12.18; author itojun; state Exp; branches; next 1.3; 1.3 date 2000.12.20.22.36.25; author itojun; state Exp; branches; next 1.2; 1.2 date 2000.12.20.14.53.23; author itojun; state Exp; branches; next 1.1; 1.1 date 2000.04.20.09.56.37; author kleink; state Exp; branches 1.1.2.1; next ; 1.42.8.1 date 2017.07.14.15.53.07; author perseant; state Exp; branches; next 1.42.8.2; commitid WAceDHR8OnIrddZz; 1.42.8.2 date 2018.01.20.19.36.29; author perseant; state Exp; branches; next ; commitid 0UmSC6CTB6HFlEnA; 1.42.12.1 date 2019.01.18.08.50.09; author pgoyette; state Exp; branches; next ; commitid Lmlzg3OVT2cd6f8B; 1.42.14.1 date 2019.06.10.22.05.12; author christos; state Exp; branches; next 1.42.14.2; commitid jtc8rnCzWiEEHGqB; 1.42.14.2 date 2020.04.08.14.07.11; author martin; state Exp; branches; next ; commitid Qli2aW9E74UFuA3C; 1.41.2.1 date 2016.11.04.14.48.51; author pgoyette; state Exp; branches; next ; commitid 2m1JRwYmpwPkOOsz; 1.30.2.1 date 2014.05.22.11.36.35; author yamt; state Exp; branches; next ; commitid OndjEcbQZzO4KwBx; 1.30.4.1 date 2015.01.16.09.36.12; author martin; state Exp; branches; next ; commitid v6Nu9qVqbDLtoe6y; 1.30.8.1 date 2013.06.23.06.28.49; author tls; state Exp; branches; next 1.30.8.2; commitid OnlO1cBgtQRcIHUw; 1.30.8.2 date 2014.08.20.00.02.05; author tls; state Exp; branches; next ; commitid jTnpym9Qu0o4R1Nx; 1.28.2.1 date 2010.04.30.14.36.18; author uebayasi; state Exp; branches; next ; 1.27.8.1 date 2011.05.20.19.18.37; author bouyer; state Exp; branches; next 1.27.8.2; 1.27.8.2 date 2015.02.26.21.59.43; author snj; state Exp; branches; next ; commitid jsDTR4t8dK8W9zby; 1.27.10.1 date 2008.04.28.20.22.54; author martin; state dead; branches; next 1.27.10.2; 1.27.10.2 date 2008.04.28.20.22.55; author martin; state Exp; branches; next ; 1.27.18.1 date 2011.05.20.19.18.44; author bouyer; state Exp; branches; next ; 1.26.16.1 date 2008.05.18.12.30.09; author yamt; state Exp; branches; next ; 1.25.2.1 date 2006.08.27.06.15.47; author riz; state Exp; branches; next ; 1.21.2.1 date 2005.04.06.13.39.05; author tron; state Exp; branches; next ; 1.9.2.1 date 2001.10.08.20.13.47; author nathanw; state Exp; branches; next 1.9.2.2; 1.9.2.2 date 2002.01.14.21.37.09; author nathanw; state Exp; branches; next 1.9.2.3; 1.9.2.3 date 2002.01.28.21.27.19; author nathanw; state Exp; branches; next 1.9.2.4; 1.9.2.4 date 2002.03.22.21.10.10; author nathanw; state Exp; branches; next ; 1.1.2.1 date 2000.05.28.22.41.02; author minoura; state Exp; branches; next ; desc @@ 1.45 log @new gdb needs wmempcpy, give it to it. @ text @/* $NetBSD: wchar.h,v 1.44 2020/03/20 01:08:42 joerg Exp $ */ /*- * Copyright (c)1999 Citrus Project, * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Julian Coleman. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _WCHAR_H_ #define _WCHAR_H_ #include #include #include #include #include #include /* for FILE* */ #if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif #ifdef _BSD_MBSTATE_T_ typedef _BSD_MBSTATE_T_ mbstate_t; #undef _BSD_MBSTATE_T_ #endif #ifdef _BSD_WINT_T_ typedef _BSD_WINT_T_ wint_t; #undef _BSD_WINT_T_ #endif #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif #if defined(_POSIX_C_SOURCE) #ifndef __VA_LIST_DECLARED typedef __va_list va_list; #define __VA_LIST_DECLARED #endif #endif struct tm; __BEGIN_DECLS wint_t btowc(int); size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict); size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict); int mbsinit(const mbstate_t *); size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict); size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict); wchar_t *wcschr(const wchar_t *, wchar_t); int wcscmp(const wchar_t *, const wchar_t *); int wcscoll(const wchar_t *, const wchar_t *); wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); size_t wcscspn(const wchar_t *, const wchar_t *); size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, const struct tm * __restrict); size_t wcslen(const wchar_t *); wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t); int wcsncmp(const wchar_t *, const wchar_t *, size_t); wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t); size_t wcsnlen(const wchar_t *, size_t); wchar_t *wcspbrk(const wchar_t *, const wchar_t *); wchar_t *wcsrchr(const wchar_t *, wchar_t); size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict); size_t wcsspn(const wchar_t *, const wchar_t *); wchar_t *wcsstr(const wchar_t *, const wchar_t *); wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, wchar_t ** __restrict); size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); wchar_t *wcswcs(const wchar_t *, const wchar_t *); wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); int wmemcmp(const wchar_t *, const wchar_t *, size_t); wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); wchar_t *wmempcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); wchar_t *wmemset(wchar_t *, wchar_t, size_t); #if defined(_NETBSD_SOURCE) size_t wcslcat(wchar_t *, const wchar_t *, size_t); size_t wcslcpy(wchar_t *, const wchar_t *, size_t); #endif #if defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0 >= 200112L) || (_XOPEN_SOURCE - 0) >= 600 int wcswidth(const wchar_t *, size_t); int wcwidth(wchar_t); #endif int wctob(wint_t); unsigned long int wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int); long int wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int); double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \ (__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 float wcstof(const wchar_t * __restrict, wchar_t ** __restrict); long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict); /* LONGLONG */ long long int wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int); /* LONGLONG */ unsigned long long int wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int); #endif #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) FILE *open_wmemstream(wchar_t **, size_t *); #endif wint_t ungetwc(wint_t, FILE *); wint_t fgetwc(FILE *); wchar_t *fgetws(wchar_t * __restrict, int, FILE * __restrict); wint_t getwc(FILE *); wint_t getwchar(void); wint_t fputwc(wchar_t, FILE *); int fputws(const wchar_t * __restrict, FILE * __restrict); wint_t putwc(wchar_t, FILE *); wint_t putwchar(wchar_t); int fwide(FILE *, int); wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); int swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, ...); int swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...); int vfwprintf(FILE * __restrict, const wchar_t * __restrict, __va_list); int vswprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, __va_list); int vwprintf(const wchar_t * __restrict, __va_list); int wprintf(const wchar_t * __restrict, ...); int wscanf(const wchar_t * __restrict, ...); #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \ (__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 int vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list); int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, __va_list); int vwscanf(const wchar_t * __restrict, __va_list); #endif #if defined(_NETBSD_SOURCE) struct tinfo; int t_putws(struct tinfo *, const wchar_t *, int, void (*)(wchar_t, void *), void *); wchar_t *wcsdup (const wchar_t *); int wcsncasecmp (const wchar_t *, const wchar_t *, size_t); int wcscasecmp(const wchar_t *, const wchar_t *); #endif __END_DECLS #ifndef WEOF #define WEOF ((wint_t)-1) #endif #define getwc(f) fgetwc(f) #define getwchar() getwc(stdin) #define putwc(wc, f) fputwc((wc), (f)) #define putwchar(wc) putwc((wc), stdout) #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif __BEGIN_DECLS size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict); size_t wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t, size_t, mbstate_t * __restrict); int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t); int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); size_t wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict, const struct tm * __restrict, locale_t); float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); long double wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); long int wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); unsigned long int wcstoul_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); /* LONGLONG */ long long int wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); /* LONGLONG */ unsigned long long int wcstoull_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); int wcwidth_l(wchar_t, locale_t); int wcswidth_l(const wchar_t *, size_t, locale_t); __END_DECLS #endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */ #if defined(_NETBSD_SOURCE) __BEGIN_DECLS wint_t btowc_l(int, locale_t); size_t mbrlen_l(const char * __restrict, size_t, mbstate_t * __restrict, locale_t); size_t mbrtowc_l(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict, locale_t); int mbsinit_l(const mbstate_t *, locale_t); size_t mbsrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict, locale_t); size_t mbsnrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict, locale_t); size_t wcrtomb_l(char * __restrict, wchar_t, mbstate_t * __restrict, locale_t); size_t wcsrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict, locale_t); size_t wcsnrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, size_t, mbstate_t * __restrict, locale_t); int wctob_l(wint_t, locale_t); int fwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); int swprintf_l(wchar_t * __restrict, size_t n, locale_t, const wchar_t * __restrict, ...); int vfwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vswprintf_l(wchar_t * __restrict, size_t, locale_t, const wchar_t * __restrict, __va_list); int vwprintf_l(locale_t, const wchar_t * __restrict, __va_list); int wprintf_l(locale_t, const wchar_t * __restrict, ...); int fwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); int swscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, ...); int wscanf_l(locale_t, const wchar_t * __restrict, ...); int vfwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vswscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vwscanf_l(locale_t, const wchar_t * __restrict, __va_list); __END_DECLS #endif /* _NETBSD_SOURCE */ #endif /* !_WCHAR_H_ */ @ 1.44 log @Fix visibility of various C99 features, esp. for C++11. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.43 2018/12/28 13:11:46 maya Exp $ */ d133 1 @ 1.43 log @Limit wcslcat, wcslcpy visibility to _NETBSD_SOURCE wcswidth, wcwidth to POSIX.1-2001 or _NETBSD_SOURCE Updated patch from kretschm in PR standards/39422 @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.42 2016/10/15 14:22:00 kamil Exp $ */ d154 3 a156 3 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \ defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 d197 2 a198 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 @ 1.42 log @Import wcsnlen(3) to libc The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the ISO C standard. size_t wcsnlen(const wchar_t *s, size_t maxlen); The wcsnlen(3) function computes the number of wide-characters in a wide- -string to which s points, not including NULL terminating wide-character code and checking no more than maxlen wide-characters. This function never examines wide-characters beyond a wide-string of maxlen size. This function is a safer version of wcslen(3): size_t wcslen(const wchar_t *s); Update STANDARDS section of wmemchr(3) describing wide-character functions. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.41 2014/10/13 00:47:03 christos Exp $ */ d136 1 d139 4 a143 1 int wctob(wint_t); d145 1 d147 1 @ 1.42.14.1 log @Sync with HEAD @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.43 2018/12/28 13:11:46 maya Exp $ */ a135 1 #if defined(_NETBSD_SOURCE) a137 4 #endif #if defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0 >= 200112L) || (_XOPEN_SOURCE - 0) >= 600 d139 1 a140 1 #endif a141 1 int wctob(wint_t); @ 1.42.14.2 log @Merge changes from current as of 20200406 @ text @d1 1 a1 1 /* $NetBSD$ */ d154 3 a156 3 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \ (__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 d197 2 a198 2 (__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 @ 1.42.12.1 log @Synch with HEAD @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.42 2016/10/15 14:22:00 kamil Exp $ */ a135 1 #if defined(_NETBSD_SOURCE) a137 4 #endif #if defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0 >= 200112L) || (_XOPEN_SOURCE - 0) >= 600 d139 1 a140 1 #endif a141 1 int wctob(wint_t); @ 1.42.8.1 log @Initial commit of a mostly-working implementation of __STDC_ISO_10646__, with collation support using the Unicode Collation Algorithm. The conversion from men/ku/ten form to Unicode is a gross hack at present. Fixing this, and fleshing out the LC_COLLATE locale component, are next on the agenda. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.42 2016/10/15 14:22:00 kamil Exp $ */ a68 3 /* We use ISO10646 for our wchar represenation */ #define __STDC_ISO_10646__ @ 1.42.8.2 log @Use multilevel tables (tries) to convert kuten <-> unicode. Get rid of dchains, replace with chain/rchain conversions through keys allocated from the PUA. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.42.8.1 2017/07/14 15:53:07 perseant Exp $ */ d70 1 a70 1 /* #define __STDC_ISO_10646__ */ @ 1.41 log @add open_{,w}memstream @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.40 2013/11/21 09:09:52 degroote Exp $ */ d119 1 @ 1.41.2.1 log @Sync with HEAD @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.42 2016/10/15 14:22:00 kamil Exp $ */ a118 1 size_t wcsnlen(const wchar_t *, size_t); @ 1.40 log @Expose properly vfwscanf and friends for POSIX_SOURCE >= 200112L @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.39 2013/08/19 08:03:33 joerg Exp $ */ d161 5 @ 1.39 log @Add nl_langinfo_l, catopen_l and wcsftime_l. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.38 2013/05/28 16:57:56 joerg Exp $ */ d148 2 a149 1 defined(_NETBSD_SOURCE) d185 2 a186 1 defined(_NETBSD_SOURCE) @ 1.38 log @Add mbsnrtowcs and wcsnrtombs. Approved by core. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.37 2013/04/19 23:45:15 joerg Exp $ */ d225 3 @ 1.37 log @More __BEGIN_DECLS / __END_DECLS wrappers. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.36 2013/04/19 23:32:16 joerg Exp $ */ d215 5 d254 2 d259 2 @ 1.36 log @Add scanf_l and wscanf_l families. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.35 2013/04/19 15:22:24 joerg Exp $ */ d214 1 d236 1 d240 1 d273 1 @ 1.35 log @Add explicit locale versions for the printf family. Replace asprintf, snprintf and sprintf with simple wrappers around the corresponding va_list functions to reduce code duplication. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.34 2013/04/18 23:24:26 joerg Exp $ */ d260 10 @ 1.34 log @Add wcscoll_l, wcsxfrm_l, wcsncasecmp_l, wcscasecmp_l, btowc_l, mbrlen_l, mbsinit_l, mbsrtowcs_l, wcrtomb_l, wcsrtombs_l and wctob_l. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.33 2013/04/18 22:23:17 joerg Exp $ */ d250 10 @ 1.33 log @Add wcstof_l, wcstod_l and wcstold_l. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.32 2013/04/16 16:52:13 joerg Exp $ */ d214 5 d235 16 a250 1 #endif @ 1.32 log @Add support for wcstoimax_l and friends. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.31 2013/04/16 11:55:02 joerg Exp $ */ d214 4 @ 1.31 log @Also add prototypes for wcwidth_l and wcswidth_l. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.30 2011/07/17 20:54:34 joerg Exp $ */ d214 10 @ 1.30 log @Retire varargs.h support. Move machine/stdarg.h logic into MI sys/stdarg.h and expect compiler to provide proper builtins, defaulting to the GCC interface. lint still has a special fallback. Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and derive va_list as required by standards. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.29 2010/03/27 22:14:09 tnozaki Exp $ */ d209 9 @ 1.30.4.1 log @Pull up following revision(s) (requested by christos in ticket #1231): include/wchar.h: revision 1.40 Expose properly vfwscanf and friends for POSIX_SOURCE >= 200112L @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.30 2011/07/17 20:54:34 joerg Exp $ */ d148 1 a148 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 d184 1 a184 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 @ 1.30.2.1 log @sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments") @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.30 2011/07/17 20:54:34 joerg Exp $ */ d148 1 a148 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 d184 1 a184 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 a208 79 #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif __BEGIN_DECLS size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict); size_t wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t, size_t, mbstate_t * __restrict); int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t); int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); size_t wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict, const struct tm * __restrict, locale_t); float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); long double wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); long int wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); unsigned long int wcstoul_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); /* LONGLONG */ long long int wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); /* LONGLONG */ unsigned long long int wcstoull_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); int wcwidth_l(wchar_t, locale_t); int wcswidth_l(const wchar_t *, size_t, locale_t); __END_DECLS #endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */ #if defined(_NETBSD_SOURCE) __BEGIN_DECLS wint_t btowc_l(int, locale_t); size_t mbrlen_l(const char * __restrict, size_t, mbstate_t * __restrict, locale_t); size_t mbrtowc_l(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict, locale_t); int mbsinit_l(const mbstate_t *, locale_t); size_t mbsrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict, locale_t); size_t mbsnrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict, locale_t); size_t wcrtomb_l(char * __restrict, wchar_t, mbstate_t * __restrict, locale_t); size_t wcsrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict, locale_t); size_t wcsnrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, size_t, mbstate_t * __restrict, locale_t); int wctob_l(wint_t, locale_t); int fwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); int swprintf_l(wchar_t * __restrict, size_t n, locale_t, const wchar_t * __restrict, ...); int vfwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vswprintf_l(wchar_t * __restrict, size_t, locale_t, const wchar_t * __restrict, __va_list); int vwprintf_l(locale_t, const wchar_t * __restrict, __va_list); int wprintf_l(locale_t, const wchar_t * __restrict, ...); int fwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); int swscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, ...); int wscanf_l(locale_t, const wchar_t * __restrict, ...); int vfwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vswscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vwscanf_l(locale_t, const wchar_t * __restrict, __va_list); __END_DECLS #endif /* _NETBSD_SOURCE */ @ 1.30.8.1 log @resync from head @ text @d1 1 a1 1 /* $NetBSD$ */ a208 76 #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif __BEGIN_DECLS size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict); size_t wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t, size_t, mbstate_t * __restrict); int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t); int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); long double wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); long int wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); unsigned long int wcstoul_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); /* LONGLONG */ long long int wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); /* LONGLONG */ unsigned long long int wcstoull_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); int wcwidth_l(wchar_t, locale_t); int wcswidth_l(const wchar_t *, size_t, locale_t); __END_DECLS #endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */ #if defined(_NETBSD_SOURCE) __BEGIN_DECLS wint_t btowc_l(int, locale_t); size_t mbrlen_l(const char * __restrict, size_t, mbstate_t * __restrict, locale_t); size_t mbrtowc_l(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict, locale_t); int mbsinit_l(const mbstate_t *, locale_t); size_t mbsrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict, locale_t); size_t mbsnrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict, locale_t); size_t wcrtomb_l(char * __restrict, wchar_t, mbstate_t * __restrict, locale_t); size_t wcsrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict, locale_t); size_t wcsnrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, size_t, mbstate_t * __restrict, locale_t); int wctob_l(wint_t, locale_t); int fwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); int swprintf_l(wchar_t * __restrict, size_t n, locale_t, const wchar_t * __restrict, ...); int vfwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vswprintf_l(wchar_t * __restrict, size_t, locale_t, const wchar_t * __restrict, __va_list); int vwprintf_l(locale_t, const wchar_t * __restrict, __va_list); int wprintf_l(locale_t, const wchar_t * __restrict, ...); int fwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); int swscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, ...); int wscanf_l(locale_t, const wchar_t * __restrict, ...); int vfwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vswscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, __va_list); int vwscanf_l(locale_t, const wchar_t * __restrict, __va_list); __END_DECLS #endif /* _NETBSD_SOURCE */ @ 1.30.8.2 log @Rebase to HEAD as of a few days ago. @ text @d148 1 a148 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 d184 1 a184 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 a224 3 size_t wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict, const struct tm * __restrict, locale_t); @ 1.29 log @1. {wctype,wctrans,mbstate}_t: switch MD to MI like other libc implementation (such as *BSD and glibc2). 2. don't typedef void * wc{type,trans}_t, suggested by soda@@-san. it may pass through compiler type check, it's harmful. so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does). no ABI change was made. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.28 2009/11/15 22:21:03 christos Exp $ */ d89 7 d177 1 a177 1 int vfwprintf(FILE * __restrict, const wchar_t * __restrict, _BSD_VA_LIST_); d179 2 a180 2 _BSD_VA_LIST_); int vwprintf(const wchar_t * __restrict, _BSD_VA_LIST_); d185 1 a185 1 int vfwscanf(FILE * __restrict, const wchar_t * __restrict, _BSD_VA_LIST_); d187 2 a188 2 _BSD_VA_LIST_); int vwscanf(const wchar_t * __restrict, _BSD_VA_LIST_); @ 1.28 log @Don't define wchar_t for c++; it is native in the language. From Alexander Nasonov @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.27 2008/04/28 20:22:54 martin Exp $ */ a62 1 #include d64 1 @ 1.28.2.1 log @Sync with HEAD. @ text @d1 1 a1 1 /* $NetBSD$ */ d63 1 a64 1 #include @ 1.27 log @Remove clause 3 and 4 from TNF licenses @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.26 2006/08/22 20:50:46 christos Exp $ */ d69 1 a69 1 #ifdef _BSD_WCHAR_T_ @ 1.27.18.1 log @Pull up following revision(s) (requested by joerg in ticket #1611): include/inttypes.h: revision 1.7 include/stddef.h: revision 1.16 include/wchar.h: revision 1.28 include/stdlib.h: revision 1.90 Don't define wchar_t for c++; it is native in the language. From Alexander Nasonov @ text @d1 1 a1 1 /* $NetBSD$ */ d69 1 a69 1 #if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) @ 1.27.8.1 log @Pull up following revision(s) (requested by joerg in ticket #1611): include/inttypes.h: revision 1.7 include/stddef.h: revision 1.16 include/wchar.h: revision 1.28 include/stdlib.h: revision 1.90 Don't define wchar_t for c++; it is native in the language. From Alexander Nasonov @ text @d1 1 a1 1 /* $NetBSD$ */ d69 1 a69 1 #if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) @ 1.27.8.2 log @Apply patch (requested by christos in ticket #1943): Properly expose wcsto{f,ld,ll,ull} and v{fw,sw,ws}scanf when _POSIX_C_SOURCE >= 200112L and _XOPEN_SOURCE >= 600. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.27.8.1 2011/05/20 19:18:37 bouyer Exp $ */ d141 1 a141 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 d177 1 a177 2 defined(_NETBSD_SOURCE) || \ (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 @ 1.27.10.1 log @file wchar.h was added on branch christos-time_t on 2008-04-28 20:22:55 +0000 @ text @d1 202 @ 1.27.10.2 log @Remove clause 3 and 4 from TNF licenses @ text @a0 202 /* $NetBSD: wchar.h,v 1.27 2008/04/28 20:22:54 martin Exp $ */ /*- * Copyright (c)1999 Citrus Project, * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Julian Coleman. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _WCHAR_H_ #define _WCHAR_H_ #include #include #include #include #include #include /* for FILE* */ #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif #ifdef _BSD_MBSTATE_T_ typedef _BSD_MBSTATE_T_ mbstate_t; #undef _BSD_MBSTATE_T_ #endif #ifdef _BSD_WINT_T_ typedef _BSD_WINT_T_ wint_t; #undef _BSD_WINT_T_ #endif #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif struct tm; __BEGIN_DECLS wint_t btowc(int); size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict); size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict); int mbsinit(const mbstate_t *); size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict); size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict); wchar_t *wcschr(const wchar_t *, wchar_t); int wcscmp(const wchar_t *, const wchar_t *); int wcscoll(const wchar_t *, const wchar_t *); wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); size_t wcscspn(const wchar_t *, const wchar_t *); size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, const struct tm * __restrict); size_t wcslen(const wchar_t *); wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t); int wcsncmp(const wchar_t *, const wchar_t *, size_t); wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t); wchar_t *wcspbrk(const wchar_t *, const wchar_t *); wchar_t *wcsrchr(const wchar_t *, wchar_t); size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict); size_t wcsspn(const wchar_t *, const wchar_t *); wchar_t *wcsstr(const wchar_t *, const wchar_t *); wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, wchar_t ** __restrict); size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); wchar_t *wcswcs(const wchar_t *, const wchar_t *); wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); int wmemcmp(const wchar_t *, const wchar_t *, size_t); wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); wchar_t *wmemset(wchar_t *, wchar_t, size_t); size_t wcslcat(wchar_t *, const wchar_t *, size_t); size_t wcslcpy(wchar_t *, const wchar_t *, size_t); int wcswidth(const wchar_t *, size_t); int wctob(wint_t); int wcwidth(wchar_t); unsigned long int wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int); long int wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int); double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \ defined(_NETBSD_SOURCE) float wcstof(const wchar_t * __restrict, wchar_t ** __restrict); long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict); /* LONGLONG */ long long int wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int); /* LONGLONG */ unsigned long long int wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int); #endif wint_t ungetwc(wint_t, FILE *); wint_t fgetwc(FILE *); wchar_t *fgetws(wchar_t * __restrict, int, FILE * __restrict); wint_t getwc(FILE *); wint_t getwchar(void); wint_t fputwc(wchar_t, FILE *); int fputws(const wchar_t * __restrict, FILE * __restrict); wint_t putwc(wchar_t, FILE *); wint_t putwchar(wchar_t); int fwide(FILE *, int); wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); int swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, ...); int swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...); int vfwprintf(FILE * __restrict, const wchar_t * __restrict, _BSD_VA_LIST_); int vswprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, _BSD_VA_LIST_); int vwprintf(const wchar_t * __restrict, _BSD_VA_LIST_); int wprintf(const wchar_t * __restrict, ...); int wscanf(const wchar_t * __restrict, ...); #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \ defined(_NETBSD_SOURCE) int vfwscanf(FILE * __restrict, const wchar_t * __restrict, _BSD_VA_LIST_); int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, _BSD_VA_LIST_); int vwscanf(const wchar_t * __restrict, _BSD_VA_LIST_); #endif #if defined(_NETBSD_SOURCE) struct tinfo; int t_putws(struct tinfo *, const wchar_t *, int, void (*)(wchar_t, void *), void *); wchar_t *wcsdup (const wchar_t *); int wcsncasecmp (const wchar_t *, const wchar_t *, size_t); int wcscasecmp(const wchar_t *, const wchar_t *); #endif __END_DECLS #ifndef WEOF #define WEOF ((wint_t)-1) #endif #define getwc(f) fgetwc(f) #define getwchar() getwc(stdin) #define putwc(wc, f) fputwc((wc), (f)) #define putwchar(wc) putwc((wc), stdout) #endif /* !_WCHAR_H_ */ @ 1.26 log @PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.25 2006/04/15 12:17:22 tnozaki Exp $ */ a43 7 * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. @ 1.26.16.1 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.26 2006/08/22 20:50:46 christos Exp $ */ d44 7 @ 1.25 log @add c99 wcstof(3) and wcstold(3). requested by skrll AT netbsd DOT org, thanks. bump libc minor 138 -> 139. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.24 2005/05/15 21:10:52 christos Exp $ */ d194 3 @ 1.25.2.1 log @Pull up following revision(s) (requested by tron in ticket #64): lib/libc/include/namespace.h: revision 1.119 lib/libc/string/wcsdup.c: revision 1.1 lib/libc/string/wcscasecmp.c: revision 1.1 lib/libc/include/namespace.h: revision 1.120 distrib/sets/lists/base/shl.mi: revision 1.366 lib/libc/shlib_version: revision 1.182 include/wchar.h: revision 1.26 lib/libc/string/Makefile.inc: revision 1.62 lib/libc/string/Makefile.inc: revision 1.63 lib/libc/string/wcsncasecmp.c: revision 1.1 PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions libc 147 for wcsdup and wcs{n,}casecmp include one more new file. add wcsdup, wcscasecmp and wcsncasecmp. fixes build problems.. I think we want both wcs{c,n}casecmp weak. @ text @d1 1 a1 1 /* $NetBSD$ */ a193 3 wchar_t *wcsdup (const wchar_t *); int wcsncasecmp (const wchar_t *, const wchar_t *, size_t); int wcscasecmp(const wchar_t *, const wchar_t *); @ 1.24 log @add t_putws @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.23 2005/05/14 23:51:42 christos Exp $ */ d149 3 @ 1.23 log @Wide stdio functions. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.22 2005/03/30 03:47:11 christos Exp $ */ d187 5 @ 1.22 log @PR/29826: J. T. Conklin: Add wcsftime(3) (from FreeBSD) @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.21 2005/02/03 04:39:32 perry Exp $ */ d168 19 @ 1.21 log @de-__P -- the hack is long since useless. Discussed with christos, matt, kleink, others. Approved by christos. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.20 2004/05/08 21:57:05 kleink Exp $ */ d96 2 d113 2 @ 1.21.2.1 log @Pull up revision 1.22 (requested by christos in ticket #102): PR/29826: J. T. Conklin: Add wcsftime(3) (from FreeBSD) @ text @d1 1 a1 1 /* $NetBSD$ */ a95 2 struct tm; a110 2 size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, const struct tm * __restrict); @ 1.20 log @C99: Provide WCHAR_{MAX,MIN} via (we'll also provide WINT_{MAX,MIN} along with it). Fixes PR standards/24040 from Masao Uebayashi. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.19 2003/07/08 05:39:23 itojun Exp $ */ a95 9 #ifndef WEOF #define WEOF ((wint_t)-1) #endif #define getwc(f) fgetwc(f) #define getwchar() getwc(stdin) #define putwc(wc, f) fputwc((wc), (f)) #define putwchar(wc) putwc((wc), stdout) d97 45 a141 48 wint_t btowc __P((int)); size_t mbrlen __P((const char * __restrict, size_t, mbstate_t * __restrict)); size_t mbrtowc __P((wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict)); int mbsinit __P((const mbstate_t *)); size_t mbsrtowcs __P((wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict)); size_t wcrtomb __P((char * __restrict, wchar_t, mbstate_t * __restrict)); wchar_t *wcscat __P((wchar_t * __restrict, const wchar_t * __restrict)); wchar_t *wcschr __P((const wchar_t *, wchar_t)); int wcscmp __P((const wchar_t *, const wchar_t *)); int wcscoll __P((const wchar_t *, const wchar_t *)); wchar_t *wcscpy __P((wchar_t * __restrict, const wchar_t * __restrict)); size_t wcscspn __P((const wchar_t *, const wchar_t *)); size_t wcslen __P((const wchar_t *)); wchar_t *wcsncat __P((wchar_t * __restrict, const wchar_t * __restrict, size_t)); int wcsncmp __P((const wchar_t *, const wchar_t *, size_t)); wchar_t *wcsncpy __P((wchar_t * __restrict , const wchar_t * __restrict, size_t)); wchar_t *wcspbrk __P((const wchar_t *, const wchar_t *)); wchar_t *wcsrchr __P((const wchar_t *, wchar_t)); size_t wcsrtombs __P((char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict)); size_t wcsspn __P((const wchar_t *, const wchar_t *)); wchar_t *wcsstr __P((const wchar_t *, const wchar_t *)); wchar_t *wcstok __P((wchar_t * __restrict, const wchar_t * __restrict, wchar_t ** __restrict)); size_t wcsxfrm __P((wchar_t *, const wchar_t *, size_t)); wchar_t *wcswcs __P((const wchar_t *, const wchar_t *)); wchar_t *wmemchr __P((const wchar_t *, wchar_t, size_t)); int wmemcmp __P((const wchar_t *, const wchar_t *, size_t)); wchar_t *wmemcpy __P((wchar_t * __restrict, const wchar_t * __restrict, size_t)); wchar_t *wmemmove __P((wchar_t *, const wchar_t *, size_t)); wchar_t *wmemset __P((wchar_t *, wchar_t, size_t)); size_t wcslcat __P((wchar_t *, const wchar_t *, size_t)); size_t wcslcpy __P((wchar_t *, const wchar_t *, size_t)); int wcswidth __P((const wchar_t *, size_t)); int wctob __P((wint_t)); int wcwidth __P((wchar_t)); unsigned long int wcstoul __P((const wchar_t * __restrict, wchar_t ** __restrict, int)); long int wcstol __P((const wchar_t * __restrict, wchar_t ** __restrict, int)); double wcstod __P((const wchar_t * __restrict, wchar_t ** __restrict)); d146 2 a147 2 long long int wcstoll __P((const wchar_t * __restrict, wchar_t ** __restrict, int)); d149 2 a150 2 unsigned long long int wcstoull __P((const wchar_t * __restrict, wchar_t ** __restrict, int)); d153 9 a161 9 wint_t ungetwc __P((wint_t, FILE *)); wint_t fgetwc __P((FILE *)); wchar_t *fgetws __P((wchar_t * __restrict, int, FILE * __restrict)); wint_t getwc __P((FILE *)); wint_t getwchar __P((void)); wint_t fputwc __P((wchar_t, FILE *)); int fputws __P((const wchar_t * __restrict, FILE * __restrict)); wint_t putwc __P((wchar_t, FILE *)); wint_t putwchar __P((wchar_t)); d163 1 a163 1 int fwide __P((FILE *, int)); d166 9 @ 1.19 log @prototype must not have variable name @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.18 2003/04/28 23:16:15 bjh21 Exp $ */ d71 1 @ 1.18 log @Add a new feature-test macro, _NETBSD_SOURCE. If this is defined by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.17 2003/03/11 09:21:22 tshiozak Exp $ */ d149 1 a149 1 wchar_t ** __restrict, int base)); d151 1 a151 1 wchar_t ** __restrict, int base)); d158 1 a158 1 wchar_t ** __restrict, int base)); d161 1 a161 1 wchar_t ** __restrict, int base)); @ 1.17 log @add wcstoll, wcstoimax, wcstoull and wcstoumax. (lib/20656) - these are defined in C99 (wcsto[ui]max) and SUSv3. - these implementations are written by sigsegv@@s25.xrea.com, derived from NetBSD's wcstol/wcstoul. - I just added some comments. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ d69 1 d154 2 a155 2 #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \ defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L @ 1.16 log @add fgetws() and fputws() (lib/20576). Note: fgetws.c, fgetws.3, fputws.c and fputws.3 are obtained from FreeBSD, and fitted by sigsegv@@infoseek.jp and me. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.15 2003/03/05 20:18:15 tshiozak Exp $ */ d147 4 a150 3 unsigned long int wcstoul __P((const wchar_t * __restrict, wchar_t ** __restrict, int base)); long int wcstol __P((const wchar_t * __restrict, wchar_t ** __restrict, int base)); d152 10 @ 1.15 log @changes related to lib/20576 and lib/20577. - add wcstok() and wcswcs(), - add wcstok(3), - move btowc() and wctob() into each ctype modules, - bump ctype interface ABI version, - bump i18n modules' minor and - update sets. and fix a stupid bug in _RUNE_ISCACHED macro. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.14 2003/03/03 07:39:53 tshiozak Exp $ */ d154 1 d158 1 @ 1.14 log @ - add wctob() function. (I forgot it at the last commit.) - fix btowc(); I quite misunderstood about it. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.13 2003/03/02 22:18:11 tshiozak Exp $ */ d130 2 d133 1 @ 1.13 log @add some ISO C 1995 I18N functions and types: btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.12 2002/03/14 21:22:28 yamt Exp $ */ d104 1 a104 1 wint_t btowc __P((int c)); d141 1 @ 1.12 log @fix prototype of fputwc, putwc and putwchar. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.11 2001/12/07 11:47:40 yamt Exp $ */ d104 1 d115 1 d130 1 @ 1.11 log @- make FILE structure extensible without breaking binary-compatibility. - add fputwc, fgetwc, fwide and related functions. - add hooks needed to maintain the orientation of file stream. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.10 2001/09/27 16:30:35 yamt Exp $ */ d149 3 a151 3 wint_t fputwc __P((wint_t, FILE *)); wint_t putwc __P((wint_t, FILE *)); wint_t putwchar __P((wint_t)); @ 1.10 log @add wcstod/wcstol/wcstoul. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.9 2000/12/29 15:26:33 kleink Exp $ */ d72 2 d98 5 d144 10 @ 1.9 log @Sprinkle some __restrict into . @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.8 2000/12/22 05:31:42 itojun Exp $ */ d132 5 @ 1.9.2.1 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.9 2000/12/29 15:26:33 kleink Exp $ */ a131 5 unsigned long int wcstoul __P((const wchar_t * __restrict, wchar_t ** __restrict, int base)); long int wcstol __P((const wchar_t * __restrict, wchar_t ** __restrict, int base)); double wcstod __P((const wchar_t * __restrict, wchar_t ** __restrict)); @ 1.9.2.2 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.9.2.1 2001/10/08 20:13:47 nathanw Exp $ */ a71 2 #include /* for FILE* */ a95 5 #define getwc(f) fgetwc(f) #define getwchar() getwc(stdin) #define putwc(wc, f) fputwc((wc), (f)) #define putwchar(wc) putwc((wc), stdout) a136 10 wint_t ungetwc __P((wint_t, FILE *)); wint_t fgetwc __P((FILE *)); wint_t getwc __P((FILE *)); wint_t getwchar __P((void)); wint_t fputwc __P((wint_t, FILE *)); wint_t putwc __P((wint_t, FILE *)); wint_t putwchar __P((wint_t)); int fwide __P((FILE *, int)); @ 1.9.2.3 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.9.2.2 2002/01/14 21:37:09 nathanw Exp $ */ @ 1.9.2.4 log @Catch up to -current. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.9.2.3 2002/01/28 21:27:19 nathanw Exp $ */ d149 3 a151 3 wint_t fputwc __P((wchar_t, FILE *)); wint_t putwc __P((wchar_t, FILE *)); wint_t putwchar __P((wchar_t)); @ 1.8 log @wcwidth is outside of standard @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.7 2000/12/22 05:24:03 itojun Exp $ */ d97 3 a99 2 size_t mbrlen __P((const char *, size_t, mbstate_t *)); size_t mbrtowc __P((wchar_t *, const char *, size_t, mbstate_t *)); d101 4 a104 3 size_t mbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *)); size_t wcrtomb __P((char *, wchar_t, mbstate_t *)); wchar_t *wcscat __P((wchar_t *, const wchar_t *)); d107 1 a107 1 wchar_t *wcscpy __P((wchar_t *, const wchar_t *)); d110 2 a111 1 wchar_t *wcsncat __P((wchar_t *, const wchar_t *, size_t)); d113 2 a114 1 wchar_t *wcsncpy __P((wchar_t *, const wchar_t *, size_t)); d117 2 a118 1 size_t wcsrtombs __P((char *, const wchar_t **, size_t, mbstate_t *)); d123 2 a124 1 wchar_t *wmemcpy __P((wchar_t *, const wchar_t *, size_t)); @ 1.7 log @add wcsl{cat,cpy} @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.6 2000/12/21 11:29:48 itojun Exp $ */ a115 2 int wcswidth __P((const wchar_t *, size_t)); int wcwidth __P((wchar_t)); d124 2 @ 1.6 log @first import of citrus LC_CTYPE locale. singlebyte only at this moment. shot-term TODO: - enable multibyte locales. this includes loadable locale modules (#ifdef DLRUNE). - populate LC_CTYPE definition files. - other functions such as iconv() - make libc functions more friendly with multibyte. - multilingualize other LC_xx - torture tests XXX don't forget to "make depend" when you rebuild libc, multibyte.c is moved from lib/libc/stdlib to lib/libc/locale. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.5 2000/12/21 08:30:52 itojun Exp $ */ d123 3 @ 1.5 log @add dummy wcwidth() and wcswidth(). wcwidth() will be updated later. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.4 2000/12/21 05:12:18 itojun Exp $ */ d97 5 d113 1 @ 1.4 log @add wcs* functions. consier it as part of libc minor crank 68 -> 69. add decl of WEOF into wchar.h. ISO/IEC 9899:1999(E).. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.3 2000/12/20 22:36:25 itojun Exp $ */ d77 5 d110 2 @ 1.3 log @ISO 9899-1990: #include should pull definition for "NULL" in. checked with Norihiro Kumagai @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.2 2000/12/20 14:53:23 itojun Exp $ */ d87 4 d92 13 @ 1.2 log @add wmem* functions, from citrus. bump libc shlib minor. @ text @d1 1 a1 1 /* $NetBSD: wchar.h,v 1.1 2000/04/20 09:56:37 kleink Exp $ */ d70 1 @ 1.1 log @* Move from libcurses to include (for the missing functionality is to be provided by libc). * Define wint_t and size_t in as well. @ text @d1 27 a27 1 /* $NetBSD$ */ d68 1 d85 8 @ 1.1.2.1 log @Citrus Project XPG4DL, an implementation of I18N (locale) framework, is imported. @ text @d1 2 d4 1 a4 1 * Copyright (c)1999 Citrus Project, d7 3 d18 7 d26 11 a36 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $Id: wchar.h,v 1.2 2000/01/25 14:24:21 cvscitrus Exp $ d40 1 a40 16 #define _WCHAR_H_ #undef __IN_WCHAR_H #define __IN_WCHAR_H #include #undef __IN_WCHAR_H #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif d42 1 a42 8 #ifdef _BSD_MBSTATE_T_ typedef _BSD_MBSTATE_T_ mbstate_t; #undef _BSD_MBSTATE_T_ #endif #ifndef WCHAR_MAX #define WCHAR_MAX (2147483647) #endif d44 3 a46 2 #ifndef WCHAR_MIN #define WCHAR_MIN (0) d49 3 a51 2 #ifndef NULL #define NULL (0) d54 3 a56 55 __BEGIN_DECLS #if 0 /* XXX: not implemented */ /* wint_t btowc __P((int)); int fwprintf __P((FILE *, const wchar_t *, ...)); int fwscanf __P((FILE *, const wchar_t *, ...)); */ #endif /* XXX: not implemented */ #if 0 /* defined in wctype.h commonly */ /* int iswalnum __P((wint_t)); int iswalpha __P((wint_t)); int iswcntrl __P((wint_t)); int iswdigit __P((wint_t)); int iswgraph __P((wint_t)); int iswlower __P((wint_t)); int iswprint __P((wint_t)); int iswpunct __P((wint_t)); int iswspace __P((wint_t)); int iswupper __P((wint_t)); int iswxdigit __P((wint_t)); */ #endif #if 0 /* XXX: not implemented */ /* int iswctype __P((wint_t, wctype_t)); wint_t fgetwc __P((FILE *)); wchar_t *fgetws __P((wchar_t *, int, FILE *)); wint_t fputwc __P((wchar_t, FILE *)); int fputws __P((const wchar_t *, FILE *)); int fwide __P((FILE *, int)); wint_t getwc __P((FILE *)); wint_t getwchar __P((void)); */ #endif /* XXX: not implemented */ int mbsinit __P((const mbstate_t *)); size_t mbrlen __P((const char *, size_t, mbstate_t *)); size_t mbrtowc __P((wchar_t *, const char *, size_t, mbstate_t *)); size_t mbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *)); #if 0 /* XXX: not implemented */ /* wint_t putwc __P((wchar_t, FILE *)); wint_t putwchar __P((wchar_t)); int swprintf __P((wchar_t *, size_t, const wchar_t *, ...)); int swscanf __P((const wchar_t *, const wchar_t *, ...)); */ #endif /* XXX: not implemented */ #if 0 /* defined in wctype.h commonly */ /* wint_t towlower __P((wint_t)); wint_t towupper __P((wint_t)); */ a57 68 #if 0 /* XXX: not implemented */ /* wint_t ungetwc __P((wint_t, FILE *)); int vfwprintf __P((FILE *, const wchar_t *, va_list)); int vwprintf __P((const wchar_t *, va_list)); int vswprintf __P((wchar_t *, size_t, const wchar_t *, va_list)); */ #endif /* XXX: not implemented */ size_t wcrtomb __P((char *, wchar_t, mbstate_t *)); wchar_t *wcscat __P((wchar_t *, const wchar_t *)); wchar_t *wcschr __P((const wchar_t *, wchar_t)); int wcscmp __P((const wchar_t *, const wchar_t *)); #if 0 /* XXX: not implemented */ /* int wcscoll __P((const wchar_t *, const wchar_t *)); */ #endif /* XXX: not implemented */ wchar_t *wcscpy __P((wchar_t *, const wchar_t *)); size_t wcscspn __P((const wchar_t *, const wchar_t *)); #if 0 /* XXX: not implemented */ /* size_t wcsftime __P((wchar_t *, size_t, const wchar_t *, const struct tm *)); */ #endif /* XXX: not implemented */ size_t wcslen __P((const wchar_t *)); wchar_t *wcsncat __P((wchar_t *, const wchar_t *, size_t)); int wcsncmp __P((const wchar_t *, const wchar_t *, size_t)); wchar_t *wcsncpy __P((wchar_t *, const wchar_t *, size_t)); wchar_t *wcspbrk __P((const wchar_t *, const wchar_t *)); wchar_t *wcsrchr __P((const wchar_t *, wchar_t)); size_t wcsrtombs __P((char *, const wchar_t **, size_t, mbstate_t *)); size_t wcsspn __P((const wchar_t *, const wchar_t *)); wchar_t *wcsstr __P((const wchar_t *, const wchar_t *)); #if 0 /* XXX: not implemented */ /* double wcstod __P((const wchar_t *, wchar_t **)); wchar_t *wcstok __P((wchar_t *, const wchar_t *, wchar_t **)); long int wcstol __P((const wchar_t *, wchar_t **, int)); unsigned long int wcstoul __P((const wchar_t *, wchar_t **, int)); wchar_t *wcswcs __P((const wchar_t *, const wchar_t *)); */ #endif /* XXX: not implemented */ int wcswidth __P((const wchar_t *, size_t)); #if 0 /* XXX: not implemented */ /* size_t wcsxfrm __P((wchar_t *, const wchar_t *, size_t)); int wctob __P((wint_t)); wctype_t wctype __P((const char *)); */ #endif /* XXX: not implemented */ int wcwidth __P((wchar_t)); wchar_t *wmemchr __P((const wchar_t *, wchar_t, size_t)); int wmemcmp __P((const wchar_t *, const wchar_t *, size_t)); wchar_t *wmemcpy __P((wchar_t *, const wchar_t *, size_t)); wchar_t *wmemmove __P((wchar_t *, const wchar_t *, size_t)); wchar_t *wmemset __P((wchar_t *, wchar_t, size_t)); #if 0 /* XXX: not implemented */ /* int wprintf __P((const wchar_t *, ...)); int wscanf __P((const wchar_t *, ...)); */ #endif /* XXX: not implemented */ __END_DECLS d59 1 a59 5 #if defined(__FreeBSD__) #define wcwidth(c) ((unsigned)__maskrune_w((c), _SWM)>>_SWS) #endif #endif @