From 0c927f2b1b7ff547954a7a68fd44c7ce8ad65299 Mon Sep 17 00:00:00 2001 From: Jean-François Micouleau Date: Tue, 22 Jun 1999 18:42:10 +0000 Subject: Fixed most memory leak and big-endian bug in the spoolss code. Also added addform/setform rpc api calls. Now I can add/change forms from the server property dialog box. Jean Francois (This used to be commit 8d73f83b6c112327a51c0df2e96a1866deb13c3a) --- source3/printing/nt_printing.c | 89 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 76b9ee909d..0757d08b8c 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -87,11 +87,98 @@ int get_ntforms(nt_forms_struct **list) return(total); } +/**************************************************************************** +write a form struct list +****************************************************************************/ +int write_ntforms(nt_forms_struct **list, int number) +{ + FILE *f; + pstring line; + char *file = lp_nt_forms(); + int total=0; + int i; + + *line=0; + + DEBUG(6,("write_ntforms\n")); + + if((f = sys_fopen(file, "w")) == NULL) + { + DEBUG(1, ("cannot create forms file [%s]\n", file)); + return(0); + } + + for (i=0; i