Mercurial > urweb
comparison src/c/urweb.c @ 927:d136bc34e4ca
Debugging new string urlification
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 12 Sep 2009 10:31:34 -0400 |
parents | 552c989c1601 |
children | 38a376dc7401 |
comparison
equal
deleted
inserted
replaced
925:552c989c1601 | 927:d136bc34e4ca |
---|---|
1623 uw_Basis_time uw_Basis_unurlifyTime(uw_context ctx, char **s) { | 1623 uw_Basis_time uw_Basis_unurlifyTime(uw_context ctx, char **s) { |
1624 return uw_Basis_unurlifyInt(ctx, s); | 1624 return uw_Basis_unurlifyInt(ctx, s); |
1625 } | 1625 } |
1626 | 1626 |
1627 static uw_Basis_string uw_unurlifyString_to(uw_context ctx, char *r, char *s) { | 1627 static uw_Basis_string uw_unurlifyString_to(uw_context ctx, char *r, char *s) { |
1628 char *s1, *s2; | 1628 char *s1, *s2 = s; |
1629 int n; | 1629 int n; |
1630 | 1630 |
1631 if (*s2 == '_') | 1631 if (*s2 == '_') |
1632 ++s2; | 1632 ++s2; |
1633 else if (s2[0] == '%' && s2[1] == '5' && (s2[2] == 'f' || s2[2] == 'F')) | 1633 else if (s2[0] == '%' && s2[1] == '5' && (s2[2] == 'f' || s2[2] == 'F')) |
1634 s2 += 3; | 1634 s2 += 3; |
1635 | 1635 |
1636 for (s1 = r, s2 = s; *s2; ++s1, ++s2) { | 1636 for (s1 = r; *s2; ++s1, ++s2) { |
1637 char c = *s2; | 1637 char c = *s2; |
1638 | 1638 |
1639 switch (c) { | 1639 switch (c) { |
1640 case '+': | 1640 case '+': |
1641 *s1 = ' '; | 1641 *s1 = ' '; |