Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
(let (Str "Here am I" Len (format (opt))) # Get length from command line
|
||||
(unless (>= (size Str) Len) # Check buffer size
|
||||
(prinl Str) ) ) # Return string if OK
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
int Query(char *Data, size_t *Length) {
|
||||
FILE *fp;
|
||||
char buf[64];
|
||||
|
||||
sprintf(buf, "/usr/bin/picolisp query.l %d -bye", *Length);
|
||||
if (!(fp = popen(buf, "r")))
|
||||
return 0;
|
||||
fgets(Data, *Length, fp);
|
||||
*Length = strlen(Data);
|
||||
return pclose(fp) >= 0 && *Length != 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue