+1999-11-05 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/unix/sysv/linux/bits/resource.h (RLIM_INFINITY): Adjust
+ for kernel changes.
+ * sysdeps/unix/sysv/linux/bits/types.h (__rlim_t, __rlim64_t): Make
+ unsigned.
+
+1999-10-04 Tim Waugh <twaugh@redhat.com>
+
+ * posix/wordexp-test.c: More tests.
+
+ * posix/wordexp.c (wordexp): Explicit null words should be kept.
+
+1999-11-04 Shinya Hanataka <hanataka@abyss.rim.or.jp>
+
+ * locale/programs/linereader.c (get_string): Correct type of buf2
+ variable.
+ * locale/programs/ld-ctype.c (ctype_output): Store index correctly
+ for _NL_CTYPE_INDIGITS_MB_LEN, _NL_CTYPE_INDIGITS_WC_LEN,
+ _NL_CTYPE_INDIGITS*_MB, _NL_CTYPE_OUTDIGIT*_MB, and
+ _NL_CTYPE_OUTDIGIT*_WC.
+ (allocate_arrays): Completely initialize mapping tables.
+ * locale/programs/ld-time.c (time_startup): We need the wide car
+ string.
+ (time_finish): Correct handling of era.
+ (time_output): Fix a few array indeces.
+ (time_read): Pass the repertoire map to lr_token.
+
1999-11-03 Ulrich Drepper <drepper@cygnus.com>
* Versions.def: Add version for libthread_db.
iov[2 + elem + offset].iov_len = sizeof (uint32_t);
*(uint32_t *) iov[2 + elem + offset].iov_base =
ctype->mbdigits_act / 10;
+ idx[elem + 1] = idx[elem] + sizeof (uint32_t);
break;
case _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS_WC_LEN):
iov[2 + elem + offset].iov_len = sizeof (uint32_t);
*(uint32_t *) iov[2 + elem + offset].iov_base =
ctype->wcdigits_act / 10;
+ idx[elem + 1] = idx[elem] + sizeof (uint32_t);
break;
case _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS0_MB) ... _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS9_MB):
ctype->mbdigits[cnt]->nbytes);
*cp++ = '\0';
}
+ idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len;
break;
case _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT0_MB) ... _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT9_MB):
*(char *) mempcpy (iov[2 + elem + offset].iov_base,
ctype->mbdigits[cnt]->bytes,
ctype->mbdigits[cnt]->nbytes) = '\0';
+ idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len;
break;
case _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS0_WC) ... _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS9_WC):
cnt < ctype->wcdigits_act; cnt += 10)
((uint32_t *) iov[2 + elem + offset].iov_base)[cnt / 10]
= ctype->wcdigits[cnt];
+ idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len;
break;
case _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT0_WC) ... _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT9_WC):
cnt = elem - _NL_CTYPE_OUTDIGIT0_WC;
iov[2 + elem + offset].iov_base = &ctype->wcoutdigits[cnt];
iov[2 + elem + offset].iov_len = sizeof (uint32_t);
+ idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len;
break;
default:
/* EOF must map to EOF. */
ctype->map[idx][127] = EOF;
+
+ /* The 32 bit map collection. */
+ for (idx2 = 0; idx2 < ctype->map_collection_act[idx]; ++idx2)
+ if (ctype->map_collection[idx][idx2] != 0)
+ ctype->map[idx][128 + ctype->charnames[idx2]]
+ = ctype->map_collection[idx][idx2];
}
/* Extra array for class and map names. */
}
/* Next we allocate an array large enough and fill in the values. */
- sorted = alloca (number * sizeof (struct translit_t **));
+ sorted = (struct translit_t **) alloca (number
+ * sizeof (struct translit_t **));
runp = ctype->translit;
number = 0;
do
if (time != NULL)
{
lr->translate_strings = 1;
- lr->return_widestr = 0;
+ lr->return_widestr = 1;
}
}
}
/* Now generate the wide character name and format. */
- wstr = wcschr ((wchar_t *) time->wera, L':'); /* end direction */
- wstr = wstr ? wcschr (wstr, L':') : NULL; /* end offset */
- wstr = wstr ? wcschr (wstr, L':') : NULL; /* end start */
- wstr = wstr ? wcschr (wstr, L':') : NULL; /* end end */
+ wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */
+ wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */
+ wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */
+ wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */
time->era_entries[idx].wname = (uint32_t *) wstr;
- wstr = wstr ? wcschr (wstr, L':') : NULL; /* end name */
+ wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end name */
time->era_entries[idx].wformat = (uint32_t *) wstr;
}
}
assert (idx[1 + last_idx] % 4 == 0);
iov[2 + cnt].iov_base = (void *) time->era_entries[num].wname;
- iov[2 + cnt].iov_len = ((wcschr ((wchar_t *) time->era_entries[cnt].wformat, L'\0')
+ iov[2 + cnt].iov_len = ((wcschr ((wchar_t *) time->era_entries[num].wformat, L'\0')
- (wchar_t *) time->era_entries[num].wname + 1)
* sizeof (uint32_t));
- ++cnt;
-
idx[1 + last_idx] += iov[2 + cnt].iov_len;
+ ++cnt;
}
++last_idx;
do
{
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
nowtok = now->tok;
}
while (nowtok == tok_eol);
/* Ingore empty lines. */
if (nowtok == tok_eol)
{
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
nowtok = now->tok;
continue;
}
} \
\
/* Match the semicolon. */ \
- now = lr_token (ldfile, charmap, NULL); \
+ now = lr_token (ldfile, charmap, repertoire); \
if (now->tok != tok_semicolon && now->tok != tok_eol) \
break; \
} \
\
if (now->tok == tok_semicolon) \
{ \
- now = lr_token (ldfile, charmap, NULL); \
+ now = lr_token (ldfile, charmap, repertoire); \
if (now->tok == tok_eol) \
lr_error (ldfile, _("extra trailing semicolon")); \
else if (now->tok == tok_string) \
lr_ignore_rest (ldfile, 0);
break;
}
-
do
{
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
if (now->tok != tok_string)
goto err_label;
if (!ignore_content && (now->val.str.startmb == NULL
lr_ignore_rest (ldfile, 0);
break;
}
-
if (!ignore_content)
{
time->era = xrealloc (time->era,
* sizeof (char *));
time->wera[time->num_era++] = now->val.str.startwc;
}
-
- now = lr_token (ldfile, charmap, NULL);
- if (now->tok != tok_eof && now->tok != tok_semicolon)
+ now = lr_token (ldfile, charmap, repertoire);
+ if (now->tok != tok_eol && now->tok != tok_semicolon)
goto err_label;
}
while (now->tok == tok_semicolon);
break; \
} \
\
- now = lr_token (ldfile, charmap, NULL); \
+ now = lr_token (ldfile, charmap, repertoire); \
if (now->tok != tok_string) \
goto err_label; \
else if (time->cat != NULL) \
break; \
} \
\
- now = lr_token (ldfile, charmap, NULL); \
+ now = lr_token (ldfile, charmap, repertoire); \
if (now->tok != tok_number) \
goto err_label; \
else if (time->cat != 0) \
break;
}
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
if (now->tok != tok_number)
goto err_label;
time->week_ndays = now->val.num;
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
if (now->tok != tok_semicolon)
goto err_label;
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
if (now->tok != tok_number)
goto err_label;
time->week_1stday = now->val.num;
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
if (now->tok != tok_semicolon)
goto err_label;
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
if (now->tok != tok_number)
goto err_label;
time->week_1stweek = now->val.num;
case tok_end:
/* Next we assume `LC_TIME'. */
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
if (now->tok == tok_eof)
break;
if (now->tok == tok_eol)
}
/* Prepare for the next round. */
- now = lr_token (ldfile, charmap, NULL);
+ now = lr_token (ldfile, charmap, repertoire);
nowtok = now->tok;
}
{
int return_widestr = lr->return_widestr;
char *buf;
- char *buf2 = NULL;
+ wchar_t *buf2 = NULL;
size_t bufact;
size_t bufmax = 56;
{ 0, "foo", "\"$var\"\"$var\"", 0, 1, { "foofoo", }, IFS },
{ 0, NULL, "'singly-quoted'", 0, 1, { "singly-quoted", }, IFS },
{ 0, NULL, "contin\\\nuation", 0, 1, { "continuation", }, IFS },
+ { 0, NULL, "explicit ''", 0, 2, { "explicit", "", }, IFS },
+ { 0, NULL, "explicit \"\"", 0, 2, { "explicit", "", }, IFS },
+ { 0, NULL, "explicit ``", 0, 1, { "explicit", }, IFS },
/* Simple command substitution */
{ 0, NULL, "$(echo hello)", 0, 1, { "hello", }, IFS },
if (testit (&test_case[test]))
++fail;
+ /* Tilde-expansion tests. */
pw = getpwnam ("root");
if (pw != NULL)
{
if (testit (&ts))
++fail;
+
+ ts.retval = 0;
+ ts.env = pw->pw_dir;
+ ts.words = "${var#~root}x";
+ ts.flags = 0;
+ ts.wordc = 1;
+ ts.wordv[0] = "x";
+ ts.ifs = IFS;
+
+ if (testit (&ts))
+ ++fail;
}
puts ("tests completed, now cleaning up");
if (error)
goto do_error;
+ if (!word_length)
+ {
+ error = w_addword (pwordexp, NULL);
+
+ if (error)
+ return error;
+ }
+
break;
case '\'':
if (error)
goto do_error;
+ if (!word_length)
+ {
+ error = w_addword (pwordexp, NULL);
+
+ if (error)
+ return error;
+ }
+
break;
case '~':
/* Bit values & structures for resource limits. Linux version.
- Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Value to indicate that there is no limit. */
#ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((long int)(~0UL >> 1))
+# define RLIM_INFINITY ((unsigned long int)(~0UL))
#else
-# define RLIM_INFINITY 0x7fffffffffffffffLL
+# define RLIM_INFINITY 0xffffffffffffffffuLL
#endif
#ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0x7fffffffffffffffLL
+# define RLIM64_INFINITY 0xffffffffffffffffuLL
#endif
/* We can represent all limits. */
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
typedef int __pid_t; /* Type of process identifications. */
typedef int __ssize_t; /* Type of a byte count, or error. */
-typedef long int __rlim_t; /* Type of resource counts. */
-typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */
+typedef __u_long __rlim_t; /* Type of resource counts. */
+typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */
typedef __u_int __id_t; /* General type for ID. */
typedef struct