fix C major issues

- use delays to implement setup_call
- fix user_* flag
- error handling i CXX should b local
- fix mess on  how to call openQuert
- deter pt -> from a pointer to another one
- avoid text forms when you can use C: LOCLS to locals.h
- fux seto_call
- new gated call
- mem streams
This commit is contained in:
Vitor Santos Costa
2017-08-21 12:29:58 +01:00
parent f8f1d75ad6
commit 54234c7e1d
37 changed files with 1233 additions and 2579 deletions

View File

@@ -526,7 +526,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
// stream is already locked.
Yap_plwrite(t, GLOBAL_Stream + sno, 0, Handle_vars_f | To_heap_f,
GLOBAL_MaxPriority);
Yap_CloseSlots(sl);
Yap_CloseSlots(sl);
break;
case 'c': {
Int nch, i;
@@ -905,7 +905,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
fill_pads(sno, sno0, finfo.lstart + repeats, &finfo PASS_REGS);
break;
case 't': {
#if MAY_WRITE
#if MAY_WRITR
if (fflush(GLOBAL_Stream[sno].file) == 0) {
finfo.gap[finfo.gapi].phys = ftell(GLOBAL_Stream[sno].file);
}
@@ -1130,9 +1130,7 @@ static Int format(Term tf, Term tas, Term tout USES_REGS) {
UNLOCK(GLOBAL_Stream[output_stream].streamlock);
return false;
} else {
out = doformat(tf, tas, output_stream PASS_REGS);
UNLOCK(GLOBAL_Stream[output_stream].streamlock);
if (mem_stream) {