aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/spadint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hyper/spadint.c')
-rw-r--r--src/hyper/spadint.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/hyper/spadint.c b/src/hyper/spadint.c
index aa381ba0..df2cd526 100644
--- a/src/hyper/spadint.c
+++ b/src/hyper/spadint.c
@@ -137,7 +137,7 @@ static void
send_pile(openaxiom_sio *sock,char * str)
{
FILE *f;
- char name[512], command[512];
+ char name[512], command[532];
sprintf(name, "/tmp/hyper%s.input", oa_getenv("SPADNUM"));
f = fopen(name, "w");
@@ -218,7 +218,7 @@ start_user_buffer(HyperDocPage *page)
SPAD = (char *) oa_getenv("AXIOM");
if (SPAD == NULL) {
- sprintf(SPAD, "/spad/mnt/rios");
+ SPAD = "/spad/mnt/rios";
}
sprintf(spadbuf, "%s/lib/spadbuf", SPAD);
sprintf(complfile, "%s/lib/command.list", SPAD);
@@ -542,16 +542,18 @@ print_to_string1(TextNode *command,int * sizeBuf)
case openaxiom_StringValue_token:
item = return_item(node->data.text);
if (item != NULL) {
- if (node->space)
+ if (node->space) {
storeChar(' ');
+ }
curr_line = item->lines;
while (curr_line != NULL) {
for (lcount = 0, s = curr_line->buffer; *s && lcount < item->size;
s++, lcount++) {
storeChar(funnyUnescape(*s));
}
- if (curr_line->len <= item->size && curr_line->next)
+ if (curr_line->len <= item->size && curr_line->next) {
storeChar('\n');
+ }
curr_line = curr_line->next;
}
}
@@ -1032,8 +1034,9 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
s++, lcount++) {
storeChar(funnyUnescape(*s));
}
- if (curr_line->len <= item->size && curr_line->next)
+ if (curr_line->len <= item->size && curr_line->next) {
storeChar('\n');
+ }
curr_line = curr_line->next;
}
}