summaryrefslogtreecommitdiff
path: root/source3/web/swat.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-03-19 12:20:11 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-04-14 12:53:56 +1000
commit3b3e21bd9ba701a97e752205263a7903619541c7 (patch)
tree3f0cdf8e4d5a550a323e73d229083d6329b3f236 /source3/web/swat.c
parent4786a493f70070dce6de4cbe488c9de1bdbb75ad (diff)
downloadsamba-3b3e21bd9ba701a97e752205263a7903619541c7.tar.gz
samba-3b3e21bd9ba701a97e752205263a7903619541c7.tar.bz2
samba-3b3e21bd9ba701a97e752205263a7903619541c7.zip
Convert Samba3 to use the common lib/util/charset API
This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett
Diffstat (limited to 'source3/web/swat.c')
-rw-r--r--source3/web/swat.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 4bfb731814..1d843a0f65 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -255,16 +255,16 @@ static void show_parameter(int snum, struct parm_struct *parm)
for (;*list;list++) {
/* enclose in HTML encoded quotes if the string contains a space */
if ( strchr_m(*list, ' ') ) {
- push_utf8_allocate(&utf8_s1, *list, &converted_size);
- push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":""), &converted_size);
+ push_utf8_talloc(talloc_tos(), &utf8_s1, *list, &converted_size);
+ push_utf8_talloc(talloc_tos(), &utf8_s2, ((*(list+1))?", ":""), &converted_size);
printf("&quot;%s&quot;%s", utf8_s1, utf8_s2);
} else {
- push_utf8_allocate(&utf8_s1, *list, &converted_size);
- push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":""), &converted_size);
+ push_utf8_talloc(talloc_tos(), &utf8_s1, *list, &converted_size);
+ push_utf8_talloc(talloc_tos(), &utf8_s2, ((*(list+1))?", ":""), &converted_size);
printf("%s%s", utf8_s1, utf8_s2);
}
- SAFE_FREE(utf8_s1);
- SAFE_FREE(utf8_s2);
+ TALLOC_FREE(utf8_s1);
+ TALLOC_FREE(utf8_s2);
}
}
printf("\">");
@@ -285,10 +285,10 @@ static void show_parameter(int snum, struct parm_struct *parm)
case P_STRING:
case P_USTRING:
- push_utf8_allocate(&utf8_s1, *(char **)ptr, &converted_size);
+ push_utf8_talloc(talloc_tos(), &utf8_s1, *(char **)ptr, &converted_size);
printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
make_parm_name(parm->label), fix_quotes(ctx, utf8_s1));
- SAFE_FREE(utf8_s1);
+ TALLOC_FREE(utf8_s1);
printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
_("Set Default"), make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue)));
break;
@@ -959,11 +959,11 @@ static void shares_page(void)
for (i=0;i<lp_numservices();i++) {
s = lp_servicename(i);
if (s && (*s) && strcmp(s,"IPC$") && !lp_print_ok(i)) {
- push_utf8_allocate(&utf8_s, s, &converted_size);
+ push_utf8_talloc(talloc_tos(), &utf8_s, s, &converted_size);
printf("<option %s value=\"%s\">%s\n",
(share && strcmp(share,s)==0)?"SELECTED":"",
utf8_s, utf8_s);
- SAFE_FREE(utf8_s);
+ TALLOC_FREE(utf8_s);
}
}
printf("</select></td>\n");