comparison src/c/urweb.c @ 694:7ea0df9e56b6

spawn
author Adam Chlipala <adamc@hcoop.net>
date Sat, 04 Apr 2009 14:55:36 -0400
parents 655bcc9b77e0
children 500e93aa436f
comparison
equal deleted inserted replaced
693:655bcc9b77e0 694:7ea0df9e56b6
699 ctx->script.start); 699 ctx->script.start);
700 return r; 700 return r;
701 } 701 }
702 } 702 }
703 703
704 const char *uw_Basis_get_settings(uw_context ctx, uw_Basis_string onload) { 704 const char *uw_Basis_get_settings(uw_context ctx, uw_unit u) {
705 if (ctx->client == NULL) 705 if (ctx->client == NULL)
706 return ""; 706 return "";
707 else { 707 else {
708 char *r = uw_malloc(ctx, 52 + 3 * INTS_MAX + strlen(ctx->url_prefix) + strlen(onload)); 708 char *r = uw_malloc(ctx, 59 + 3 * INTS_MAX + strlen(ctx->url_prefix));
709 sprintf(r, " onload='client_id=%u;client_pass=%d;url_prefix=\"%s\";timeout=%d;listener();%s'", 709 sprintf(r, "client_id=%u;client_pass=%d;url_prefix=\"%s\";timeout=%d;listener();",
710 ctx->client->id, 710 ctx->client->id,
711 ctx->client->pass, 711 ctx->client->pass,
712 ctx->url_prefix, 712 ctx->url_prefix,
713 ctx->timeout, 713 ctx->timeout);
714 onload);
715 return r; 714 return r;
716 } 715 }
717 } 716 }
718 717
719 uw_Basis_string uw_Basis_jsifyString(uw_context ctx, uw_Basis_string s) { 718 uw_Basis_string uw_Basis_jsifyString(uw_context ctx, uw_Basis_string s) {