comparison src/c/urweb.c @ 1880:0354df1b6849

Remove uw_cutErrorLocation() hijinks
author Adam Chlipala <adam@chlipala.net>
date Thu, 10 Oct 2013 18:31:10 -0400
parents 22b44fe822bf
children 52e88e139b25
comparison
equal deleted inserted replaced
1879:c1ee5dec9cff 1880:0354df1b6849
4101 4101
4102 void uw_mayReturnIndirectly(uw_context ctx) { 4102 void uw_mayReturnIndirectly(uw_context ctx) {
4103 ctx->allowed_to_return_indirectly = 1; 4103 ctx->allowed_to_return_indirectly = 1;
4104 } 4104 }
4105 4105
4106 void uw_cutErrorLocation(char *s) {
4107 char *s2;
4108
4109 s2 = strstr(s, ": ");
4110 if (s2 == NULL || strcspn(s, "<&") < s2 - s)
4111 return;
4112
4113 memmove(s, s2+2, strlen(s2+2)+1);
4114 }
4115
4116 uw_Basis_string uw_Basis_fresh(uw_context ctx) { 4106 uw_Basis_string uw_Basis_fresh(uw_context ctx) {
4117 int len; 4107 int len;
4118 char *r; 4108 char *r;
4119 4109
4120 uw_check_heap(ctx, 2+INTS_MAX); 4110 uw_check_heap(ctx, 2+INTS_MAX);