aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc_src/doc.hdr3
-rw-r--r--env.c10
-rw-r--r--output.h2
-rw-r--r--reader.c3
-rw-r--r--signal.c2
-rw-r--r--tokenizer.c10
-rw-r--r--util.c2
-rw-r--r--util.h15
8 files changed, 28 insertions, 19 deletions
diff --git a/doc_src/doc.hdr b/doc_src/doc.hdr
index 77369068..c74e94f8 100644
--- a/doc_src/doc.hdr
+++ b/doc_src/doc.hdr
@@ -1298,7 +1298,8 @@ g++, javac, java, gcj, lpr, doxygen, whois, find)
- Suspending and then resuming pipelines containing a builtin is broken. How should this be handled?
- line wrapping issues on xterm
- The search token is invisible on long commandlines
-- Remove --indicator-style=classify from ls function (or use something to detect whether the function is used interactively or not)
+- xdg stuff expects posix functionality, e.g. strdup
+- Reading long history file takes way too much time
If you think you have found a bug not described here, please send a
report to <a href="mailto:axel@liljencrantz.se"> axel@liljencrantz.se
diff --git a/env.c b/env.c
index 8a7d2459..ce9b1fc1 100644
--- a/env.c
+++ b/env.c
@@ -693,7 +693,7 @@ int env_set( const wchar_t *key,
env_universal_set( key, val, export );
is_universal = 1;
-
+
}
else
{
@@ -721,6 +721,7 @@ int env_set( const wchar_t *key,
(var_mode & ENV_GLOBAL) )
{
node = ( var_mode & ENV_GLOBAL )?global_env:top;
+
}
else
{
@@ -946,7 +947,7 @@ wchar_t *env_get( const wchar_t *key )
wchar_t *item;
CHECK( key, 0 );
-
+
if( wcscmp( key, L"history" ) == 0 )
{
wchar_t *current;
@@ -966,10 +967,6 @@ wchar_t *env_get( const wchar_t *key )
wchar_t *next = history_get( i-add_current );
if( !next )
{
- /*
- This is not an error - it simply means the user has
- a short history
- */
break;
}
@@ -977,6 +974,7 @@ wchar_t *env_get( const wchar_t *key )
sb_append( &dyn_var, ARRAY_SEP_STR );
sb_append( &dyn_var, next );
}
+
return (wchar_t *)dyn_var.buff;
}
else if( wcscmp( key, L"COLUMNS" )==0 )
diff --git a/output.h b/output.h
index 8669da7e..8a663cd6 100644
--- a/output.h
+++ b/output.h
@@ -82,7 +82,7 @@ void set_color( int c, int c2 );
int writembs( char *str );
/**
- Write a wide character to fd 1.
+ Write a wide character using the output method specified using output_set_writer().
*/
int writech( wint_t ch );
diff --git a/reader.c b/reader.c
index 8456ec07..f3bca334 100644
--- a/reader.c
+++ b/reader.c
@@ -135,7 +135,7 @@ commence.
typedef struct reader_data
{
/**
- Buffer containing the current commandline
+ Buffer containing the whole current commandline
*/
wchar_t *buff;
@@ -153,6 +153,7 @@ typedef struct reader_data
Buffer containing the current search item
*/
wchar_t *search_buff;
+
/**
Saved position used by token history search
*/
diff --git a/signal.c b/signal.c
index 46cc3858..18fc3eec 100644
--- a/signal.c
+++ b/signal.c
@@ -543,7 +543,7 @@ void signal_set_handlers()
Interactive mode. Ignore interactive signals. We are a
shell, we know whats best for the user. ;-)
*/
-
+
act.sa_handler=SIG_IGN;
sigaction( SIGINT, &act, 0);
diff --git a/tokenizer.c b/tokenizer.c
index d2b18e2c..9be49c72 100644
--- a/tokenizer.c
+++ b/tokenizer.c
@@ -1,9 +1,9 @@
/** \file tokenizer.c
- A specialized tokenizer for tokenizing the fish language. In the
- future, the tokenizer should be extended to support marks,
- tokenizing multiple strings and disposing of unused string
- segments.
+A specialized tokenizer for tokenizing the fish language. In the
+future, the tokenizer should be extended to support marks,
+tokenizing multiple strings and disposing of unused string
+segments.
*/
#include "config.h"
@@ -46,7 +46,7 @@
#define PIPE_ERROR _( L"Can not use fd 0 as pipe output" )
/**
- Characters that separate tokens. They are ordered by frequency of occurrence to increase parsing speed.
+ Characters that separate tokens. They are ordered by frequency of occurrence to increase parsing speed.
*/
#define SEP L" \n|\t;#\r<>^&"
diff --git a/util.c b/util.c
index b9f18888..7c938bf3 100644
--- a/util.c
+++ b/util.c
@@ -21,7 +21,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
-
+#include <assert.h>
#include "fallback.h"
#include "util.h"
diff --git a/util.h b/util.h
index 9423e0c4..01cb8b91 100644
--- a/util.h
+++ b/util.h
@@ -109,7 +109,9 @@ priority_queue_t;
*/
typedef struct array_list
{
- /** Array containing the data */
+ /**
+ Array containing the data
+ */
anything_t *arr;
/** Position to append elements at*/
int pos;
@@ -517,8 +519,8 @@ void al_foreach( array_list_t *l, void (*func)( void * ));
void al_foreach2( array_list_t *l, void (*func)( void *, void *), void *aux);
/**
- Compares two wide character strings without case but with
- a logical ordering for numbers.
+ Compares two wide character strings with an (arguably) intuitive
+ ordering.
This function tries to order strings in a way which is intuitive to
humans with regards to sorting strings containing numbers.
@@ -542,6 +544,13 @@ void al_foreach2( array_list_t *l, void (*func)( void *, void *), void *aux);
This won't return the optimum results for numbers in bases higher
than ten, such as hexadecimal, but at least a stable sort order
will result.
+
+ This function performs a two-tiered sort, where difference in case
+ and in number of leading zeroes in numbers only have effect if no
+ other differences between strings are found. This way, a 'file1'
+ and 'File1' will not be considered identical, and hence their
+ internal sort order is not arbitrary, but the names 'file1',
+ 'File2' and 'file3' will still be sorted in the order given above.
*/
int wcsfilecmp( const wchar_t *a, const wchar_t *b );