Some changes to migrate towards C++ and a multithreaded model

This commit is contained in:
ridiculousfish
2011-12-26 19:18:46 -08:00
parent 3f16ace678
commit 8d2f107d61
90 changed files with 7368 additions and 5981 deletions

View File

@@ -7,6 +7,7 @@
#include <wchar.h>
#include "env.h"
#include "util.h"
/**
@@ -56,7 +57,7 @@
/**
Internal value representing highlighting of an IO redirection
*/
#define HIGHLIGHT_REDIRECTION 0x800
#define HIGHLIGHT_REDIRECTION 0x800
/**
Internal value representing highlighting a potentially valid path
*/
@@ -68,11 +69,11 @@
for each character in buff.
\param buff The buffer on which to perform syntax highlighting
\param color The array in wchich to store the color codes. The first 8 bits are used for fg color, the next 8 bits for bg color.
\param color The array in wchich to store the color codes. The first 8 bits are used for fg color, the next 8 bits for bg color.
\param pos the cursor position. Used for quote matching, etc.
\param error a list in which a description of each error will be inserted. May be 0, in whcich case no error descriptions will be generated.
*/
void highlight_shell( wchar_t * buff, int *color, int pos, array_list_t *error );
void highlight_shell( const wchar_t *, int *, int, array_list_t *, const env_vars &vars );
/**
Perform syntax highlighting for the text in buff. Matching quotes and paranthesis are highlighted. The result is
@@ -80,17 +81,17 @@ void highlight_shell( wchar_t * buff, int *color, int pos, array_list_t *error )
for each character in buff.
\param buff The buffer on which to perform syntax highlighting
\param color The array in wchich to store the color codes. The first 8 bits are used for fg color, the next 8 bits for bg color.
\param color The array in wchich to store the color codes. The first 8 bits are used for fg color, the next 8 bits for bg color.
\param pos the cursor position. Used for quote matching, etc.
\param error a list in which a description of each error will be inserted. May be 0, in whcich case no error descriptions will be generated.
*/
void highlight_universal( wchar_t * buff, int *color, int pos, array_list_t *error );
void highlight_universal( const wchar_t *, int *, int, array_list_t *, const env_vars &vars );
/**
Translate from HIGHLIGHT_* to FISH_COLOR_* according to environment
variables. Defaults to FISH_COLOR_NORMAL.
Example:
Example:
If the environment variable FISH_FISH_COLOR_ERROR is set to 'red', a
call to highlight_get_color( HIGHLIGHT_ERROR) will return