cvs commit: ALFS/nALFS/src nalfs.c

neven at linuxfromscratch.org neven at linuxfromscratch.org
Sat Nov 1 09:46:35 PST 2003


neven       03/11/01 10:46:35

  Modified:    nALFS/src nalfs.c
  Log:
  Printing of warning added, when executing editor fails.
  
  Revision  Changes    Path
  1.29      +9 -3      ALFS/nALFS/src/nalfs.c
  
  Index: nalfs.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/nalfs.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- nalfs.c	31 Oct 2003 01:51:20 -0000	1.28
  +++ nalfs.c	1 Nov 2003 17:46:35 -0000	1.29
  @@ -951,6 +951,7 @@
   
   static INLINE void run_editor(const char *filename)
   {
  +	int i;
   	const char *editor;
   	char *command;
   
  @@ -971,12 +972,17 @@
   	append_str(&command, " ");
   	append_str(&command, filename);
   
  -	system(command);
  -
  -	xfree(command);
  +	i = system(command);
   
   	refresh();
   	keypad(windows.main->name, 1);
  +
  +	if (i != 0) {
  +		Nprint_warn("Executing: %s", command);
  +		Nprint_warn("returned non-zero value.");
  +	}
  +
  +	xfree(command);
   }
   
   /*
  
  
  



More information about the alfs-log mailing list