|
Line 0
Link Here
|
|
|
1 |
--- alpine/arg.c.orig 2010-07-22 16:47:48.668603132 +0000 |
| 2 |
+++ alpine/arg.c 2010-07-22 16:56:39.038755763 +0000 |
| 3 |
@@ -839,8 +839,12 @@ |
| 4 |
exit(0); |
| 5 |
} |
| 6 |
|
| 7 |
- if(do_conf) |
| 8 |
- dump_global_conf(); |
| 9 |
+ if(do_conf) { |
| 10 |
+ if(pine_state->pconf) |
| 11 |
+ dump_global_conf(pine_state->pconf->name); |
| 12 |
+ else |
| 13 |
+ dump_global_conf(SYSTEM_PINERC); |
| 14 |
+ } |
| 15 |
|
| 16 |
if(pinerc_file) |
| 17 |
dump_new_pinerc(pinerc_file); |
| 18 |
--- pith/conf.c.orig 2010-07-22 16:45:34.449756882 +0000 |
| 19 |
+++ pith/conf.c 2010-07-22 17:06:36.641670938 +0000 |
| 20 |
@@ -6028,16 +6028,16 @@ |
| 21 |
|
| 22 |
/*------------------------------------------------------------ |
| 23 |
Dump out a global pine.conf on the standard output with fresh |
| 24 |
- comments. Preserves variables currently set in SYSTEM_PINERC, if any. |
| 25 |
+ comments. Preserves variables currently set in refPrc, if any. |
| 26 |
----*/ |
| 27 |
void |
| 28 |
-dump_global_conf(void) |
| 29 |
+dump_global_conf(char *refPrc) |
| 30 |
{ |
| 31 |
FILE *f; |
| 32 |
struct variable *var; |
| 33 |
PINERC_S *prc; |
| 34 |
|
| 35 |
- prc = new_pinerc_s(SYSTEM_PINERC); |
| 36 |
+ prc = new_pinerc_s(refPrc); |
| 37 |
read_pinerc(prc, variables, ParseGlobal); |
| 38 |
if(prc) |
| 39 |
free_pinerc_s(&prc); |
| 40 |
--- pith/conf.h.orig 2010-07-22 17:09:08.101585257 +0000 |
| 41 |
+++ pith/conf.h 2010-07-22 17:09:26.156839207 +0000 |
| 42 |
@@ -853,7 +853,7 @@ |
| 43 |
int write_pinerc(struct pine *, EditWhich, int); |
| 44 |
void quit_to_edit_msg(PINERC_S *); |
| 45 |
int var_in_pinerc(char *); |
| 46 |
-void dump_global_conf(void); |
| 47 |
+void dump_global_conf(char *); |
| 48 |
void dump_new_pinerc(char *); |
| 49 |
int set_variable(int, char *, int, int, EditWhich); |
| 50 |
int set_variable_list(int, char **, int, EditWhich); |
| 51 |
--- doc/alpine.1.orig 2008-08-22 20:40:16.000000000 +0000 |
| 52 |
+++ doc/alpine.1 2010-07-23 06:02:09.000000000 +0000 |
| 53 |
@@ -111,12 +111,13 @@ |
| 54 |
.I -f |
| 55 |
argument is applied to the first defined folder-collection. |
| 56 |
.IP \fB-conf\fR 20 |
| 57 |
-Produce a sample/fresh copy of the |
| 58 |
-system-wide configuration file, |
| 59 |
+Produce a copy of the system-wide configuration file, |
| 60 |
.I pine.conf, |
| 61 |
-on the standard output. This is distinct from the per-user |
| 62 |
+with fresh comments on the standard output. |
| 63 |
+This is distinct from the per-user |
| 64 |
.I .pinerc |
| 65 |
-file. |
| 66 |
+file and will preserve variables currently set in the default |
| 67 |
+system-wide configuration file (or the file specified with -P, if any). |
| 68 |
.IP \fB-convert_sigs\ \fI-p\ pinerc\fR 20 |
| 69 |
Convert signature files into literal signatures. |
| 70 |
.IP \fB-copy_abook\ <\fIlocal_abook\fR>\ <\fIremote_abook\fR> 20 |