Skip to content

Commit

Permalink
Add header guards to the header files.
Browse files Browse the repository at this point in the history
darcs-hash:20051004151139-35ec8-7af69b9d7647d145dc621f7eaea726e729cff554.gz
  • Loading branch information
jamessan committed Oct 4, 2005
1 parent c361d85 commit e27664b
Show file tree
Hide file tree
Showing 27 changed files with 191 additions and 14 deletions.
8 changes: 8 additions & 0 deletions builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Prototypes for functions for executing builtin functions.
*/

#ifndef FISH_BUILTIN_H
#define FISH_BUILTIN_H

#include <wchar.h>

#include "util.h"

enum
{
Expand Down Expand Up @@ -99,3 +105,5 @@ void builtin_print_help( wchar_t *cmd, string_buffer_t *b );

int builtin_set(wchar_t **argv);
int builtin_commandline(wchar_t **argv);

#endif
7 changes: 7 additions & 0 deletions builtin_help.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
corresponding .c file is automatically generated by combining the
builtin_help.hdr file with doxygen output.
*/

#ifndef FISH_BUILTIN_HELP_H
#define FISH_BUILTIN_HELP_H

#include <wchar.h>

/**
Return the help text for the specified builtin command. Use
non-wide characters since wide characters have some issues with
Expand All @@ -23,3 +29,4 @@ void builtin_help_init();
*/
void builtin_help_destroy();

#endif
9 changes: 9 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Prototypes for various functions, mostly string utilities, that are used by most parts of fish.
*/

#ifndef FISH_COMMON_H
#define FISH_COMMON_H

#include <wchar.h>
#include <termios.h>

#include "util.h"

/**
Under curses, tputs expects an int (*func)(char) as its last parameter, but in ncurses, tputs expects a int (*func)(int) as its last parameter. tputs_arg_t is defined to always be what tputs expects. Hopefully.
Expand Down Expand Up @@ -247,4 +254,6 @@ wchar_t *unescape( wchar_t * in, int escape_special );
void block();
void unblock();

#endif

int acquire_lock_file( const char *lockfile, const int timeout, int force );
9 changes: 9 additions & 0 deletions complete.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
These functions are used for storing and retrieving tab-completion data, as well as for performing tab-completion.
*/

#ifndef FISH_COMPLETE_H
#define FISH_COMPLETE_H

#include <wchar.h>

#include "util.h"

/** Use all completions */
#define SHARED 0
/** Do not use file completion */
Expand Down Expand Up @@ -153,3 +160,5 @@ int complete_is_valid_argument( const wchar_t *str,
\param reload should the commands completions be reloaded, even if they where previously loaded. (This is set to true on actual completions, so that changed completion are updated in running shells)
*/
void complete_load( wchar_t *cmd, int reload );

#endif
9 changes: 9 additions & 0 deletions env.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Prototypes for functions for setting and getting environment variables.
*/

#ifndef FISH_ENV_H
#define FISH_ENV_H

#include <wchar.h>

#include "util.h"

/**
Flag for local (to the current block) variable
*/
Expand Down Expand Up @@ -102,3 +109,5 @@ char **env_export_arr( int recalc );
*/
void env_get_names( array_list_t *l, int flags );

#endif
6 changes: 4 additions & 2 deletions env_universal.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
Universal variable client library
*/

#ifndef ENV_UNIVERSAL_HH
#define ENV_UNIVERSAL_HH
#ifndef ENV_UNIVERSAL_H
#define ENV_UNIVERSAL_H

#include <wchar.h>

#include "env_universal_common.h"

Expand Down
7 changes: 5 additions & 2 deletions env_universal_common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef ENV_UNIVERSAL_COMMON_HH
#define ENV_UNIVERSAL_COMMON_HH
#ifndef FISH_ENV_UNIVERSAL_COMMON_H
#define FISH_ENV_UNIVERSAL_COMMON_H

#include <wchar.h>

#include "util.h"

/**
The set command
Expand Down
10 changes: 10 additions & 0 deletions exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Prototypes for functions for executing a program
*/

#ifndef FISH_EXEC_H
#define FISH_EXEC_H

#include <wchar.h>

#include "proc.h"
#include "util.h"

/**
Initialize the exec library
*/
Expand Down Expand Up @@ -63,3 +71,5 @@ io_data_t *exec_make_io_buffer();
Close writing end of IO_BUFFER type io redirection, and fully read the reading end.
*/
void exec_read_io_buffer( io_data_t *d );

#endif
8 changes: 8 additions & 0 deletions expand.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
*/

#ifndef FISH_EXPAND_H
#define FISH_EXPAND_H

#include <wchar.h>

#include "util.h"

/**
Flag specifying that subshell expantion should be skipped
*/
Expand Down Expand Up @@ -168,3 +175,4 @@ wchar_t *expand_backslash( wchar_t * in, int escape_special );
*/
void expand_variable_array( const wchar_t *val, array_list_t *out );

#endif
9 changes: 8 additions & 1 deletion function.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
parser and to some degree the builtin handling library.
*/

#ifndef FISH_FUNCTION_H
#define FISH_FUNCTION_H

#include <wchar.h>

#include "util.h"

/**
Initialize function data
*/
Expand Down Expand Up @@ -61,4 +68,4 @@ int function_exists( const wchar_t *name);
void function_get_names( array_list_t *list,
int get_hidden );


#endif
9 changes: 9 additions & 0 deletions highlight.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Prototypes for functions for syntax highlighting
*/

#ifndef FISH_HIGHLIGHT_H
#define FISH_HIGHLIGHT_H

#include <wchar.h>

#include "util.h"

/**
Perform syntax highlighting for the shell commands in buff. The result is
stored in the color array as a color_code from the HIGHLIGHT_ enum
Expand Down Expand Up @@ -37,3 +44,5 @@ void highlight_universal( wchar_t * buff, int *color, int pos, array_list_t *err
FISH_COLOR_RED.
*/
int highlight_get_color( int highlight );

#endif
6 changes: 6 additions & 0 deletions history.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Prototypes for history functions, part of the user interface.
*/

#ifndef FISH_HISTORY_H
#define FISH_HISTORY_H

#include <wchar.h>

/**
Load history from file.
*/
Expand Down Expand Up @@ -63,3 +68,4 @@ void history_set_mode( wchar_t *name );
*/
void history_sanity_check();

#endif
6 changes: 6 additions & 0 deletions input.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ inputrc information for key bindings.
*/

#ifndef FISH_INPUT_H
#define FISH_INPUT_H

#include <wchar.h>

/**
Key codes for inputrc-style keyboard functions that are passed on
to the caller of input_read()
Expand Down Expand Up @@ -107,3 +112,4 @@ void input_parse_inputrc_line( wchar_t *cmd );
*/
wchar_t input_get_code( wchar_t *name );

#endif
6 changes: 4 additions & 2 deletions input_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
Header file for the low level input library
*/
#ifndef INPUT_COMMON_HH
#define INPUT_COMMON_HH
#ifndef INPUT_COMMON_H
#define INPUT_COMMON_H

#include <wchar.h>

/**
Hopefully, the biggest value that a wchar_t can have. UCS4 is a
Expand Down
7 changes: 7 additions & 0 deletions intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
*/

#ifndef FISH_INTERN_H
#define FISH_INTERN_H

#include <wchar.h>

/**
Return an identical copy of the specified string from a pool of unique strings. If the string was not in the pool, add a copy.
Expand All @@ -22,3 +27,5 @@ const wchar_t *intern_static( const wchar_t *in );
Free all interned strings
*/
void intern_free_all();

#endif
6 changes: 6 additions & 0 deletions kill.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
Works like the killring in emacs and readline. The killring is cut and paste whith a memory of previous cuts.
*/

#ifndef FISH_KILL_H
#define FISH_KILL_H

#include <wchar.h>

/**
Add a string to the top of the killring
*/
Expand All @@ -29,3 +34,4 @@ void kill_init();
*/
void kill_destroy();

#endif
4 changes: 4 additions & 0 deletions mimedb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef FISH_MIMEDB_H
#define FISH_MIMEDB_H

#endif
7 changes: 7 additions & 0 deletions output.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/**
Constants for various character classifications. Each character of a command string can be classified as one of the following types.
*/

#ifndef FISH_OUTPUT_H
#define FISH_OUTPUT_H

#include <wchar.h>

enum
{
HIGHLIGHT_NORMAL,
Expand Down Expand Up @@ -87,3 +93,4 @@ int writespace( int c );

int output_color_code( const wchar_t *val );

#endif
10 changes: 10 additions & 0 deletions parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
The fish parser.
*/

#ifndef FISH_PARSER_H
#define FISH_PARSER_H

#include <wchar.h>

#include "proc.h"
#include "util.h"
#include "parser.h"

/**
block_t represents a block of commands.
*/
Expand Down Expand Up @@ -267,3 +276,4 @@ void parser_destroy();
*/
int parser_is_help( wchar_t *s, int min_match );

#endif
10 changes: 10 additions & 0 deletions proc.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
*/

#ifndef FISH_PROC_H
#define FISH_PROC_H

#include <wchar.h>
#include <signal.h>
#include <unistd.h>

#include "util.h"

/**
Describes what type of IO operation an io_data_t represents
*/
Expand Down Expand Up @@ -273,3 +282,4 @@ void proc_update_jiffies();
*/
void proc_sanity_check();

#endif
8 changes: 8 additions & 0 deletions reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
features.
*/

#ifndef FISH_READER_H
#define FISH_READER_H

#include <wchar.h>

#include "util.h"

/**
Read commands from fd 0 until encountering EOF
*/
Expand Down Expand Up @@ -184,3 +191,4 @@ void reader_current_token_extent( wchar_t **a, wchar_t **b, wchar_t **pa, wchar_
*/
void reader_replace_current_token( wchar_t *new_token );

#endif
7 changes: 7 additions & 0 deletions sanity.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Prototypes for functions for performing sanity checks on the program state
*/

#ifndef FISH_SANITY_H
#define FISH_SANITY_H

#include <wchar.h>

/**
Call this function to tell the program it is not in a sane state.
*/
Expand All @@ -20,3 +25,5 @@ int sanity_check();
\param null_ok Wheter the pointer is allowed to point to 0
*/
void validate_pointer( const void *ptr, const wchar_t *err, int null_ok );

#endif
Loading

0 comments on commit e27664b

Please sign in to comment.