Write commant at beginning of .fishd file mentioning that the file should not be edited

darcs-hash:20060617140406-ac50b-c3987895fbc747212a70618acf8a18b42601e8a8.gz
This commit is contained in:
axel 2006-06-18 00:04:06 +10:00
parent c9e98c2eef
commit f836bd41c0

View file

@ -88,7 +88,9 @@ time the original barrier request was sent have been received.
/** /**
Small greeting to show that fishd is running Small greeting to show that fishd is running
*/ */
#define GREETING "#Fish universal variable daemon\n" #define GREETING "# Fish universal variable daemon\n"
#define SAVE_MSG "# This file is automatically generated by the fishd universal variable daemon.\n# Do NOT edit it directly, your changes will be overwritten.\n"
/** /**
The name of the save file. The hostname is appended to this. The name of the save file. The hostname is appended to this.
@ -426,7 +428,11 @@ void load_or_save( int save)
q_init( &c.unsent ); q_init( &c.unsent );
if( save ) if( save )
{
write( c.fd, SAVE_MSG, strlen(SAVE_MSG) );
enqueue_all( &c ); enqueue_all( &c );
}
else else
read_message( &c ); read_message( &c );