summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-04 07:15:53 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-04 07:15:53 +0000
commit87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 (patch)
tree3c302f710cbaa03e3c0d46549e8982771b12b8a5 /source3/web
parent9e9e73303ec10a64bd744b9b33f4e6cd7d394f03 (diff)
downloadsamba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.tar.gz
samba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.tar.bz2
samba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.zip
The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/statuspage.c2
-rw-r--r--source3/web/swat.c27
2 files changed, 8 insertions, 21 deletions
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index f3b07425b7..2efc37a051 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -68,7 +68,7 @@ static void print_share_mode(share_mode_entry *e, char *fname)
printf("</td>");
printf("<td>%s</td><td>%s</td></tr>\n",
- dos_to_unix(fname,False),tstring(e->time.tv_sec));
+ fname,tstring(e->time.tv_sec));
}
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 8374cd445a..5dcfe3d658 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -354,13 +354,13 @@ static BOOL load_config(BOOL save_def)
/****************************************************************************
write a config file
****************************************************************************/
-static void write_config(FILE *f, BOOL show_defaults, char *(*dos_to_ext)(char *, BOOL))
+static void write_config(FILE *f, BOOL show_defaults)
{
fprintf(f, "# Samba config file created using SWAT\n");
fprintf(f, "# from %s (%s)\n", cgi_remote_host(), cgi_remote_addr());
fprintf(f, "# Date: %s\n\n", timestring(False));
- lp_dump(f, show_defaults, iNumNonAutoPrintServices, dos_to_ext);
+ lp_dump(f, show_defaults, iNumNonAutoPrintServices);
}
/****************************************************************************
@@ -383,9 +383,9 @@ static int save_reload(int snum)
fchmod(fileno(f), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
}
- write_config(f, False, _dos_to_unix);
+ write_config(f, False);
if (snum)
- lp_dump_one(f, False, snum, _dos_to_unix);
+ lp_dump_one(f, False, snum);
fclose(f);
lp_killunused(NULL);
@@ -408,10 +408,6 @@ static void commit_parameter(int snum, struct parm_struct *parm, char *v)
int i;
char *s;
- /* lp_do_parameter() will do unix_to_dos(v). */
- if(parm->flags & FLAG_DOS_STRING)
- dos_to_unix(v, True);
-
if (snum < 0 && parm->class == P_LOCAL) {
/* this handles the case where we are changing a local
variable globally. We need to change the parameter in
@@ -511,7 +507,7 @@ static void viewconfig_page(void)
}
printf("<p><pre>");
- write_config(stdout, full_view, _dos_to_dos);
+ write_config(stdout, full_view);
printf("</pre>");
printf("</form>\n");
}
@@ -591,12 +587,8 @@ static void shares_page(void)
}
if (cgi_variable("createshare") && (share=cgi_variable("newshare"))) {
- /* add_a_service() which is called by lp_copy_service()
- will do unix_to_dos() conversion, so we need dos_to_unix() before the lp_copy_service(). */
- pstring unix_share;
- pstrcpy(unix_share, dos_to_unix(share, False));
load_config(False);
- lp_copy_service(GLOBALS_SNUM, unix_share);
+ lp_copy_service(GLOBALS_SNUM, share);
iNumNonAutoPrintServices = lp_numservices();
save_reload(0);
snum = lp_servicenumber(share);
@@ -930,12 +922,8 @@ static void printers_page(void)
}
if (cgi_variable("createshare") && (share=cgi_variable("newshare"))) {
- /* add_a_service() which is called by lp_copy_service()
- will do unix_to_dos() conversion, so we need dos_to_unix() before the lp_copy_service(). */
- pstring unix_share;
- pstrcpy(unix_share, dos_to_unix(share, False));
load_config(False);
- lp_copy_service(GLOBALS_SNUM, unix_share);
+ lp_copy_service(GLOBALS_SNUM, share);
iNumNonAutoPrintServices = lp_numservices();
snum = lp_servicenumber(share);
lp_do_parameter(snum, "print ok", "Yes");
@@ -1047,7 +1035,6 @@ static void printers_page(void)
}
setup_logging(argv[0],False);
- charset_initialise();
load_config(True);
iNumNonAutoPrintServices = lp_numservices();
load_printers();