| home | contents | previous | next page | send comment | send link | add bookmark |

IDE_DATA.H

common declarations

/*-------------------------------------------------------------------*
     Editor Header

     Common pre-processor directives and declarations for the editor

     File:     ide_data.h

     Module:   editor

     by:  Stephen R. Schmitt
 *-------------------------------------------------------------------*/

// #define NDEBUG  // if defined, assert statements are not compiled

/*
 *   preprocessor directives
 */
#include <assert.h>
#include <ctype.h>
#include <conio.h>
#include <dir.h>
#include <dos.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <process.h>

#define MAX_LINE_LENGTH    124
#define MAX_ERRORS          28
#define FILE_NAME_LENGTH    64
#define MAX_STRING_LENGTH   64

typedef enum
{
    false = 0,
    true  = 1
}
bool;

struct message
{
    char fil[16];
    int lin;
    int col;
    char msg[64];
};

union scancode
{
    int ch;
    char c[2];
};

struct line
{
    struct line *prev;
    struct line *next;
    char string[MAX_LINE_LENGTH];
};

struct edit
{
    struct line *line_ptr;
    int          line_num;
    int          char_num;
};

/*
 *   function declarations in ide_main.cpp
 */
int  get_key();
int  first_text_line();
int  incr_text_line();
int  decr_text_line();
void cursor_position();
void function_key(unsigned char);
void backspace();
void tab_right();
void tab_left();
void enter_line();
void delete_line();
void write_line(struct line *, int, int);
void write_screen(struct line *, int);
void insert_character(char);
void overwrite_character(char);
void delete_character();
void switch_insert_overwrite();
void up_arrow();
void page_up();
void left_arrow();
void right_arrow();
void end();
void down_arrow();
void page_down();
void goto_end_of_file();
void goto_start_of_file();
void save_screen();
void select_text(unsigned char);
void copy_text();
void delete_text();
void paste_text();

/*
 *   function declarations in ide_menu.cpp
 */
void single_box_window(int, int, int, int, int, int);
void double_box_window(int, int, int, int,
		       int, int);
int menu_init(int, char *choice[]);
int menu_item(char, int, int, char *choice[]);
void restore_edit_window();
void error_message(char *);

void files();
void file_load();
void file_load_process();
void file_new();
void file_save();
void file_write();
void file_print();
void file_shell();
bool file_warning();

void production();
void run(int option);
void show_error();

void help();
void keyboard();
void control_keys();
void function_keys();
void language();
void help_message(int item);
void about();

void find();
void search();

| home | contents | previous | next page | send comment | send link | add bookmark |

Copyright © 2004, Stephen R. Schmitt