mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Minor error handling improvements and minor code polish
darcs-hash:20070801173801-ac50b-11a281d9f622e935c1f138355babd20269068f35.gz
This commit is contained in:
parent
df55e89bbb
commit
58fd6b895a
7 changed files with 10 additions and 19 deletions
|
@ -420,7 +420,7 @@ doc.h: $(HDR_FILES)
|
|||
#
|
||||
|
||||
%.gmo:
|
||||
if test $(HAVE_GETTEXT) = 1; then \
|
||||
if test "$(HAVE_GETTEXT)" = 1; then \
|
||||
msgfmt -o $*.gmo $*.po; \
|
||||
fi
|
||||
|
||||
|
|
|
@ -1394,7 +1394,6 @@ g++, javac, java, gcj, lpr, doxygen, whois)
|
|||
- History could reload itself when the file is updated. This would need to be done in a clever way to avoid chain reactions
|
||||
- The error function should probably be moved into it's own library, and be made mere general purpose.
|
||||
- The code validation functions should be moved from the parser to parse_util.
|
||||
- The parser_is_* functions should be moved to parse_util. Possibly, they should be made into a single function, i.e. parse_util_classify( "begin", BLOCK_COMMAND);
|
||||
- Try to remove more malloc calls to reduce memory usage. The time_t arrays used by the autoloader sound like a good candidate.
|
||||
- The code validator should warn about unknown commands.
|
||||
- Auto-newlines
|
||||
|
|
|
@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
|
||||
/** \file main.c
|
||||
The main loop of <tt>fish</tt>.
|
||||
The fish_indent proegram.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -26,22 +26,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "halloc.h"
|
||||
|
|
3
parser.c
3
parser.c
|
@ -2059,7 +2059,8 @@ static int parse_job( process_t *p,
|
|||
{
|
||||
debug( 0,
|
||||
_(L"Unknown command '%ls'"),
|
||||
cmd );
|
||||
cmd?cmd:L"UNKNOWN" );
|
||||
|
||||
}
|
||||
|
||||
tmp = current_tokenizer_pos;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** \file parser_keywords.c
|
||||
|
||||
|
||||
Functions having to do with parser keywords, like testing if a function is a block command.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -10,9 +10,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "fallback.h"
|
||||
//#include "util.h"
|
||||
|
||||
//#include "wutil.h"
|
||||
#include "common.h"
|
||||
#include "parser_keywords.h"
|
||||
|
||||
|
|
8
reader.c
8
reader.c
|
@ -2962,16 +2962,18 @@ static int read_ni( int fd, io_data_t *io )
|
|||
int c;
|
||||
|
||||
c = fread(buff, 1, 4096, in_stream);
|
||||
if( ferror( in_stream ) )
|
||||
|
||||
if( ferror( in_stream ) && ( errno != EINTR ) )
|
||||
{
|
||||
debug( 1,
|
||||
_( L"Error while reading commands" ) );
|
||||
|
||||
_( L"Error while reading from file descriptor" ) );
|
||||
|
||||
/*
|
||||
Reset buffer on error. We won't evaluate incomplete files.
|
||||
*/
|
||||
acc.used=0;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
b_append( &acc, buff, c );
|
||||
|
|
|
@ -22,7 +22,6 @@ segments.
|
|||
#include "wutil.h"
|
||||
#include "tokenizer.h"
|
||||
#include "common.h"
|
||||
#include "wildcard.h"
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue