diff --git a/C/threads.c b/C/threads.c index db64d6893..d8331ff9c 100644 --- a/C/threads.c +++ b/C/threads.c @@ -536,7 +536,7 @@ p_create_thread( USES_REGS1 ) setup_engine(new_worker_id, FALSE); if ((REMOTE_ThreadHandle(new_worker_id).ret = pthread_create(&REMOTE_ThreadHandle(new_worker_id).pthread_handle, NULL, thread_run, (void *)(&(REMOTE_ThreadHandle(new_worker_id).id)))) == 0) { pthread_setspecific(Yap_yaamregs_key, (const void *)REMOTE_ThreadHandle(owid).current_yaam_regs); - /* wait until the client is initialised */ + /* wait until the client is initialized */ return TRUE; } pthread_setspecific(Yap_yaamregs_key, (const void *)REMOTE_ThreadHandle(owid).current_yaam_regs); diff --git a/C/traced_absmi_insts.h b/C/traced_absmi_insts.h index d916bc35b..ea0113f23 100644 --- a/C/traced_absmi_insts.h +++ b/C/traced_absmi_insts.h @@ -5485,7 +5485,7 @@ S_SREG = RepAppl(d0); XREG(PREG->y_u.yx.x) = (CELL) pt0; PREG = NEXTOP(PREG, yx); #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - /* We must initialise a shared variable to point to the SBA */ + /* We must initialize a shared variable to point to the SBA */ if (Unsigned((Int)(pt0)-(Int)(H_FZ)) > Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { *pt0 = (CELL)STACK_TO_SBA(pt0); diff --git a/C/unify_absmi_insts.h b/C/unify_absmi_insts.h index a9dda4b04..4ca69ef76 100644 --- a/C/unify_absmi_insts.h +++ b/C/unify_absmi_insts.h @@ -3087,7 +3087,7 @@ XREG(PREG->y_u.yx.x) = (CELL) pt0; PREG = NEXTOP(PREG, yx); #if defined(YAPOR_SBA) && defined(FROZEN_STACKS) - /* We must initialise a shared variable to point to the SBA */ + /* We must initialize a shared variable to point to the SBA */ if (Unsigned((Int)(pt0)-(Int)(H_FZ)) > Unsigned((Int)(B_FZ)-(Int)(H_FZ))) { *pt0 = (CELL)STACK_TO_SBA(pt0); diff --git a/C/write.c b/C/write.c index 0180bff20..3aa1fdff3 100644 --- a/C/write.c +++ b/C/write.c @@ -341,7 +341,7 @@ static void wrputf(Float f, struct write_globs *wglb) /* writes a float */ } lastw = alphanum; // sprintf(s, "%.15g", f); - sprintf(s, RepAtom(AtomFloatFormat)->StrOfAE, f); + sprintf(s, floatFormat(), f); while (*pt == ' ') pt++; if (*pt == '-') { @@ -1123,7 +1123,8 @@ static void writeTerm(Term t, int p, int depth, int rinfixarg, wrputc(' ', wglb->stream); } if (!IsVarTerm(ti) && - (IsIntTerm(ti) || IsCodesTerm(ti) || IsAtomTerm(ti))) { + (IsIntTerm(ti) || IsCodesTerm(ti) || + IsAtomTerm(ti) || IsStringTerm(ti) )) { if (IsIntTerm(ti)) { Int k = IntOfTerm(ti); if (k == -1) { @@ -1141,6 +1142,8 @@ static void writeTerm(Term t, int p, int depth, int rinfixarg, } } else if (IsAtomTerm(ti)) { putAtom(AtomOfTerm(ti), FALSE, wglb); + } else if (IsStringTerm(ti)) { + putString(ti, wglb); } else { putUnquotedString(ti, wglb); } @@ -1230,7 +1233,7 @@ void Yap_plwrite(Term t, StreamDesc *mywrite, int max_depth, int flags, /* notice: we must have ASP well set when using portray, otherwise we cannot make recursive Prolog calls */ wglb.Keep_terms = (flags & (Use_portray_f | To_heap_f)); - /* initialise wglb */ + /* initialize wglb */ rwt.parent = NULL; wglb.Ignore_ops = flags & Ignore_ops_f; wglb.Write_strings = flags & BackQuote_String_f;