summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-06-01 19:59:03 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-06-01 19:59:03 +0200
commit493d0cc28b0d0fa1dc571ffc876b554376ccdd47 (patch)
tree3ec057a08c2aad5cf43f55ca94e3b243e409f698 /libc/misc
parentc526740e06e1f7cc0a4747e319c18cde93523482 (diff)
remove MJN only debug messages
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/ctype/ctype.c11
-rw-r--r--libc/misc/error/err.c6
-rw-r--r--libc/misc/locale/locale.c75
-rw-r--r--libc/misc/time/time.c8
-rw-r--r--libc/misc/wchar/wchar.c35
-rw-r--r--libc/misc/wctype/_wctype.c36
6 files changed, 1 insertions, 170 deletions
diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c
index db8061d9f..bbe12e514 100644
--- a/libc/misc/ctype/ctype.c
+++ b/libc/misc/ctype/ctype.c
@@ -62,16 +62,7 @@
#endif /* __UCLIBC_HAS_CTYPE_SIGNED__ */
#endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
-/**********************************************************************/
-#ifdef __UCLIBC_MJN3_ONLY__
-#ifdef L_isspace
-/* emit only once */
-#warning CONSIDER: Should we assert when debugging and __UCLIBC_HAS_CTYPE_CHECKED?
-#warning TODO: Fix asserts in to{upper|lower}{_l}.
-#warning TODO: Optimize the isx*() funcs.
-#endif
-#endif /* __UCLIBC_MJN3_ONLY__ */
-/**********************************************************************/
+
#undef PASTE2
#define PASTE2(X,Y) X ## Y
diff --git a/libc/misc/error/err.c b/libc/misc/error/err.c
index 4f1e6a33f..1563450a0 100644
--- a/libc/misc/error/err.c
+++ b/libc/misc/error/err.c
@@ -12,14 +12,8 @@
#include <errno.h>
#include <err.h>
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning REMINDER: Deal with wide oriented stderr case.
-#endif
-
#if defined __USE_BSD
-
-
static void vwarn_work(const char *format, va_list args, int showerr)
{
/* 0123 45678 9 a b*/
diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c
index 68e54413e..f868ac022 100644
--- a/libc/misc/locale/locale.c
+++ b/libc/misc/locale/locale.c
@@ -58,11 +58,6 @@
#include <ctype.h>
#include <stdio.h>
-#ifdef __UCLIBC_MJN3_ONLY__
-#ifdef L_setlocale
-#warning TODO: Make the link_warning()s a config option?
-#endif
-#endif
#undef link_warning
#define link_warning(A,B)
@@ -78,13 +73,6 @@
#else /* __LOCALE_C_ONLY */
-#ifdef __UCLIBC_MJN3_ONLY__
-#ifdef L_setlocale
-#warning TODO: Fix the __CTYPE_HAS_8_BIT_LOCALES define at the top of the file.
-#warning TODO: Fix __WCHAR_ENABLED.
-#endif
-#endif
-
/* Need to include this before locale.h! */
#include <bits/uClibc_locale.h>
@@ -107,9 +95,6 @@
#define LOCALE_AT_MODIFIERS (__locale_mmap->locale_at_modifiers)
#define CATEGORY_NAMES (__locale_mmap->lc_names)
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning REMINDER: redo the MAX_LOCALE_STR stuff...
-#endif
#define MAX_LOCALE_STR 256 /* TODO: Only sufficient for current case. */
#define MAX_LOCALE_CATEGORY_STR 32 /* TODO: Only sufficient for current case. */
/* Note: Best if MAX_LOCALE_CATEGORY_STR is a power of 2. */
@@ -122,11 +107,6 @@ extern void _locale_init_l(__locale_t base) attribute_hidden;
#undef LOCALE_STRING_SIZE
#define LOCALE_SELECTOR_SIZE (2 * __LC_ALL + 2)
-#ifdef __UCLIBC_MJN3_ONLY__
-#ifdef L_setlocale
-#warning TODO: Create a C locale selector string.
-#endif
-#endif
#define C_LOCALE_SELECTOR "\x23\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80"
@@ -163,15 +143,9 @@ link_warning(setlocale,"REMINDER: The 'setlocale' function is _not_ threadsafe e
#error locales enabled, but not data other than for C locale!
#endif
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Move posix and utf8 strings.
-#endif
static const char posix[] = "POSIX";
static const char utf8[] = "UTF-8";
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Fix dimensions of hr_locale.
-#endif
/* Individual category strings start at hr_locale + category * MAX_LOCALE_CATEGORY.
* This holds for LC_ALL as well.
*/
@@ -355,9 +329,6 @@ __locale_t __curlocale_var = &__global_locale_data;
#endif
/*----------------------------------------------------------------------*/
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Move utf8 and ascii strings.
-#endif
static const char utf8[] = "UTF-8";
static const char ascii[] = "ASCII";
@@ -413,9 +384,6 @@ static int init_cur_collate(int der_num, __collate_t *cur_collate)
size_t n;
uint16_t i, w;
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning kill of x86-specific asserts
-#endif
#if 0
assert(sizeof(coldata_base_t) == 19*2);
assert(sizeof(coldata_der_t) == 4*2);
@@ -431,9 +399,6 @@ static int init_cur_collate(int der_num, __collate_t *cur_collate)
cdh = (coldata_header_t *) __locale_collate_tbl;
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning CONSIDER: Should we assert here?
-#endif
#if 0
if (der_num >= cdh->num_der) {
return 0;
@@ -492,11 +457,6 @@ static int init_cur_collate(int der_num, __collate_t *cur_collate)
cur_collate->MAX_WEIGHTS = cdh->MAX_WEIGHTS;
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning CONSIDER: Fix the +1 by increasing max_col_index?
-#warning CONSIDER: Since this collate info is dependent only on LC_COLLATE ll_cc and not on codeset, we could just globally allocate this for each in a table
-#endif
-
cur_collate->index2weight = calloc(2*cur_collate->max_col_index+2,
sizeof(uint16_t));
if (!cur_collate->index2weight) {
@@ -643,9 +603,6 @@ int attribute_hidden _locale_set_l(const unsigned char *p, __locale_t base)
c -= 3;
base->codeset = (char *) (r + r[c]);
base->encoding = __ctype_encoding_8_bit;
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning REMINDER: update 8 bit mb_cur_max when translit implemented!
-#endif
/* TODO - update when translit implemented! */
base->mb_cur_max = 1;
c8b = __locale_mmap->codeset_8_bit + c;
@@ -775,9 +732,6 @@ int attribute_hidden _locale_set_l(const unsigned char *p, __locale_t base)
#endif /* __CTYPE_HAS_8_BIT_LOCALES */
}
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Put the outdigit string length in the locale_mmap object.
-#endif
d = base->outdigit_length;
x = &base->outdigit0_mb;
for (c = 0 ; c < 10 ; c++) {
@@ -798,9 +752,6 @@ int attribute_hidden _locale_set_l(const unsigned char *p, __locale_t base)
= __locale_mbrtowc_l(&base->thousands_sep_wc,
base->thousands_sep, base);
#if 1
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Remove hack involving grouping without a thousep char (bg_BG).
-#endif
assert(base->thousands_sep_len >= 0);
if (base->thousands_sep_len == 0) {
base->grouping = base->thousands_sep; /* empty string */
@@ -898,9 +849,6 @@ void attribute_hidden _locale_init_l(__locale_t base)
__ctype_toupper = __C_ctype_toupper;
#endif /* __UCLIBC_HAS_XLOCALE__ */
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Initialize code2flag correctly based on locale_mmap.
-#endif
base->code2flag = __code2flag;
_locale_set_l((unsigned char*) C_LOCALE_SELECTOR, base);
@@ -1056,9 +1004,6 @@ libc_hidden_def(__XL_NPP(nl_langinfo))
#warning mask defines for extra locale categories
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Move posix and utf8 strings.
-#endif
static const char posix[] = "POSIX";
static const char utf8[] = "UTF-8";
@@ -1073,9 +1018,6 @@ static int find_locale(int category_mask, const char *p,
#if defined(__LOCALE_DATA_AT_MODIFIERS_LENGTH) && 1
/* Support standard locale handling for @-modifiers. */
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning REMINDER: Fix buf size in find_locale.
-#endif
char buf[18]; /* TODO: 7+{max codeset name length} */
const char *q;
@@ -1226,9 +1168,6 @@ __locale_t newlocale(int category_mask, const char *locale, __locale_t base)
return NULL; /* No locale or illegal/unsupported category. */
}
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Rename cur_locale to locale_selector.
-#endif
strcpy((char *) new_selector,
(base ? (char *) base->cur_locale : C_LOCALE_SELECTOR));
@@ -1272,15 +1211,9 @@ __locale_t newlocale(int category_mask, const char *locale, __locale_t base)
goto INVALID;
}
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Do a compatible codeset check!
-#endif
/* If we get here, the new selector corresponds to a valid locale. */
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning CONSIDER: Probably want a _locale_new func to allow for caching of locales.
-#endif
#if 0
if (base) {
_locale_set_l(new_selector, base);
@@ -1309,10 +1242,6 @@ libc_hidden_def(newlocale)
#ifdef L_duplocale
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning REMINDER: When we allocate ctype tables, remember to dup them.
-#endif
-
__locale_t duplocale(__locale_t dataset)
{
__locale_t r;
@@ -1341,10 +1270,6 @@ __locale_t duplocale(__locale_t dataset)
/**********************************************************************/
#ifdef L_freelocale
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning REMINDER: When we allocate ctype tables, remember to free them.
-#endif
-
void freelocale(__locale_t dataset)
{
assert(dataset != __global_locale);
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 03635d86d..cd189169a 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -1033,10 +1033,6 @@ static wchar_t* fmt_to_wc_1(const char *src)
#define MAX_PUSH 4
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Check multibyte format string validity.
-#endif
-
size_t __XL_NPP(strftime)(CHAR_T *__restrict s, size_t maxsize,
const CHAR_T *__restrict format,
const struct tm *__restrict timeptr __LOCALE_PARAM )
@@ -1871,10 +1867,6 @@ static const char *getnumber(register const char *e, int *pn)
}
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning CONSIDER: Should we preserve errno from open/read/close errors re TZ file?
-#endif
-
#ifdef __UCLIBC_HAS_TZ_FILE__
#ifndef __UCLIBC_HAS_TZ_FILE_READ_MANY__
diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c
index 966f78d19..201f30772 100644
--- a/libc/misc/wchar/wchar.c
+++ b/libc/misc/wchar/wchar.c
@@ -112,12 +112,6 @@
/**********************************************************************/
#ifdef __UCLIBC_HAS_LOCALE__
-#ifdef __UCLIBC_MJN3_ONLY__
-#ifdef L_iswspace
-/* generates one warning */
-#warning TODO: Fix Cc2wc* and Cwc2c* defines!
-#endif
-#endif /* __UCLIBC_MJN3_ONLY__ */
#define ENCODING (__UCLIBC_CURLOCALE->encoding)
@@ -134,13 +128,6 @@
#else /* __UCLIBC_HAS_LOCALE__ */
-#ifdef __UCLIBC_MJN3_ONLY__
-#ifdef L_btowc
-/* emit only once */
-#warning fix preprocessor logic testing locale settings
-#endif
-#endif
-
#define ENCODING (__ctype_encoding_7_bit)
#ifdef __CTYPE_HAS_8_BIT_LOCALES
#error __CTYPE_HAS_8_BIT_LOCALES is defined!
@@ -313,10 +300,6 @@ size_t mbrtowc(wchar_t *__restrict pwc, const char *__restrict s,
}
#endif
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: This adds a trailing nul!
-#endif /* __UCLIBC_MJN3_ONLY__ */
-
r = mbsnrtowcs(wcbuf, &p, SIZE_MAX, 1, ps);
if (((ssize_t) r) >= 0) {
@@ -339,9 +322,6 @@ libc_hidden_def(mbrtowc)
size_t wcrtomb(register char *__restrict s, wchar_t wc,
mbstate_t *__restrict ps)
{
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Should wcsnrtombs nul-terminate unconditionally? Check glibc.
-#endif /* __UCLIBC_MJN3_ONLY__ */
wchar_t wcbuf[1];
const wchar_t *pwc;
size_t r;
@@ -473,9 +453,6 @@ size_t attribute_hidden _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
--n;
if ((wc = ((unsigned char) *s++)) >= 0x80) { /* Not ASCII... */
mask = 0x40;
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Fix range for 16 bit wchar_t case.
-#endif
if (( ((unsigned char)(s[-1] - 0xc0)) < (0xfe - 0xc0) ) &&
(((unsigned char)s[-1] != 0xc0 ) && ((unsigned char)s[-1] != 0xc1 ))) {
goto START;
@@ -910,12 +887,6 @@ libc_hidden_def(wcsnrtombs)
/**********************************************************************/
#ifdef L_wcswidth
-
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning REMINDER: If we start doing translit, wcwidth and wcswidth will need updating.
-#warning TODO: Update wcwidth to match latest by Kuhn.
-#endif
-
#if defined(__UCLIBC_HAS_LOCALE__) && \
( defined(__CTYPE_HAS_8_BIT_LOCALES) || defined(__CTYPE_HAS_UTF_8_LOCALES) )
@@ -1442,9 +1413,6 @@ size_t weak_function iconv(iconv_t cd, char **__restrict inbuf,
}
return (size_t)(-1);
}
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: optimize this.
-#endif
if (p != NULL) { /* incomplete char case */
goto INVALID;
}
@@ -1519,9 +1487,6 @@ size_t weak_function iconv(iconv_t cd, char **__restrict inbuf,
do {
r = _wchar_wcsntoutf8s(*outbuf, *outbytesleft, &pw, 1);
if (r != (size_t)(-1)) {
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: What happens for a nul?
-#endif
if (r == 0) {
if (wc != 0) {
goto TOO_BIG;
diff --git a/libc/misc/wctype/_wctype.c b/libc/misc/wctype/_wctype.c
index 68fae8b54..81076baf1 100644
--- a/libc/misc/wctype/_wctype.c
+++ b/libc/misc/wctype/_wctype.c
@@ -93,13 +93,6 @@ enum {
/*--------------------------------------------------------------------*/
-#ifdef __UCLIBC_MJN3_ONLY__
-# ifdef L_iswspace
-/* generates one warning */
-# warning TODO: Fix WC* defines!
-# endif
-#endif
-
#define ENCODING (__UCLIBC_CURLOCALE->encoding)
#define WCctype (__UCLIBC_CURLOCALE->tblwctype)
@@ -459,10 +452,6 @@ libc_hidden_def(wctype)
/**********************************************************************/
#ifdef L_wctype_l
-#ifdef __UCLIBC_MJN3_ONLY__
-# warning REMINDER: Currently wctype_l simply calls wctype.
-#endif
-
wctype_t wctype_l (const char *property, __locale_t locale)
{
return wctype(property);
@@ -485,12 +474,6 @@ wctype_t wctype_l (const char *property, __locale_t locale)
) \
)
-#ifdef __UCLIBC_MJN3_ONLY__
-# ifdef L_iswctype
-# warning CONSIDER: Change to bit shift? would need to sync with wctype.h
-# endif
-#endif
-
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
# if !defined(__UCLIBC_HAS_XLOCALE__) || defined(L_iswctype_l)
static const unsigned short int desc2flag[] = {
@@ -570,12 +553,6 @@ int iswctype(wint_t wc, wctype_t desc)
#else /* __LOCALE_C_ONLY */
-#ifdef __UCLIBC_MJN3_ONLY__
-# ifdef L_iswctype
-# warning CONSIDER: Handle combining class?
-# endif
-#endif
-
#ifdef L_iswctype
# define ISWCTYPE(w,d) iswctype(w,d)
#else
@@ -629,9 +606,6 @@ int ISWCTYPE(wint_t wc, wctype_t desc)
#endif
}
-#ifdef __UCLIBC_MJN3_ONLY__
-# warning TODO: xdigit really needs to be handled better. Remember only for ascii!
-#endif
/* TODO - Add locale-specific classifications. */
return (desc == _CTYPE_iswxdigit) ? __C_iswxdigit(wc) : 0;
}
@@ -741,9 +715,6 @@ wint_t TOWCTRANS(wint_t wc, wctrans_t desc)
}
wc += WCuplow_diff[i];
if (desc == _CTYPE_totitle) {
-#ifdef __UCLIBC_MJN3_ONLY__
-# warning TODO: Verify totitle special cases!
-#endif
/* WARNING! These special cases work for glibc 2.2.4. Changes
* may be needed if the glibc locale tables are updated. */
if ((__uwchar_t)(wc - 0x1c4) <= (0x1cc - 0x1c4)
@@ -781,9 +752,6 @@ wint_t TOWCTRANS(wint_t wc, wctrans_t desc)
if ((unsigned)(desc - _CTYPE_toupper) <= (_CTYPE_totitle - _CTYPE_toupper)) {
wc = TOWUPPER(wc, __UCLIBC_CURLOCALE);
if (desc == _CTYPE_totitle) {
-#ifdef __UCLIBC_MJN3_ONLY__
-# warning TODO: Verify totitle special cases!
-#endif
/* WARNING! These special cases work for glibc 2.2.4. Changes
* may be needed if the glibc locale tables are updated. */
if ((__uwchar_t)(wc - 0x1c4) <= (0x1cc - 0x1c4)
@@ -843,10 +811,6 @@ libc_hidden_def(wctrans)
/**********************************************************************/
#ifdef L_wctrans_l
-# ifdef __UCLIBC_MJN3_ONLY__
-# warning REMINDER: Currently wctrans_l simply calls wctrans.
-# endif
-
wctrans_t wctrans_l(const char *property, __locale_t locale)
{
return wctrans(property);