Merged PR from Lama

This commit is contained in:
Dmitry Boulytchev 2021-10-31 15:34:34 +03:00
parent 594fa7bf8f
commit eb098a6fac
6 changed files with 18 additions and 1 deletions

Binary file not shown.

View file

@ -54,3 +54,5 @@ F,kindOf;
F,compareTags;
F,flatCompare;
F,tagHash;
F,uppercase;
F,lowercase;

View file

@ -566,6 +566,16 @@ static void stringcat (void *p) {
}
}
extern int Luppercase (void *v) {
ASSERT_UNBOXED("Luppercase:1", v);
return BOX(toupper ((int) UNBOX(v)));
}
extern int Llowercase (void *v) {
ASSERT_UNBOXED("Llowercase:1", v);
return BOX(tolower ((int) UNBOX(v)));
}
extern int LmatchSubString (char *subj, char *patt, int pos) {
data *p = TO_DATA(patt), *s = TO_DATA(subj);
int n;

View file

@ -12,6 +12,7 @@
# include <regex.h>
# include <time.h>
# include <limits.h>
# include <ctype.h>
# define WORD_SIZE (CHAR_BIT * sizeof(int))

View file

@ -12,6 +12,10 @@ is added implicitly by the compiler and can not be specified by an end user.
The following declarations are accessible:
\descr{\lstinline|fun uppercase (n)|}{Convert \lstinline|n|, treated as ASCII code, into the code of the same symbol in upper case.}
\descr{\lstinline|fun lowercase (n)|}{Convert \lstinline|n|, treated as ASCII code, into the code of the same symbol in lower case.}
\descr{\lstinline|fun assert (n, s, ...)|}{Asserts that \lstinline|n| is non-zero; otherwise raises \lstinline|failure| with
a corresponding error message.}

View file

@ -1 +1 @@
let version = "Version 1.10, 4d56ccc06, Sun Oct 3 17:10:21 2021 +0300"
let version = "Version 1.10, 594fa7bf8, Sat Oct 30 19:24:25 2021 +0300"