top: do not add an extra line when rewritting a rcfile
When the configuration file is first written, there is just the normal single newline which ends that rcfile. However, when any existing rcfile was rewritten, there was one extra newline '\n' character added at the end. This will happen just once. The file does NOT continue to grow with the extra blank lines always being added. Anyway, this patch will put an end to such a practice. [ along the way i fixed an unrelated whitespace oops ] Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
212de8cf8c
commit
255383a8cd
@ -5079,7 +5079,7 @@ static void write_rcfile (void) {
|
|||||||
fprintf(fp, Osel_delim_2_txt);
|
fprintf(fp, Osel_delim_2_txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Inspect.raw)
|
if (Inspect.raw && strcmp(Inspect.raw, "\n"))
|
||||||
fputs(Inspect.raw, fp);
|
fputs(Inspect.raw, fp);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
@ -509,7 +509,7 @@ typedef struct WIN_t {
|
|||||||
#define RCF_PLUS_H "\\]^_`abcdefghij"
|
#define RCF_PLUS_H "\\]^_`abcdefghij"
|
||||||
#define RCF_PLUS_J "klmnopqrstuvwxyz"
|
#define RCF_PLUS_J "klmnopqrstuvwxyz"
|
||||||
// this next guy must never, ever change
|
// this next guy must never, ever change
|
||||||
// ( we transition from'char' to 'int' )
|
// ( transitioned from 'char' to 'int' )
|
||||||
#define RCF_XFORMED_ID 'k'
|
#define RCF_XFORMED_ID 'k'
|
||||||
// this next guy is incremented when columns change
|
// this next guy is incremented when columns change
|
||||||
// ( to prevent older top versions from accessing )
|
// ( to prevent older top versions from accessing )
|
||||||
|
Loading…
Reference in New Issue
Block a user