From ee049ef614fc29d9e4ce0f9d55ba79e81488dd63 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 12 Mar 2005 00:50:47 +0000 Subject: r5760: Be more verbose on listing forms. Guenther (This used to be commit 0f25c35fb9a658f4593bc0ce47a9276e81233e65) --- source3/rpcclient/cmd_spoolss.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index fa77af4145..49f22b3654 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -1925,6 +1925,20 @@ static WERROR cmd_spoolss_deleteform(struct cli_state *cli, /* Enumerate forms */ +static const char *get_form_flag(int form_flag) +{ + switch (form_flag) { + case FORM_USER: + return "FORM_USER"; + case FORM_BUILTIN: + return "FORM_BUILTIN"; + case FORM_PRINTER: + return "FORM_PRINTER"; + default: + return "unknown"; + } +} + static WERROR cmd_spoolss_enum_forms(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, const char **argv) @@ -1980,7 +1994,14 @@ static WERROR cmd_spoolss_enum_forms(struct cli_state *cli, rpcstr_pull(form_name, forms[i].name.buffer, sizeof(form_name), -1, STR_TERMINATE); - printf("%s\n", form_name); + printf("%s\n" \ + "\tflag: %s (%d)\n" \ + "\twidth: %d, length: %d\n" \ + "\tleft: %d, right: %d, top: %d, bottom: %d\n\n", + form_name, get_form_flag(forms[i].flag), forms[i].flag, + forms[i].width, forms[i].length, + forms[i].left, forms[i].right, + forms[i].top, forms[i].bottom); } done: -- cgit