diff options
Diffstat (limited to 'src/include')
42 files changed, 174 insertions, 472 deletions
diff --git a/src/include/ReadBitmap.H1 b/src/include/ReadBitmap.H1 deleted file mode 100644 index 52fd579c..00000000 --- a/src/include/ReadBitmap.H1 +++ /dev/null @@ -1,6 +0,0 @@ -extern XImage * HTReadBitmapFile(Display * display , int screen , char * filename , int * width , int * height); -extern ImageStruct * insert_image_struct(char * filename); -#ifdef _READBITMAP_C -static int read_hot(FILE * fd , char Line[] , int * x_hot , int * y_hot); -static int read_w_and_h(FILE * fd , unsigned int * width , unsigned int * height); -#endif diff --git a/src/include/all_hyper_proto.H1 b/src/include/all_hyper_proto.H1 deleted file mode 100644 index ac6d8ce1..00000000 --- a/src/include/all_hyper_proto.H1 +++ /dev/null @@ -1,26 +0,0 @@ -#include "ReadBitmap.H1" -#include "dialog.H1" -#include "cond.H1" -#include "display.H1" -#include "event.H1" -#include "form_ext.H1" -#include "extent1.H1" -#include "extent2.H1" -#include "group.H1" -#include "htinp.H1" -#include "hyper.H1" -#include "initx.H1" -#include "input.H1" -#include "keyin.H1" -#include "item.H1" -#include "parse.H1" -#include "macro.H1" -#include "parse_paste.H1" -#include "parse_aux.H1" -#include "parse_input.H1" -#include "show_types.H1" -#include "parse_types.H1" -#include "scrollbar.H1" -#include "titlebar.H1" -#include "spadint.H1" -#include "mem.H1" diff --git a/src/include/bsdsignal.h b/src/include/bsdsignal.h index 1a55293c..ecbebebe 100644 --- a/src/include/bsdsignal.h +++ b/src/include/bsdsignal.h @@ -36,9 +36,14 @@ #ifndef OPENAXIOM_BSDSIGNAL_included #define OPENAXIOM_BSDSIGNAL_included +#include <signal.h> + #include "open-axiom.h" -#include <signal.h> +#ifdef __cplusplus +extern "C" { +#endif + #ifdef SIGCHLD # define OPENAXIOM_SIGCHLD SIGCHLD @@ -53,4 +58,8 @@ typedef void (* SignalHandlerFunc)(int); OPENAXIOM_EXPORT SignalHandlerFunc bsdSignal(int, SignalHandlerFunc, int); +#ifdef __cplusplus +} +#endif + #endif /* OPENAXIOM_BSDSIGNAL_included */ diff --git a/src/include/cond.H1 b/src/include/cond.H1 deleted file mode 100644 index a2843d4e..00000000 --- a/src/include/cond.H1 +++ /dev/null @@ -1,6 +0,0 @@ -extern void change_cond(char * label , char * newcond); -extern int check_condition(TextNode * node); -extern void insert_cond(char * label , char * cond); -#ifdef _COND_C -static int check_memostack(TextNode * node); -#endif diff --git a/src/include/cursor.H1 b/src/include/cursor.H1 index 090e0573..6538a398 100644 --- a/src/include/cursor.H1 +++ b/src/include/cursor.H1 @@ -1 +1,9 @@ +#ifdef __cplusplus +extern "C" { +#endif + extern int Cursor_shape(int ); + +#ifdef __cplusplus +} +#endif diff --git a/src/include/dialog.H1 b/src/include/dialog.H1 deleted file mode 100644 index db5257ad..00000000 --- a/src/include/dialog.H1 +++ /dev/null @@ -1,33 +0,0 @@ -extern void add_buffer_to_sym(char * buffer , InputItem * sym); -extern void dialog(XEvent * event , KeySym keysym , char * buffer); -extern void draw_inputsymbol(InputItem * sym); -extern void update_inputsymbol(InputItem * sym); -#ifdef _DIALOG_C -static void back_over_char(InputItem * sym); -static void back_over_eoln(InputItem * sym); -static void clear_cursor(InputItem * sym); -static void clear_cursorline(InputItem * sym); -static void dec_line_numbers(LineStruct * line); -static void decrease_line_numbers(LineStruct * line , int am); -static void delete_char(InputItem * sym); -static void delete_eoln(InputItem * sym); -static int delete_one_char(InputItem * sym); -static void delete_rest_of_line(InputItem * sym); -static void draw_cursor(InputItem * sym); -static void enter_new_line(InputItem * sym); -static void inc_line_numbers(LineStruct * line); -static void insert_buffer(char * buffer , InputItem * sym); -static int move_back_one_char(InputItem * sym); -static void move_cursor_backward(InputItem * sym); -static void move_cursor_down(InputItem * sym); -static void move_cursor_end(InputItem * sym); -static void move_cursor_forward(InputItem * sym); -static void move_cursor_home(InputItem * sym); -static void move_cursor_up(InputItem * sym); -static char move_rest_back(LineStruct * line , int size); -static int move_sym_forward(LineStruct * line , int num , int size , InputItem * sym); -static char * mystrncpy(char * buff1 , char * buff2 , int n); -static void overwrite_buffer(char * buffer , InputItem * item); -static void redraw_win(void); -static void tough_enter(InputItem * sym); -#endif diff --git a/src/include/display.H1 b/src/include/display.H1 deleted file mode 100644 index 8ccc2af5..00000000 --- a/src/include/display.H1 +++ /dev/null @@ -1,4 +0,0 @@ -extern void expose_page(HyperDocPage * page); -extern void paste_page(TextNode * node); -extern void scroll_page(HyperDocPage * page); -extern void show_page(HyperDocPage * page); diff --git a/src/include/edin.H1 b/src/include/edin.H1 index 5e5cf563..546b2951 100644 --- a/src/include/edin.H1 +++ b/src/include/edin.H1 @@ -1,3 +1,7 @@ +#ifdef __cplusplus +extern "C" { +#endif + extern void init_reader(void); extern void init_flag(int * , int ); extern void do_reading(void); @@ -15,3 +19,7 @@ extern void flagcpy(int * , int * ); extern void flagncpy(int * , int * , int ); extern void send_function_to_child(void); extern void send_buff_to_child(int ); + +#ifdef __cplusplus +} +#endif diff --git a/src/include/event.H1 b/src/include/event.H1 deleted file mode 100644 index f748adbf..00000000 --- a/src/include/event.H1 +++ /dev/null @@ -1,34 +0,0 @@ -extern void exitHyperDoc(void ); -extern void helpForHyperDoc(void ); -extern void mainEventLoop(void ); -extern void make_window_link(char * name); -extern void quitHyperDoc(void ); -extern void get_new_window(void ); -#ifdef _EVENT_C -static void set_cursor(HDWindow * window , Cursor state); -static void change_cursor(Cursor state , HDWindow * window); -static void create_window(void ); -static void downlink(void ); -static HyperDocPage * find_page(TextNode * node); -static void handle_button(int button , XButtonEvent * event); -static void handle_event(XEvent * event); -static void handle_motion_event(XMotionEvent * event); -static int HyperDocErrorHandler(Display * display , XErrorEvent * xe); -static void init_cursor_states(void ); -static void killAxiomPage(HyperDocPage * page); -static void make_busy_cursor(HDWindow * window); -static void make_busy_cursors(void ); -static void memolink(void ); -static void set_error_handlers(void ); -static int set_window(Window window); -static void clear_exposures(Window w); -static void kill_page(HyperDocPage * page); -static HyperDocPage * returnlink(void ); -static HyperDocPage * uplink(void ); -static void windowlink_handler(TextNode * node); -static void lispwindowlink_handler(HyperLink * link); -static HyperDocPage * paste_button(PasteNode * paste); -static HyperLink * findButtonInList(HDWindow * window , int x , int y); -static HyperLink * get_hyper_link(XButtonEvent * event); -static void init_cursor_state(HDWindow * window); -#endif diff --git a/src/include/extent1.H1 b/src/include/extent1.H1 deleted file mode 100644 index aae58d18..00000000 --- a/src/include/extent1.H1 +++ /dev/null @@ -1,37 +0,0 @@ -extern void compute_header_extent(HyperDocPage * page); -extern void compute_footer_extent(HyperDocPage * page); -extern void compute_scrolling_extent(HyperDocPage * page); -extern void compute_title_extent(HyperDocPage * page); -extern void compute_text_extent(TextNode * node); -#ifdef _EXTENT1_C -static void compute_begin_items_extent(TextNode * node); -static void compute_bf_extent(TextNode * node); -static void compute_box_extent(TextNode * node); -static void compute_button_extent(TextNode * node); -static void compute_center_extent(TextNode * node); -static void compute_dash_extent(TextNode * node); -static void compute_em_extent(TextNode * node); -static void compute_ifcond_extent(TextNode * node); -static void compute_image_extent(TextNode * node); -static void compute_input_extent(TextNode * node); -static void compute_ir_extent(TextNode * node); -static void compute_it_extent(TextNode * node); -static void compute_item_extent(TextNode * node); -static void compute_mbox_extent(TextNode * node); -static void compute_mitem_extent(TextNode * node); -static void compute_paste_extent(TextNode * node); -static void compute_pastebutton_extent(TextNode * node); -static void compute_punctuation_extent(TextNode * node); -static void compute_rm_extent(TextNode * node); -static void compute_spadcommand_extent(TextNode * node); -static void compute_spadsrc_extent(TextNode * node); -static void compute_spadsrctxt_extent(TextNode * node); -static void compute_table_extent(TextNode * * node); -static void compute_verbatim_extent(TextNode * node); -static void compute_word_extent(TextNode * node); -static void end_spadcommand_extent(TextNode * node); -static void end_spadsrc_extent(TextNode * node); -static void endbutton_extent(TextNode * node); -static void endif_extent(TextNode * node); -static void endpastebutton_extent(TextNode * node); -#endif diff --git a/src/include/extent2.H1 b/src/include/extent2.H1 deleted file mode 100644 index c8d20d13..00000000 --- a/src/include/extent2.H1 +++ /dev/null @@ -1,23 +0,0 @@ -extern void init_extents(void ); -extern void init_text(void ); -extern void init_title_extents(HyperDocPage * page); -extern void insert_bitmap_file(TextNode * node); -extern void insert_pixmap_file(TextNode * node); -extern int max_x(TextNode * node , int Ender); -extern int plh(int height); -extern void start_newline(int distance , TextNode * node); -extern int text_height(TextNode * node , int Ender); -extern int text_width(TextNode * node , int Ender); -extern int total_width(TextNode * node , int Ender); -extern int trailing_space(TextNode * node); -#ifdef _EXTENT2_C -static void center_nodes(TextNode * begin_node , TextNode * end_node); -static int input_string_width(TextNode * node); -static int punctuation_width(TextNode * node); -static int text_height1(TextNode * node , int Ender); -static int verbatim_width(TextNode * node); -static int width_of_dash(TextNode * node); -static int word_width(TextNode * node); -static int x_value(TextNode * node); -#endif - diff --git a/src/include/fnct_key.H1 b/src/include/fnct_key.H1 index cf920e85..60bdcac8 100644 --- a/src/include/fnct_key.H1 +++ b/src/include/fnct_key.H1 @@ -1,6 +1,14 @@ +#ifdef __cplusplus +extern "C" { +#endif + extern void set_editor_key(void); extern void define_function_keys(void); extern int get_key(int , char * ); extern int get_str(int , char * ); extern void null_fnct(int ); extern void handle_function_key(int , int ); + +#ifdef __cplusplus +} +#endif diff --git a/src/include/form_ext.H1 b/src/include/form_ext.H1 deleted file mode 100644 index c4c2db71..00000000 --- a/src/include/form_ext.H1 +++ /dev/null @@ -1,8 +0,0 @@ -extern void compute_form_page(HyperDocPage * page); -extern int window_width(int cols); -#ifdef _FORM_EXT_C -static int window_height(HyperDocPage * page); -static void form_header_extent(HyperDocPage * page); -static void form_footer_extent(HyperDocPage * page); -static void form_scrolling_extent(HyperDocPage * page); -#endif diff --git a/src/include/group.H1 b/src/include/group.H1 deleted file mode 100644 index 99c15afd..00000000 --- a/src/include/group.H1 +++ /dev/null @@ -1,14 +0,0 @@ -extern void bf_top_group(void ); -extern GroupItem * copy_group_stack(void ); -extern void em_top_group(void ); -extern void free_group_stack(GroupItem * g); -extern void init_group_stack(void ); -extern void init_top_group(void ); -extern void line_top_group(void ); -extern int pop_group_stack(void ); -extern void push_active_group(void ); -extern void push_group_stack(void ); -extern void push_spad_group(void ); -extern void rm_top_group(void ); -extern void tt_top_group(void ); -extern void center_top_group(void ); diff --git a/src/include/halloc.h b/src/include/halloc.h index 9ecd3aa0..6df64c31 100644 --- a/src/include/halloc.h +++ b/src/include/halloc.h @@ -1,7 +1,7 @@ /* Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd. All rights reserved. - Copyright (C) 2007-2008, Gabriel Dos Reis. + Copyright (C) 2007-2010, Gabriel Dos Reis. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36,6 +36,14 @@ #ifndef OPENAXIOM_HALLOC #define OPENAXIOM_HALLOC +#ifdef __cplusplus +extern "C" { +#endif + extern char * halloc(int, const char*); +#ifdef __cplusplus +} +#endif + #endif /* OPENAXIOM_HALLOC */ diff --git a/src/include/hash.h b/src/include/hash.h index 5c63b315..aadcec03 100644 --- a/src/include/hash.h +++ b/src/include/hash.h @@ -31,10 +31,12 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _HASH_H_ -#define _HASH_H_ 1 - +#ifndef OPENAXIOM_HASH_INCLUDED +#define OPENAXIOM_HASH_INCLUDED +#ifdef __cplusplus +extern "C" { +#endif typedef struct HashEntry { const char *key; /* pointer to key data */ @@ -67,4 +69,8 @@ extern char* hash_replace(HashTable*, char*, const char*); extern int string_equal(const char*, const char*); extern int string_hash(const char*, int size); -#endif +#ifdef __cplusplus +} +#endif + +#endif /* OPENAXIOM_HASH_INCLUDED */ diff --git a/src/include/htinp.H1 b/src/include/htinp.H1 deleted file mode 100644 index dbd87d65..00000000 --- a/src/include/htinp.H1 +++ /dev/null @@ -1,18 +0,0 @@ -extern void ht2_input(void ); -extern void make_record(void ); -extern void verify_record(void ); -extern char * strCopy(char * s); -extern void print_paste_line(FILE * pfile , char * str); -extern void get_spad_output(FILE * pfile , char * command , int com_type); -extern void get_graph_output(char * command , char * pagename , int com_type); -#ifdef _HTINP_C -static void make_input_file_list(void ); -static char * make_input_file_name(char * buf , char * filename); -static char * make_paste_file_name(char * buf , char * filename); -static void make_the_input_file(UnloadedPage * page); -static void make_input_file_from_page(HyperDocPage * page); -static int inListAndNewer(char * inputFile , char * htFile); -static void print_paste(FILE * pfile , char * realcom , char * command , char * pagename , int com_type); -static void print_graph_paste(FILE * pfile , char * realcom , char * command , char * pagename , int com_type); -static void send_command(char * command , int com_type); -#endif diff --git a/src/include/hyper.H1 b/src/include/hyper.H1 deleted file mode 100644 index e0350f6a..00000000 --- a/src/include/hyper.H1 +++ /dev/null @@ -1,10 +0,0 @@ -extern void sigusr2_handler(int sig); -extern void sigcld_handler(int sig); -extern void clean_socket(void); -extern int main(int argc , char * * argv); -extern void init_page_structs(HDWindow * w); -#ifdef _HYPER_C -static void init_hash(void); -static void make_server_connections(void); -static void check_arguments(void); -#endif diff --git a/src/include/initx.H1 b/src/include/initx.H1 deleted file mode 100644 index 347d99ff..00000000 --- a/src/include/initx.H1 +++ /dev/null @@ -1,17 +0,0 @@ -extern void change_text(int color , XFontStruct * font); -extern int init_form_window(char * name , int cols); -extern int init_top_window(char * name); -extern void initializeWindowSystem(void); -extern int is_it_850(XFontStruct * fontarg); -#ifdef _INITX_C -static void get_GCs(HDWindow * window); -static int get_border_properties(void); -static int get_color(char * name , char * class , int def , Colormap * map); -static void ingItColors_and_fonts(void); -static void load_font(XFontStruct * * font_info , char * fontname); -static void mergeDatabases(void); -static void open_form_window(void); -static void open_window(Window w); -static void set_name_and_icon(void); -static void set_size_hints(Window w); -#endif diff --git a/src/include/input.H1 b/src/include/input.H1 deleted file mode 100644 index 99f79a35..00000000 --- a/src/include/input.H1 +++ /dev/null @@ -1,11 +0,0 @@ -extern InputItem * return_item(char * name); -extern void fill_box(Window w , ImageStruct * image); -extern void toggle_input_box(HyperLink * link); -extern void toggle_radio_box(HyperLink * link); -extern void change_input_focus(HyperLink * link); -extern void next_input_focus(void); -extern void prev_input_focus(void); -extern int delete_item(char * name); -#ifdef _INPUT_C -static void clear_rbs(InputBox * list); -#endif diff --git a/src/include/item.H1 b/src/include/item.H1 deleted file mode 100644 index e462d98f..00000000 --- a/src/include/item.H1 +++ /dev/null @@ -1,5 +0,0 @@ -extern void push_item_stack(void); -extern void clear_item_stack(void); -extern void pop_item_stack(void); -extern ItemStack * copy_item_stack(void); -extern void free_item_stack(ItemStack * is); diff --git a/src/include/keyin.H1 b/src/include/keyin.H1 deleted file mode 100644 index 0faab2fd..00000000 --- a/src/include/keyin.H1 +++ /dev/null @@ -1,2 +0,0 @@ -extern void handle_key(XEvent * event); -extern void init_keyin(void); diff --git a/src/include/macro.H1 b/src/include/macro.H1 deleted file mode 100644 index f7853c72..00000000 --- a/src/include/macro.H1 +++ /dev/null @@ -1,11 +0,0 @@ -extern void scan_HyperDoc(void); -extern int number(char * str); -extern ParameterList init_parameter_elem(int number); -extern int push_parameters(ParameterList new); -extern int pop_parameters(void); -extern int parse_macro(void); -extern void parse_parameters(void); -#ifdef _MACRO_C -static char * load_macro(MacroStore * macro); -static void get_parameter_strings(int number , char * macro_name); -#endif diff --git a/src/include/mem.H1 b/src/include/mem.H1 deleted file mode 100644 index a8e1a11b..00000000 --- a/src/include/mem.H1 +++ /dev/null @@ -1,32 +0,0 @@ -extern ButtonList * alloc_button_list(void); -extern CondNode * alloc_condnode(void); -extern HDWindow * alloc_hd_window(void); -extern IfNode * alloc_ifnode(void); -extern InputBox * alloc_inputbox(void); -extern LineStruct * alloc_inputline(int size); -extern TextNode * alloc_node(void); -extern HyperDocPage * alloc_page(char * name); -extern PasteNode * alloc_paste_node(char * name); -extern RadioBoxes * alloc_rbs(void); -extern void free_button_list(ButtonList * bl); -extern void free_hd_window(HDWindow * w); -extern void free_input_item(InputItem * sym , short des); -extern void free_input_list(InputItem * il); -extern void free_node(TextNode * node , short des); -extern void free_page(HyperDocPage * page); -extern void free_patch(PatchStore * p); -extern void free_string(char * str); -extern char * resizeBuffer(int size , char * oldBuf , int * oldSize); -extern PatchStore * alloc_patchstore(void); -#ifdef _MEM_C -static void free_cond(CondNode * cond); -static void free_depend(SpadcomDepend * sd); -static void free_lines(LineStruct * lines); -static void dont_free(void * link); -static void free_if_non_NULL(void * p); -static void free_input_box(InputBox * box); -static void free_paste(PasteNode * paste , short des); -static void free_pastearea(TextNode * node , short des); -static void free_pastebutton(TextNode * node , short des); -static void free_radio_boxes(RadioBoxes * radio); -#endif diff --git a/src/include/parse.H1 b/src/include/parse.H1 deleted file mode 100644 index fc2c346d..00000000 --- a/src/include/parse.H1 +++ /dev/null @@ -1,20 +0,0 @@ -extern void display_page(HyperDocPage * page); -extern void init_parse_patch(HyperDocPage * page); -extern void load_page(HyperDocPage * page); -extern void parse_HyperDoc(void ); -extern void parse_from_string(char * str); -extern HyperDocPage * parse_page_from_socket(void ); -extern HyperDocPage * parse_page_from_unixfd(void ); -#ifdef _PARSE_C -static void end_a_page(void ); -static HyperDocPage * format_page(UnloadedPage * ulpage); -static void parse_page(HyperDocPage * page); -static void parse_replacepage(void ); -static void start_footer(void ); -static void start_scrolling(void ); -static void Push_MR(void ); -static void Pop_MR(void ); -static void parse_title(HyperDocPage * page); -static void parse_header(HyperDocPage * page); -static void init_parse_page(HyperDocPage * page); -#endif diff --git a/src/include/parse_aux.H1 b/src/include/parse_aux.H1 deleted file mode 100644 index 4de9b249..00000000 --- a/src/include/parse_aux.H1 +++ /dev/null @@ -1,18 +0,0 @@ -extern void add_dependencies(void ); -extern FILE * find_fp(FilePosition fp); -extern char * get_input_string(void ); -extern HyperLink * make_link_window(TextNode * link_node , int type , int isSubWin); -extern HyperLink * make_paste_window(PasteNode * paste); -extern void make_special_pages(HashTable * pageHashTable); -extern int window_code(Window * w , int size); -extern int window_equal(Window * w1 , Window * w2); -extern char * window_id(Window w); -extern void read_ht_db(HashTable * page_hash , HashTable * macro_hash , HashTable * patch_hash); -extern int get_filename(void); -extern int is_number(char * str); -extern void parser_error(char * str); -extern int get_where(void); -#ifdef _PARSE_AUX_C -static void read_ht_file(HashTable * page_hash , HashTable * macro_hash , HashTable * patch_hash , FILE * db_fp , char * db_file); -static HyperDocPage * make_special_page(int type , char * name); -#endif diff --git a/src/include/parse_input.H1 b/src/include/parse_input.H1 deleted file mode 100644 index b837f89e..00000000 --- a/src/include/parse_input.H1 +++ /dev/null @@ -1,16 +0,0 @@ -extern HyperLink * make_input_window(InputItem * item); -extern HyperLink * make_box_window(InputBox * box , int type); -extern void initialize_default(InputItem * item , char * buff); -extern void parse_inputstring(void); -extern void parse_simplebox(void); -extern void parse_radiobox(void); -extern void init_paste_item(InputItem * item); -extern void repaste_item(void); -extern InputItem * current_item(void); -extern int already_there(char * name); -extern void parse_radioboxes(void); -#ifdef _PARSE_INPUT_C -static void insert_item(InputItem * item); -static void add_box_to_rb_list(char * name , InputBox * box); -static int check_others(InputBox * list); -#endif diff --git a/src/include/parse_paste.H1 b/src/include/parse_paste.H1 deleted file mode 100644 index 771e995e..00000000 --- a/src/include/parse_paste.H1 +++ /dev/null @@ -1,6 +0,0 @@ -extern void parse_paste(void); -extern void parse_pastebutton(void); -extern HyperDocPage * parse_patch(PasteNode * paste); -#ifdef _PARSE_PASTE_C -static void load_patch(PatchStore * patch); -#endif diff --git a/src/include/parse_types.H1 b/src/include/parse_types.H1 deleted file mode 100644 index 1dca22f8..00000000 --- a/src/include/parse_types.H1 +++ /dev/null @@ -1,25 +0,0 @@ -extern void parse_begin_items(void ); -extern void parse_box(void ); -extern void parse_button(void ); -extern void parse_centerline(void ); -extern void parse_command(void ); -extern void parse_env(TextNode * node); -extern void parse_free(void ); -extern void parse_help(void ); -extern void parse_ifcond(void ); -extern void parse_input_pix(void ); -extern void parse_item(void ); -extern void parse_mbox(void ); -extern void parse_mitem(void ); -extern void parse_newcond(void ); -extern void parse_setcond(void ); -extern void parse_spadcommand(TextNode * spad_node); -extern void parse_spadsrc(TextNode * spad_node); -extern void parse_table(void ); -extern void parse_value1(void ); -extern void parse_value2(void ); -extern void parse_verbatim(int type); -#ifdef _PARSE_TYPES_C -static void parse_condnode(void ); -static void parse_hasreturnto(void ); -#endif diff --git a/src/include/pixmap.H1 b/src/include/pixmap.H1 deleted file mode 100644 index 77c08cd2..00000000 --- a/src/include/pixmap.H1 +++ /dev/null @@ -1,4 +0,0 @@ -extern int file_exists(char * ); -extern FILE * zzopen(char * , char * ); -extern void write_pixmap_file(Display * , int , char * , Window , int , int , int , int ); -extern int read_pixmap_file(Display * , int , char * , XImage * * , int * , int * ); diff --git a/src/include/pixmap.h b/src/include/pixmap.h new file mode 100644 index 00000000..86f34437 --- /dev/null +++ b/src/include/pixmap.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd. + All rights reserved. + Copyright (C) 2007-2008, Gabriel Dos Reis. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of The Numerical Algorithms Group Ltd. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef OPENAXIOM_PIXMAP_included +#define OPENAXIOM_PIXMAP_included + +#ifdef __cplusplus +extern "C" { +#endif + +extern int file_exists(char * ); +extern FILE * zzopen(char * , char * ); +extern void write_pixmap_file(Display * , int , char * , Window , int , int , int , int ); +extern int read_pixmap_file(Display * , int , char * , XImage * * , int * , int * ); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/prt.H1 b/src/include/prt.H1 index 5c76fd80..061c11ba 100644 --- a/src/include/prt.H1 +++ b/src/include/prt.H1 @@ -1,3 +1,7 @@ +#ifdef __cplusplus +extern "C" { +#endif + extern void myputchar(char ); extern void clear_buff(void); extern void move_end(void); @@ -17,3 +21,7 @@ extern void print_whole_buff(void); extern void move_ahead(void); extern void move_back(void); extern void back_over_current_char(void); + +#ifdef __cplusplus +} +#endif diff --git a/src/include/rgb.h b/src/include/rgb.h index cd3cd72b..758969df 100644 --- a/src/include/rgb.h +++ b/src/include/rgb.h @@ -31,6 +31,9 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef OPENAXIOM_RGB_included +#define OPENAXIOM_RGB_included + typedef struct _RGB { float r,g,b; } RGB ; @@ -44,8 +47,4 @@ typedef struct _HLS { } HLS ; - - - - - +#endif diff --git a/src/include/scrollbar.H1 b/src/include/scrollbar.H1 deleted file mode 100644 index 76a9ed43..00000000 --- a/src/include/scrollbar.H1 +++ /dev/null @@ -1,19 +0,0 @@ -extern void calculateScrollBarMeasures(void ); -extern void drawScrollLines(void ); -extern void hideScrollBars(HDWindow * hdWindow); -extern void getScrollBarMinimumSize(int * width , int * height); -extern void linkScrollBars(void ); -extern void makeScrollBarWindows(void ); -extern void moveScroller(HDWindow * hdWindow); -extern void scrollDown(void ); -extern void scrollDownPage(void ); -extern void scrollScroller(XButtonEvent * event); -extern void scrollToFirstPage(void ); -extern void scrollUp(void ); -extern void scrollUpPage(void ); -extern void showScrollBars(HDWindow * hdWindow); -#ifdef _SCROLLBAR_C -static int ch(int height); -static void changeWindowBackgroundPixmap(Window window , Pixmap pixmap); -static void drawScroller3DEffects(HDWindow * hdWindow , int x1 , int y1 , int x2 , int y2); -#endif diff --git a/src/include/show_types.H1 b/src/include/show_types.H1 deleted file mode 100644 index 1c125f2c..00000000 --- a/src/include/show_types.H1 +++ /dev/null @@ -1,10 +0,0 @@ -extern void show_text(TextNode * node , int Ender); -#ifdef _SHOW_TYPES_C -static void show_image(TextNode * node , GC gc); -static void show_input(TextNode * node); -static void show_link(TextNode * node); -static void show_paste(TextNode * node); -static void show_pastebutton(TextNode * node); -static void show_simple_box(TextNode * node); -static void show_spadcommand(TextNode * node); -#endif diff --git a/src/include/sockio.h b/src/include/sockio.h index f618dbc4..07d9097a 100644 --- a/src/include/sockio.h +++ b/src/include/sockio.h @@ -53,6 +53,11 @@ #include "openaxiom-c-macros.h" #include "open-axiom.h" +#ifdef __cplusplus +extern "C" { +#endif + + /* On Windows, a socket identifier is not a file descriptor. It is represented by an integer type, but that integer type is not just plain int as in the Unix world. It is an unsigned integer. @@ -221,4 +226,8 @@ OPENAXIOM_EXPORT extern fd_set socket_mask; OPENAXIOM_EXPORT extern fd_set server_mask; +#ifdef __cplusplus +} +#endif + #endif /* OPENAXIOM_SOCKIO_included */ diff --git a/src/include/spadcolors.H1 b/src/include/spadcolors.H1 deleted file mode 100644 index 39a2317a..00000000 --- a/src/include/spadcolors.H1 +++ /dev/null @@ -1,9 +0,0 @@ -extern RGB HSVtoRGB(HSV ); -extern RGB HLStoRGB(HLS ); -extern float value(float , float , float ); -extern int makeColors(Display * , int , Colormap * , unsigned long * * , int * ); -extern int makePermVector(Display * , int , unsigned long * * ); -extern int makeNewColorMap(Display * , Colormap , int ); -extern unsigned long XPixelColor(int ); -extern void FreePixels(Display * , Colormap , int ); -extern int AllocCells(Display * , Colormap , int ); diff --git a/src/include/spadcolors.h b/src/include/spadcolors.h index 43047242..c244cc6f 100644 --- a/src/include/spadcolors.h +++ b/src/include/spadcolors.h @@ -31,7 +31,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <X11/X.h> +#ifndef OPENAXIOM_SPADCOLORS_included +#define OPENAXIOM_SPADCOLORS_included + +#include <X11/Xlib.h> +#include "rgb.h" + +#ifdef __cplusplus +extern "C" { +#endif + #define numOfColors 240 #define totalHuesConst 27 #define totalShadesConst 5 @@ -41,9 +50,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define numPlanes 1 #define numColors 10 #define startColor 0 -#define endColor startColor+numColors +#define endColor (startColor+numColors) -#define colorStep (maxColors+1)/numColors +#define colorStep ((maxColors+1)/numColors) #define yes 1 #define no 0 @@ -51,9 +60,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define smoothConst 50 #define saymem(a,b,c) saymemWithLine(a,b,c,0) #define Colorcells 256 /* KF number of elements in permutation vector */ -#define shade 5 +/* #define shade 5 */ #define saturation 0.8 +extern RGB HSVtoRGB(HSV ); +extern RGB HLStoRGB(HLS ); +extern float value(float , float , float ); +extern int makeColors(Display * , int , Colormap * , unsigned long * * , int * ); +extern int makePermVector(Display * , int , unsigned long * * ); +extern int makeNewColorMap(Display * , Colormap , int ); +extern unsigned long XPixelColor(int ); +extern void FreePixels(Display * , Colormap , int ); +extern int AllocCells(Display * , Colormap , int ); + extern int smoothHue; extern Colormap colorMap; extern int num; @@ -61,4 +80,11 @@ extern int scrn; #define maxColors DisplayCells(dsply,scrn)-1 -#include "rgb.h" + + +#ifdef __cplusplus +} +#endif + + +#endif /* OPENAXIOM_SPADCOLORS_included */ diff --git a/src/include/spadint.H1 b/src/include/spadint.H1 deleted file mode 100644 index e1ba6165..00000000 --- a/src/include/spadint.H1 +++ /dev/null @@ -1,25 +0,0 @@ -extern HyperDocPage * issue_server_command(HyperLink * link); -extern HyperDocPage * issue_unixlink(TextNode * node); -extern char * print_to_string(TextNode * command); -extern void issue_spadcommand(HyperDocPage * page , TextNode * command , int immediate , int type); -extern openaxiom_sio * accept_menu_connection(openaxiom_sio * server_sock); -extern char * print_to_string1(TextNode * command , int * sizeBuf); -extern int issue_serverpaste(TextNode * command); -extern void issue_unixcommand(TextNode * node); -extern int issue_unixpaste(TextNode * node); -extern void service_session_socket(void); -extern void send_lisp_command(char * command); -extern void escape_string(char * s); -extern void unescape_string(char * s); -extern char * print_source_to_string1(TextNode * command , int * sizeBuf); -extern char * print_source_to_string(TextNode * command); -#ifdef _SPADINT_C -static void start_user_buffer(HyperDocPage * page); -static void clear_execution_marks(HashTable * depend_hash); -static void issue_dependent_commands(HyperDocPage * page , TextNode * command , int type); -static void send_pile(openaxiom_sio * sock , char * str); -static void mark_as_executed(HyperDocPage * page , TextNode * command , int type); -static void accept_menu_server_connection(HyperDocPage * page); -static void switch_frames(void ); -static void close_client(int pid); -#endif diff --git a/src/include/titlebar.H1 b/src/include/titlebar.H1 deleted file mode 100644 index b5d564c1..00000000 --- a/src/include/titlebar.H1 +++ /dev/null @@ -1,7 +0,0 @@ -extern void getTitleBarMinimumSize(int * width , int * height); -extern void linkTitleBarWindows(void); -extern void makeTitleBarWindows(void); -extern void showTitleBar(void); -#ifdef _TITLEBAR_C -static void readTitleBarImages(void); -#endif diff --git a/src/include/util.H1 b/src/include/util.H1 index bed0da32..c60bd374 100644 --- a/src/include/util.H1 +++ b/src/include/util.H1 @@ -1,6 +1,14 @@ +#ifdef __cplusplus +extern "C" { +#endif + extern int checker(int , int , char * ); extern char * getmemWithLine(int , char * , int ); extern char * saymemWithLine(char * , int , int , int ); extern void myfree(void * , int ); extern XPoint getWindowPositionXY(Display * , Window ); extern XPoint getWindowSizeXY(Display * , Window ); + +#ifdef __cplusplus +} +#endif diff --git a/src/include/wct.H1 b/src/include/wct.H1 index b156c430..1f403594 100644 --- a/src/include/wct.H1 +++ b/src/include/wct.H1 @@ -1,3 +1,7 @@ +#ifdef __cplusplus +extern "C" { +#endif + extern time_t ftime(char * ); extern void fatal(char * , char * ); extern off_t fsize(char * ); @@ -24,3 +28,7 @@ extern void skim_wct(void); extern void rescan_wct(void); extern void find_wct(void); + +#ifdef __cplusplus +} +#endif |