Permalink
Browse files

Add header guards to the header files.

darcs-hash:20051004151139-35ec8-7af69b9d7647d145dc621f7eaea726e729cff554.gz
  • Loading branch information...
1 parent c361d85 commit e27664b13b11070e561fdd313ca0a5b9950c2c46 @jamessan jamessan committed Oct 4, 2005
Showing with 191 additions and 14 deletions.
  1. +8 −0 builtin.h
  2. +7 −0 builtin_help.h
  3. +9 −0 common.h
  4. +9 −0 complete.h
  5. +9 −0 env.h
  6. +4 −2 env_universal.h
  7. +5 −2 env_universal_common.h
  8. +10 −0 exec.h
  9. +8 −0 expand.h
  10. +8 −1 function.h
  11. +9 −0 highlight.h
  12. +6 −0 history.h
  13. +6 −0 input.h
  14. +4 −2 input_common.h
  15. +7 −0 intern.h
  16. +6 −0 kill.h
  17. +4 −0 mimedb.h
  18. +7 −0 output.h
  19. +10 −0 parser.h
  20. +10 −0 proc.h
  21. +8 −0 reader.h
  22. +7 −0 sanity.h
  23. +6 −0 tokenizer.h
  24. +7 −0 util.h
  25. +5 −3 wgetopt.h
  26. +8 −0 wildcard.h
  27. +4 −4 wutil.h
View
@@ -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
{
@@ -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
View
@@ -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
@@ -23,3 +29,4 @@ void builtin_help_init();
*/
void builtin_help_destroy();
+#endif
View
@@ -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.
@@ -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 );
View
@@ -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 */
@@ -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
View
@@ -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
*/
@@ -102,3 +109,5 @@ char **env_export_arr( int recalc );
*/
void env_get_names( array_list_t *l, int flags );
+
+#endif
View
@@ -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"
@@ -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
View
@@ -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
*/
@@ -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
View
@@ -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
*/
@@ -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
View
@@ -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
*/
@@ -61,4 +68,4 @@ int function_exists( const wchar_t *name);
void function_get_names( array_list_t *list,
int get_hidden );
-
+#endif
View
@@ -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
@@ -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
View
@@ -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.
*/
@@ -63,3 +68,4 @@ void history_set_mode( wchar_t *name );
*/
void history_sanity_check();
+#endif
View
@@ -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()
@@ -107,3 +112,4 @@ void input_parse_inputrc_line( wchar_t *cmd );
*/
wchar_t input_get_code( wchar_t *name );
+#endif
View
@@ -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
View
@@ -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.
@@ -22,3 +27,5 @@ const wchar_t *intern_static( const wchar_t *in );
Free all interned strings
*/
void intern_free_all();
+
+#endif
View
@@ -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
*/
@@ -29,3 +34,4 @@ void kill_init();
*/
void kill_destroy();
+#endif
View
@@ -0,0 +1,4 @@
+#ifndef FISH_MIMEDB_H
+#define FISH_MIMEDB_H
+
+#endif
View
@@ -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,
@@ -87,3 +93,4 @@ int writespace( int c );
int output_color_code( const wchar_t *val );
+#endif
View
@@ -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.
*/
@@ -267,3 +276,4 @@ void parser_destroy();
*/
int parser_is_help( wchar_t *s, int min_match );
+#endif
View
@@ -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
*/
@@ -273,3 +282,4 @@ void proc_update_jiffies();
*/
void proc_sanity_check();
+#endif
View
@@ -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
*/
@@ -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
View
@@ -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.
*/
@@ -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
Oops, something went wrong.

0 comments on commit e27664b

Please sign in to comment.