diff --git a/gtkedit/Makefile.in b/gtkedit/Makefile.in index ab963b630..f9f90cc76 100644 --- a/gtkedit/Makefile.in +++ b/gtkedit/Makefile.in @@ -20,10 +20,11 @@ AR = @AR@ EDITSRC = edit.c editcmd.c editdraw.c gtkedit.c gtkeditkey.c \ propfont.c syntax.c wordproc.c edit.h editcmddef.h global.h gtkedit.h \ - libgettext.h lkeysym.h editmenu.c editoptions.c mousemark.h editwidget.c + libgettext.h lkeysym.h editmenu.c editoptions.c mousemark.h \ + editwidget.c bookmark.c EDITOBJS = edit.o editcmd.o editdraw.o gtkedit.o gtkeditkey.o \ - propfont.o syntax.o wordproc.o + propfont.o syntax.o wordproc.o bookmark.o DIST = Makefile.in $(EDITSRC) diff --git a/gtkedit/bookmark.c b/gtkedit/bookmark.c new file mode 100644 index 000000000..5cf5b0266 --- /dev/null +++ b/gtkedit/bookmark.c @@ -0,0 +1,217 @@ +/* editor book mark handling + + Copyright (C) 1996, 1997 the Free Software Foundation + + Authors: 1996, 1997 Paul Sheer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + */ + + +#include +#include "edit.h" + +/* note, if there is more than one bookmark on a line, then they are + appended after each other and the last one is always the one found + by book_mark_found() i.e. last in is the one seen */ + +static inline struct _book_mark *double_marks (WEdit * edit, struct _book_mark *p) +{ + if (p->next) + while (p->next->line == p->line) + p = p->next; + return p; +} + +/* returns the first bookmark on or before this line */ +struct _book_mark *book_mark_find (WEdit * edit, int line) +{ + struct _book_mark *p; + if (!edit->book_mark) { +/* must have an imaginary top bookmark at line -1 to make things less complicated */ + edit->book_mark = malloc (sizeof (struct _book_mark)); + memset (edit->book_mark, 0, sizeof (struct _book_mark)); + edit->book_mark->line = -1; + return edit->book_mark; + } + for (p = edit->book_mark; p; p = p->next) { + if (p->line > line) + break; /* gone past it going downward */ + if (p->line <= line) { + if (p->next) { + if (p->next->line > line) { + edit->book_mark = p; + return double_marks (edit, p); + } + } else { + edit->book_mark = p; + return double_marks (edit, p); + } + } + } + for (p = edit->book_mark; p; p = p->prev) { + if (p->next) + if (p->next->line <= line) + break; /* gone past it going upward */ + if (p->line <= line) { + if (p->next) { + if (p->next->line > line) { + edit->book_mark = p; + return double_marks (edit, p); + } + } else { + edit->book_mark = p; + return double_marks (edit, p); + } + } + } + return 0; /* can't get here */ +} + +/* returns true if a bookmark exists at this line of colour c */ +int book_mark_query_color (WEdit * edit, int line, int c) +{ + struct _book_mark *p; + if (!edit->book_mark) + return 0; + for (p = book_mark_find (edit, line); p; p = p->prev) { + if (p->line != line) + return 0; + if (p->c == c) + return 1; + } + return 0; +} + +/* returns the number of bookmarks at this line and a list of their colours in c + up to a maximum of 8 colours */ +int book_mark_query_all (WEdit * edit, int line, int *c) +{ + int i; + struct _book_mark *p; + if (!edit->book_mark) + return 0; + for (i = 0, p = book_mark_find (edit, line); p && i < 8; p = p->prev, i++) { + if (p->line != line) + return i; + c[i] = p->c; + } + return i; +} + +/* insert a bookmark at this line */ +void book_mark_insert (WEdit * edit, int line, int c) +{ + struct _book_mark *p, *q; + p = book_mark_find (edit, line); +#if 0 + if (p->line == line) { /* already exists, so just change the colour */ + if (p->c != c) { + edit->force |= REDRAW_LINE; + p->c = c; + } + return; + } +#endif + edit->force |= REDRAW_LINE; +/* create list entry */ + q = malloc (sizeof (struct _book_mark)); + memset (q, 0, sizeof (struct _book_mark)); + q->line = line; + q->c = c; + q->next = p->next; +/* insert into list */ + q->prev = p; + if (p->next) + p->next->prev = q; + p->next = q; +} + +/* remove a bookmark if there is one at this line matching this colour - c of -1 clear all */ +void book_mark_clear (WEdit * edit, int line, int c) +{ + struct _book_mark *p, *q; + if (!edit->book_mark) + return; + for (p = book_mark_find (edit, line); p; p = q) { + q = p->prev; + if (p->line == line && (p->c == c || c == -1)) { + edit->force |= REDRAW_LINE; + edit->book_mark = p->prev; + p->prev->next = p->next; + if (p->next) + p->next->prev = p->prev; + memset (p, 0, sizeof (struct _book_mark)); + free (p); + break; + } + } +/* if there is only our dummy book mark left, clear it for speed */ + if (edit->book_mark->line == -1 && !edit->book_mark->next) { + free (edit->book_mark); + edit->book_mark = 0; + } +} + +/* clear all bookmarks matching this colour, if c is -1 clears all */ +void book_mark_flush (WEdit * edit, int c) +{ + struct _book_mark *p, *q; + if (!edit->book_mark) + return; + edit->force |= REDRAW_PAGE; + while (edit->book_mark->prev) + edit->book_mark = edit->book_mark->prev; + for (q = edit->book_mark->next; q; q = p) { + p = q->next; + if (q->c == c || c == -1) { + q->prev->next = q->next; + if (p) + p->prev = q->prev; + memset (q, 0, sizeof (struct _book_mark)); + free (q); + } + } + if (!edit->book_mark->next) { + free (edit->book_mark); + edit->book_mark = 0; + } +} + +/* shift down bookmarks after this line */ +void book_mark_inc (WEdit * edit, int line) +{ + if (edit->book_mark) { + struct _book_mark *p; + p = book_mark_find (edit, line); + for (p = p->next; p; p = p->next) + p->line++; + } +} + +/* shift up bookmarks after this line */ +void book_mark_dec (WEdit * edit, int line) +{ + if (edit->book_mark) { + struct _book_mark *p; + p = book_mark_find (edit, line); + for (p = p->next; p; p = p->next) + p->line--; + } +} + + + diff --git a/gtkedit/edit.c b/gtkedit/edit.c index b3aa70cff..7ebfebf67 100644 --- a/gtkedit/edit.c +++ b/gtkedit/edit.c @@ -16,15 +16,17 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ #define _EDIT_C THIS_IS #include #if defined(NEEDS_IO_H) # include +# include #endif -#include #ifdef NEEDS_CR_LF_TRANSLATION # define CR_LF_TRANSLATION #endif @@ -255,10 +257,10 @@ int edit_load_file (WEdit * edit, const char *filename, const char *text, unsign /* Lastbyte calculation in TEXT mode FRANCO */ #if defined CR_LF_TRANSLATION - if(file && (!text)){ + if(file && (!text)) { real_size=0; - tmp_buf[sizeof (tmp_buf)-1]=0; - while((bytes_read = read(file,tmp_buf,1024)) > 0){ + tmp_buf[sizeof (tmp_buf) - 1] = 0; + while ((bytes_read = read (file, tmp_buf, 1024)) > 0) { real_size += bytes_read; } s.st_size = real_size; @@ -362,6 +364,7 @@ int edit_clean (WEdit * edit) if (edit) { int j = 0; edit_free_syntax_rules (edit); + book_mark_flush (edit, -1); for (; j <= MAXBUFF; j++) { if (edit->buffers1[j] != NULL) free (edit->buffers1[j]); @@ -602,6 +605,8 @@ void edit_insert (WEdit * edit, int c) } /* now we must update some info on the file and check if a redraw is required */ if (c == '\n') { + if (edit->book_mark) + book_mark_inc (edit, edit->curs_line); edit->curs_line++; edit->total_lines++; edit->force |= REDRAW_LINE_ABOVE | REDRAW_AFTER_CURSOR; @@ -643,6 +648,8 @@ void edit_insert_ahead (WEdit * edit, int c) edit->start_line++; } if (c == '\n') { + if (edit->book_mark) + book_mark_inc (edit, edit->curs_line); edit->total_lines++; edit->force |= REDRAW_AFTER_CURSOR; } @@ -682,6 +689,8 @@ int edit_delete (WEdit * edit) edit->curs2--; if (p == '\n') { + if (edit->book_mark) + book_mark_dec (edit, edit->curs_line); edit->total_lines--; edit->force |= REDRAW_AFTER_CURSOR; } @@ -716,6 +725,8 @@ int edit_backspace (WEdit * edit) edit->curs1--; if (p == '\n') { + if (edit->book_mark) + book_mark_dec (edit, edit->curs_line); edit->curs_line--; edit->total_lines--; edit->force |= REDRAW_AFTER_CURSOR; @@ -1169,6 +1180,10 @@ long edit_find_line (WEdit * edit, int line) edit->line_offsets[2] = edit_bol (edit, edit->last_byte); edit->caches_valid = 1; } + if (line >= edit->total_lines) + return edit->line_offsets[2]; + if (line <= 0) + return 0; /* find the closest known point */ for (i = 0; i < N_LINE_CACHES; i++) { int n; @@ -2122,6 +2137,43 @@ int edit_execute_cmd (WEdit * edit, int command, int char_for_insertion) edit_mark_cmd (edit, 1); break; + case CK_Toggle_Bookmark: + if (book_mark_query_color (edit, edit->curs_line, BOOK_MARK_COLOR)) + book_mark_clear (edit, edit->curs_line, BOOK_MARK_COLOR); + else + book_mark_insert (edit, edit->curs_line, BOOK_MARK_COLOR); + break; + case CK_Flush_Bookmarks: + book_mark_flush (edit, BOOK_MARK_COLOR); + edit->force |= REDRAW_PAGE; + break; + case CK_Next_Bookmark: + if (edit->book_mark) { + struct _book_mark *p; + p = (struct _book_mark *) book_mark_find (edit, edit->curs_line); + if (p->next) { + p = p->next; + if (p->line >= edit->start_line + edit->num_widget_lines || p->line < edit->start_line) + edit_move_display (edit, p->line - edit->num_widget_lines / 2); + edit_move_to_line (edit, p->line); + } + } + break; + case CK_Prev_Bookmark: + if (edit->book_mark) { + struct _book_mark *p; + p = (struct _book_mark *) book_mark_find (edit, edit->curs_line); + while (p->line == edit->curs_line) + if (p->prev) + p = p->prev; + if (p->line >= 0) { + if (p->line >= edit->start_line + edit->num_widget_lines || p->line < edit->start_line) + edit_move_display (edit, p->line - edit->num_widget_lines / 2); + edit_move_to_line (edit, p->line); + } + } + break; + case CK_Beginning_Of_Text: case CK_Beginning_Of_Text_Highlight: edit_move_to_top (edit); @@ -2241,6 +2293,7 @@ int edit_execute_cmd (WEdit * edit, int command, int char_for_insertion) #ifndef MIDNIGHT case CK_Sort: case CK_Mail: + case CK_Find_File: #endif case CK_Complete: case CK_Cancel: @@ -2250,6 +2303,16 @@ int edit_execute_cmd (WEdit * edit, int command, int char_for_insertion) case CK_Save_And_Quit: case CK_Check_Save_And_Quit: case CK_Run_Another: + case CK_Debug_Start: + case CK_Debug_Stop: + case CK_Debug_Toggle_Break: + case CK_Debug_Clear: + case CK_Debug_Next: + case CK_Debug_Step: + case CK_Debug_Back_Trace: + case CK_Debug_Continue: + case CK_Debug_Enter_Command: + case CK_Debug_Until_Curser: result = 0; break; case CK_Menu: diff --git a/gtkedit/edit.h b/gtkedit/edit.h index 819d25a59..facb023b9 100644 --- a/gtkedit/edit.h +++ b/gtkedit/edit.h @@ -16,7 +16,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ #ifndef __EDIT_H #define __EDIT_H @@ -79,7 +81,11 @@ # endif # endif +#ifdef GTK # include +#else +# include "regex.h" +#endif #endif @@ -110,6 +116,7 @@ #else # include "src/main.h" /* for char *shell */ +# include "src/mad.h" # include "src/dlg.h" # include "src/widget.h" # include "src/color.h" @@ -166,7 +173,7 @@ #define SEARCH_DIALOG_OPTION_NO_CASE 4 #define SEARCH_DIALOG_OPTION_BACKWARDS 8 -#define SYNTAX_FILE "/.cedit/syntax" +#define SYNTAX_FILE "/.cedit/Syntax" #define CLIP_FILE "/.cedit/cooledit.clip" #define MACRO_FILE "/.cedit/cooledit.macros" #define BLOCK_FILE "/.cedit/cooledit.block" @@ -281,7 +288,7 @@ struct key_word { char last; char *whole_word_chars_left; char *whole_word_chars_right; -#define NO_COLOR ((unsigned long) -1); +#define NO_COLOR 0xFFFFFFFF int line_start; int bg; int fg; @@ -313,6 +320,14 @@ struct _syntax_marker { struct _syntax_marker *next; }; +struct _book_mark { + int line; /* line number */ +#define BOOK_MARK_COLOR ((5 << 8) + 26) /* cyan on white */ + int c; /* colour */ + struct _book_mark *next; + struct _book_mark *prev; +}; + struct editor_widget { #ifdef MIDNIGHT Widget widget; @@ -381,6 +396,8 @@ struct editor_widget { int line_numbers[N_LINE_CACHES]; long line_offsets[N_LINE_CACHES]; + struct _book_mark *book_mark; + /* undo stack and pointers */ unsigned long stack_pointer; long *undo_stack; @@ -420,7 +437,7 @@ void edit_change_directory (void); int edit_man_page_cmd (WEdit * edit); void edit_search_replace_dialog (Window parent, int x, int y, char **search_text, char **replace_text, char **arg_order, char *heading, int option); void edit_search_dialog (WEdit * edit, char **search_text); -long edit_find (long search_start, unsigned char *expr, int *len, long last_byte, int (*get_byte) (void *, long), void *data); +long edit_find (long search_start, unsigned char *expr, int *len, long last_byte, int (*get_byte) (void *, long), void *data, void *d); void edit_set_foreground_colors (unsigned long normal, unsigned long bold, unsigned long italic); void edit_set_background_colors (unsigned long normal, unsigned long abnormal, unsigned long marked, unsigned long marked_abnormal, unsigned long highlighted); void edit_set_cursor_color (unsigned long c); @@ -557,6 +574,16 @@ void edit_free_syntax_rules (WEdit * edit); void edit_get_syntax_color (WEdit * edit, long byte_index, int *fg, int *bg); +void book_mark_insert (WEdit * edit, int line, int c); +int book_mark_query_color (WEdit * edit, int line, int c); +int book_mark_query_all (WEdit * edit, int line, int *c); +struct _book_mark *book_mark_find (WEdit * edit, int line); +void book_mark_clear (WEdit * edit, int line, int c); +void book_mark_flush (WEdit * edit, int c); +void book_mark_inc (WEdit * edit, int line); +void book_mark_dec (WEdit * edit, int line); + + #ifdef MIDNIGHT /* put OS2/NT/WIN95 defines here */ diff --git a/gtkedit/editcmd.c b/gtkedit/editcmd.c index 63cff660b..4c0a1a76f 100644 --- a/gtkedit/editcmd.c +++ b/gtkedit/editcmd.c @@ -16,7 +16,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ /* #define PIPE_BLOCKS_SO_READ_BYTE_BY_BYTE */ @@ -54,7 +56,7 @@ int edit_confirm_save = 1; int edit_confirm_save = 0; #endif -#define NUM_REPL_ARGS 16 +#define NUM_REPL_ARGS 64 #define MAX_REPL_LEN 1024 #if defined(MIDNIGHT) || defined(GTK) @@ -807,7 +809,7 @@ int edit_new_cmd (WEdit * edit) { edit->force |= REDRAW_COMPLETELY; if (edit->modified) - if (edit_query_dialog2 (_(" Warning "), _(" Current text was modified without a file save. \n Continue discards these changes. "), _("Continue"), _("Cancel"))) + if (edit_query_dialog2 (_ (" Warning "), _ (" Current text was modified without a file save. \n Continue discards these changes. "), _ ("Continue"), _ ("Cancel"))) return 0; edit->modified = 0; return edit_renew (edit); /* if this gives an error, something has really screwed up */ @@ -826,7 +828,7 @@ int edit_load_file_from_filename (WEdit *edit, char *exp) return 0; } else { /* Heads the 'Load' file dialog box */ - edit_error_dialog (_(" Load "), get_sys_error (_(" Error trying to open file for reading "))); + edit_error_dialog (_ (" Load "), get_sys_error (_ (" Error trying to open file for reading "))); } return 1; } @@ -837,10 +839,10 @@ int edit_load_cmd (WEdit * edit) edit->force |= REDRAW_COMPLETELY; if (edit->modified) - if (edit_query_dialog2 (_(" Warning "), _(" Current text was modified without a file save. \n Continue discards these changes. "), _("Continue"), _("Cancel"))) + if (edit_query_dialog2 (_ (" Warning "), _ (" Current text was modified without a file save. \n Continue discards these changes. "), _ ("Continue"), _ ("Cancel"))) return 0; - exp = edit_get_load_file (edit->dir, edit->filename, _(" Load ")); + exp = edit_get_load_file (edit->dir, edit->filename, _ (" Load ")); if (exp) { if (*exp) @@ -984,7 +986,7 @@ void edit_block_move_cmd (WEdit * edit) return; if ((end_mark - start_mark) > option_max_undo / 2) - if (edit_query_dialog2 (_(" Warning "), _(" Block is large, you may not be able to undo this action. "), _("Continue"), _("Cancel"))) + if (edit_query_dialog2 (_ (" Warning "), _ (" Block is large, you may not be able to undo this action. "), _ ("Continue"), _ ("Cancel"))) return; edit_push_markers (edit); @@ -1081,7 +1083,7 @@ int edit_block_delete (WEdit * edit) edit_mark_cmd (edit, 0); if ((end_mark - start_mark) > option_max_undo / 2) /* Warning message with a query to continue or cancel the operation */ - if (edit_query_dialog2 (_(" Warning "), _(" Block is large, you may not be able to undo this action. "), _(" Continue "), _(" Cancel "))) + if (edit_query_dialog2 (_ (" Warning "), _ (" Block is large, you may not be able to undo this action. "), _ (" Continue "), _ (" Cancel "))) return 1; edit_push_markers (edit); edit_cursor_move (edit, start_mark - edit->curs1); @@ -1315,7 +1317,6 @@ void edit_search_dialog (WEdit * edit, char **search_text) } } - #else #define B_ENTER 0 @@ -1355,13 +1356,15 @@ void edit_search_replace_dialog (Window parent, int x, int y, char **search_text (CDrawText ("replace.t2", win, xh, yh, _(" Enter replace text : ")))->hotkey = 'n'; CGetHintPos (0, &yh); (CDrawTextInput ("replace.rinp", win, xh, yh, 10, AUTO_HEIGHT, 256, *replace_text))->hotkey = 'n'; + CSetToolHint ("replace.t2", _("You can enter regexp substrings with %s (not \\1, \\2 like sed) then use \"Enter...order\"")); + CSetToolHint ("replace.rinp", _("You can enter regexp substrings with %s (not \\1, \\2 like sed) then use \"Enter...order\"")); CGetHintPos (0, &yh); - (CDrawText ("replace.t3", win, xh, yh, _(" Enter argument order : ")))->hotkey = 'o'; + (CDrawText ("replace.t3", win, xh, yh, _(" Enter argument (or substring) order : ")))->hotkey = 'o'; CGetHintPos (0, &yh); (CDrawTextInput ("replace.ainp", win, xh, yh, 10, AUTO_HEIGHT, 256, *arg_order))->hotkey = 'o'; /* Tool hint */ - CSetToolHint ("replace.ainp", _("Enter the order of replacement of your scanf format specifiers")); - CSetToolHint ("replace.t3", _("Enter the order of replacement of your scanf format specifiers")); + CSetToolHint ("replace.ainp", _("Enter the order of replacement of your scanf format specifiers or regexp substrings")); + CSetToolHint ("replace.t3", _("Enter the order of replacement of your scanf format specifiers or regexp substrings")); } CGetHintPos (0, &yh); ys = yh; @@ -1609,14 +1612,20 @@ long sargs[NUM_REPL_ARGS][256 / sizeof (long)]; sargs[argord[8]], sargs[argord[9]], sargs[argord[10]], sargs[argord[11]], \ sargs[argord[12]], sargs[argord[13]], sargs[argord[14]], sargs[argord[15]] + /* This function is a modification of mc-3.2.10/src/view.c:regexp_view_search() */ /* returns -3 on error in pattern, -1 on not found, found_len = 0 if either */ -int string_regexp_search (char *pattern, char *string, int len, int match_type, int match_bol, int icase, int *found_len) +int string_regexp_search (char *pattern, char *string, int len, int match_type, int match_bol, int icase, int *found_len, void *d) { static regex_t r; - regmatch_t pmatch[1]; static char *old_pattern = NULL; static int old_type, old_icase; + regmatch_t *pmatch; + static regmatch_t s[1]; + + pmatch = (regmatch_t *) d; + if (!pmatch) + pmatch = s; if (!old_pattern || strcmp (old_pattern, pattern) || old_type != match_type || old_icase != icase) { if (old_pattern) { @@ -1632,7 +1641,7 @@ int string_regexp_search (char *pattern, char *string, int len, int match_type, old_type = match_type; old_icase = icase; } - if (regexec (&r, string, 1, pmatch, ((match_bol || match_type != match_normal) ? 0 : REG_NOTBOL)) != 0) { + if (regexec (&r, string, d ? NUM_REPL_ARGS : 1, pmatch, ((match_bol || match_type != match_normal) ? 0 : REG_NOTBOL)) != 0) { *found_len = 0; return -1; } @@ -1643,7 +1652,7 @@ int string_regexp_search (char *pattern, char *string, int len, int match_type, /* thanks to Liviu Daia for getting this (and the above) routines to work properly - paul */ -long edit_find_string (long start, unsigned char *exp, int *len, long last_byte, int (*get_byte) (void *, long), void *data, int once_only) +long edit_find_string (long start, unsigned char *exp, int *len, long last_byte, int (*get_byte) (void *, long), void *data, int once_only, void *d) { long p, q = 0; long l = strlen ((char *) exp), f = 0; @@ -1734,7 +1743,7 @@ long edit_find_string (long start, unsigned char *exp, int *len, long last_byte, buf = mbuf; while (q) { - found_start = string_regexp_search ((char *) exp, (char *) buf, q, match_normal, match_bol, !replace_case, len); + found_start = string_regexp_search ((char *) exp, (char *) buf, q, match_normal, match_bol, !replace_case, len, d); if (found_start <= -2) { /* regcomp/regexec error */ *len = 0; @@ -1800,13 +1809,13 @@ long edit_find_string (long start, unsigned char *exp, int *len, long last_byte, } -long edit_find_forwards (long search_start, unsigned char *exp, int *len, long last_byte, int (*get_byte) (void *, long), void *data, int once_only) +long edit_find_forwards (long search_start, unsigned char *exp, int *len, long last_byte, int (*get_byte) (void *, long), void *data, int once_only, void *d) { /*front end to find_string to check for whole words */ long p; p = search_start; - while ((p = edit_find_string (p, exp, len, last_byte, get_byte, data, once_only)) >= 0) { + while ((p = edit_find_string (p, exp, len, last_byte, get_byte, data, once_only, d)) >= 0) { if (replace_whole) { /*If the bordering chars are not in option_whole_chars_search then word is whole */ if (!strcasechr (option_whole_chars_search, (*get_byte) (data, p - 1)) @@ -1823,18 +1832,18 @@ long edit_find_forwards (long search_start, unsigned char *exp, int *len, long l return p; } -long edit_find (long search_start, unsigned char *exp, int *len, long last_byte, int (*get_byte) (void *, long), void *data) +long edit_find (long search_start, unsigned char *exp, int *len, long last_byte, int (*get_byte) (void *, long), void *data, void *d) { long p; if (replace_backwards) { while (search_start >= 0) { - p = edit_find_forwards (search_start, exp, len, last_byte, get_byte, data, 1); + p = edit_find_forwards (search_start, exp, len, last_byte, get_byte, data, 1, d); if (p == search_start) return p; search_start--; } } else { - return edit_find_forwards (search_start, exp, len, last_byte, get_byte, data, 0); + return edit_find_forwards (search_start, exp, len, last_byte, get_byte, data, 0, d); } return -2; } @@ -1948,6 +1957,7 @@ static void regexp_error (WEdit *edit) /* call with edit = 0 before shutdown to close memory leaks */ void edit_replace_cmd (WEdit * edit, int again) { + static regmatch_t pmatch[NUM_REPL_ARGS]; static char *old1 = NULL; static char *old2 = NULL; static char *old3 = NULL; @@ -1976,7 +1986,6 @@ void edit_replace_cmd (WEdit * edit, int again) } return; } - last_search = edit->last_byte; edit->force |= REDRAW_COMPLETELY; @@ -2045,7 +2054,7 @@ void edit_replace_cmd (WEdit * edit, int again) int len = 0; long new_start; new_start = edit_find (edit->search_start, (unsigned char *) exp1, &len, last_search, - (int (*) (void *, long)) edit_get_byte, (void *) edit); + (int (*)(void *, long)) edit_get_byte, (void *) edit, pmatch); if (new_start == -3) { regexp_error (edit); break; @@ -2095,8 +2104,20 @@ void edit_replace_cmd (WEdit * edit, int again) } } if (replace_yes) { /* delete then insert new */ - if (replace_scanf) { + if (replace_scanf || replace_regexp) { char repl_str[MAX_REPL_LEN + 2]; + if (replace_regexp) { /* we need to fill in sargs just like with scanf */ + int k, j; + for (k = 1; k < NUM_REPL_ARGS && pmatch[k].rm_eo >= 0; k++) { + unsigned char *t; + t = (unsigned char *) &sargs[k - 1][0]; + for (j = 0; j < pmatch[k].rm_eo - pmatch[k].rm_so && j < 255; j++, t++) + *t = (unsigned char) edit_get_byte (edit, edit->search_start - pmatch[0].rm_so + pmatch[k].rm_so + j); + *t = '\0'; + } + for (; k <= NUM_REPL_ARGS; k++) + sargs[k - 1][0] = 0; + } if (sprintf_p (repl_str, exp2, PRINTF_ARGS) >= 0) { times_replaced++; while (i--) @@ -2104,9 +2125,9 @@ void edit_replace_cmd (WEdit * edit, int again) while (repl_str[++i]) edit_insert (edit, repl_str[i]); } else { - edit_error_dialog (_(" Replace "), + edit_error_dialog (_ (" Replace "), /* "Invalid regexp string or scanf string" */ - _(" Error in replacement format string. ")); + _ (" Error in replacement format string. ")); replace_continue = 0; } } else { @@ -2134,10 +2155,10 @@ void edit_replace_cmd (WEdit * edit, int again) edit->force |= REDRAW_PAGE; edit_render_keypress (edit); if (times_replaced) { - sprintf (fin_string, _(" %ld replacements made. "), times_replaced); - edit_message_dialog (_(" Replace "), fin_string); + sprintf (fin_string, _ (" %ld replacements made. "), times_replaced); + edit_message_dialog (_ (" Replace "), fin_string); } else - edit_message_dialog (_(" Replace "), _(" Search string not found. ")); + edit_message_dialog (_ (" Replace "), _ (" Search string not found. ")); replace_continue = 0; } } while (replace_continue); @@ -2189,7 +2210,7 @@ void edit_search_cmd (WEdit * edit, int again) edit->search_start++; edit->search_start = edit_find (edit->search_start, (unsigned char *) exp, &len, edit->last_byte, - (int (*)(void *, long)) edit_get_byte, (void *) edit); + (int (*)(void *, long)) edit_get_byte, (void *) edit, 0); if (edit->search_start >= 0) { edit->found_start = edit->search_start; diff --git a/gtkedit/editcmddef.h b/gtkedit/editcmddef.h index dff26c667..b7d789f92 100644 --- a/gtkedit/editcmddef.h +++ b/gtkedit/editcmddef.h @@ -47,7 +47,7 @@ #define CK_Remove 204 #define CK_Unmark 206 #define CK_Save_Block 207 -#define CK_Column_Mark 208 +#define CK_Column_Mark 208 /* search and replace */ #define CK_Find 301 @@ -55,6 +55,18 @@ #define CK_Replace 303 #define CK_Replace_Again 304 +/* debugger commands */ +#define CK_Debug_Start 350 +#define CK_Debug_Stop 351 +#define CK_Debug_Toggle_Break 352 +#define CK_Debug_Clear 353 +#define CK_Debug_Next 354 +#define CK_Debug_Step 355 +#define CK_Debug_Back_Trace 356 +#define CK_Debug_Continue 357 +#define CK_Debug_Enter_Command 358 +#define CK_Debug_Until_Curser 359 + /* misc */ #define CK_Insert_File 401 #define CK_Exit 402 @@ -72,6 +84,9 @@ #define CK_Cancel 414 #define CK_Complete 415 #define CK_Paragraph_Format 416 +#define CK_Util 417 +#define CK_Type_Load_Python 418 +#define CK_Find_File 419 /* application control */ #define CK_Save_Desktop 451 @@ -81,13 +96,19 @@ #define CK_Save_And_Quit 455 #define CK_Run_Another 456 #define CK_Check_Save_And_Quit 457 -#define CK_Maximise 458 +#define CK_Maximize 458 /* macro */ #define CK_Begin_Record_Macro 501 #define CK_End_Record_Macro 502 #define CK_Delete_Macro 503 +/* book mark */ +#define CK_Toggle_Bookmark 550 +#define CK_Flush_Bookmarks 551 +#define CK_Next_Bookmark 552 +#define CK_Prev_Bookmark 553 + /* highlight commands */ #define CK_Page_Up_Highlight 604 #define CK_Page_Down_Highlight 605 @@ -108,8 +129,8 @@ #define CK_Paragraph_Up_Highlight 620 #define CK_Paragraph_Down_Highlight 621 -/* X clipboard operations */ +/* X clipboard operations */ #define CK_XStore 701 #define CK_XCut 702 #define CK_XPaste 703 diff --git a/gtkedit/editdraw.c b/gtkedit/editdraw.c index b864e1cf6..b4fff9ce9 100644 --- a/gtkedit/editdraw.c +++ b/gtkedit/editdraw.c @@ -16,7 +16,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ #include #include "edit.h" @@ -103,12 +105,10 @@ void rerender_text (CWidget * wdt); #ifdef GTK -void edit_status (WEdit * edit) +void edit_status (WEdit *edit) { GtkEntry *entry; - GtkWidget *widget; int w, i, t; - char id[33]; char s[160]; w = edit->num_widget_columns - 1; if (w > 150) @@ -119,7 +119,7 @@ void edit_status (WEdit * edit) if (w > 1) { i = w > 24 ? 18 : w - 6; i = i < 13 ? 13 : i; - sprintf (s, "%s", name_trunc (edit->filename ? edit->filename : "", i)); + sprintf (s, "%s", (char *) name_trunc (edit->filename ? edit->filename : "", i)); i = strlen (s); s[i] = ' '; s[i + 1] = ' '; @@ -291,11 +291,6 @@ void edit_set_cursor_color (unsigned long c) #else -#define BOLD_COLOR MARKED_COLOR -#define UNDERLINE_COLOR VIEW_UNDERLINED_COLOR -#define MARK_COLOR SELECTED_COLOR -#define DEF_COLOR NORMAL_COLOR - static void set_color (int font) { attrset (font); @@ -309,7 +304,7 @@ static void print_to_widget (WEdit * edit, long row, int start_col, float start_ int x1 = start_col + EDIT_TEXT_HORIZONTAL_OFFSET; int y = row + EDIT_TEXT_VERTICAL_OFFSET; - set_color (DEF_COLOR); + set_color (EDITOR_NORMAL_COLOR); edit_move (x1, y); hline (' ', end_col + 1 - EDIT_TEXT_HORIZONTAL_OFFSET - x1); @@ -329,15 +324,15 @@ static void print_to_widget (WEdit * edit, long row, int start_col, float start_ if (style & MOD_ABNORMAL) textchar = '.'; if (style & MOD_HIGHLIGHTED) { - set_color (BOLD_COLOR); + set_color (EDITOR_BOLD_COLOR); } else if (style & MOD_MARKED) { - set_color (MARK_COLOR); + set_color (EDITOR_MARKED_COLOR); } if (style & MOD_UNDERLINED) { - set_color (UNDERLINE_COLOR); + set_color (EDITOR_UNDERLINED_COLOR); } if (style & MOD_BOLD) { - set_color (BOLD_COLOR); + set_color (EDITOR_BOLD_COLOR); } addch (textchar); p++; @@ -354,7 +349,12 @@ static void edit_draw_this_line (WEdit * edit, long b, long row, long start_col, int col, start_col_real; unsigned int c; int fg, bg; - int i; + int i, book_mark = -1; + +#if 0 + if (!book_mark_query (edit, edit->start_line + row, &book_mark)) + book_mark = -1; +#endif edit_get_syntax_color (edit, b - 1, &fg, &bg); q = edit_move_forward3 (edit, b, start_col - edit->start_col, 0); @@ -384,9 +384,13 @@ static void edit_draw_this_line (WEdit * edit, long b, long row, long start_col, if (q >= edit->found_start && q < edit->found_start + edit->found_len) *p |= MOD_HIGHLIGHTED * 256; c = edit_get_byte (edit, q); - edit_get_syntax_color (edit, q, &fg, &bg); /* we don't use bg for mc - fg contains both */ - *p |= fg << 16; + if (book_mark == -1) { + edit_get_syntax_color (edit, q, &fg, &bg); + *p |= fg << 16; + } else { + *p |= book_mark << 16; + } q++; switch (c) { case '\n': @@ -470,6 +474,7 @@ void render_edit_text (WEdit * edit, long start_row, long start_column, long end #ifndef MIDNIGHT static unsigned long prev_win = 0; #endif + int force = edit->force; long b; @@ -585,6 +590,7 @@ void render_edit_text (WEdit * edit, long start_row, long start_column, long end #endif #endif exit_render: + return; } diff --git a/gtkedit/editmenu.c b/gtkedit/editmenu.c index 53277758e..b7e796147 100644 --- a/gtkedit/editmenu.c +++ b/gtkedit/editmenu.c @@ -16,8 +16,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ #include #include "edit.h" @@ -389,37 +390,42 @@ void CDrawEditMenuButtons (const char *ident, Window parent, Window focus_return CDrawMenuButton (catstrs (ident, ".filemenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 8, /* The following are menu options. Do not change the key bindings (eg. C-o) and preserve '\t' */ _(" File "), - _("Open...\tC-o"), '~', menu_cmd, CK_Load, - _("New\tC-n"), '~', menu_cmd, CK_New, - "", ' ', 0, 0, - _("Save\tF2"), '~', menu_cmd, CK_Save, - _("Save as...\tF12"), '~', menu_cmd, CK_Save_As, - "", ' ', 0, 0, - _("Insert file...\tF15"), '~', menu_cmd, CK_Insert_File, - _("Copy to file...\tC-f"), '~', menu_cmd, CK_Save_Block + _("Open...\tC-o"), '~', menu_cmd, (unsigned long) CK_Load, + _("New\tC-n"), '~', menu_cmd, (unsigned long) CK_New, + "", ' ', (void *) 0, 0L, + _("Save\tF2"), '~', menu_cmd, (unsigned long) CK_Save, + _("Save as...\tF12"), '~', menu_cmd, (unsigned long) CK_Save_As, + "", ' ', (void *) 0, 0L, + _("Insert file...\tF15"), '~', menu_cmd, (unsigned long) CK_Insert_File, + _("Copy to file...\tC-f"), '~', menu_cmd, (unsigned long) CK_Save_Block ); /* Tool hint */ CSetToolHint (catstrs (ident, ".filemenu", 0), _("Disk operations")); CGetHintPos (&x, &d); - CDrawMenuButton (catstrs (ident, ".editmenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 15, + CDrawMenuButton (catstrs (ident, ".editmenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 20, _(" Edit "), - _("Toggle mark\tF3"), '~', menu_cmd, CK_Mark, - _("Toggle mark columns\tC-b"), '~', menu_cmd, CK_Column_Mark, - "", ' ', 0, 0, - _("Toggle insert/overwrite\tIns"), '~', menu_cmd, CK_Toggle_Insert, - "", ' ', 0, 0, - _("Copy block to cursor\tF5"), '~', menu_cmd, CK_Copy, - _("Move block to cursor\tF6"), '~', menu_cmd, CK_Move, - _("Delete block\tF8/C-Del"), '~', menu_cmd, CK_Remove, - "", ' ', 0, 0, - _("Copy block to clipbrd\tC-Ins"), '~', menu_cmd, CK_XStore, - _("Cut block to clipbrd\tS-Del"), '~', menu_cmd, CK_XCut, - _("Paste block from clipbrd\tS-Ins"), '~', menu_cmd, CK_XPaste, - _("Selection history\tM-Ins"), '~', menu_cmd, CK_Selection_History, - "", ' ', 0, 0, - _("Undo\tC-BackSpace"), '~', menu_cmd, CK_Undo + _("Toggle mark\tF3"), '~', menu_cmd, (unsigned long) CK_Mark, + _("Toggle mark columns\tC-b"), '~', menu_cmd, (unsigned long) CK_Column_Mark, + "", ' ', (void *) 0, 0L, + _("Toggle book mark\tC-M-Ins"), '~', menu_cmd, (unsigned long) CK_Toggle_Bookmark, + _("Previous book mark\tC-M-Up"), '~', menu_cmd, (unsigned long) CK_Prev_Bookmark, + _("Next book mark\tC-M-Down"), '~', menu_cmd, (unsigned long) CK_Next_Bookmark, + _("Flush book marks"), '~', menu_cmd, (unsigned long) CK_Flush_Bookmarks, + "", ' ', (void *) 0, 0L, + _("Toggle insert/overwrite\tIns"), '~', menu_cmd, (unsigned long) CK_Toggle_Insert, + "", ' ', (void *) 0, 0L, + _("Copy block to cursor\tF5"), '~', menu_cmd, (unsigned long) CK_Copy, + _("Move block to cursor\tF6"), '~', menu_cmd, (unsigned long) CK_Move, + _("Delete block\tF8/C-Del"), '~', menu_cmd, (unsigned long) CK_Remove, + "", ' ', (void *) 0, 0L, + _("Copy block to clipbrd\tC-Ins"), '~', menu_cmd, (unsigned long) CK_XStore, + _("Cut block to clipbrd\tS-Del"), '~', menu_cmd, (unsigned long) CK_XCut, + _("Paste block from clipbrd\tS-Ins"), '~', menu_cmd, (unsigned long) CK_XPaste, + _("Selection history\tM-Ins"), '~', menu_cmd, (unsigned long) CK_Selection_History, + "", ' ', (void *) 0, 0L, + _("Undo\tC-BackSpace"), '~', menu_cmd, (unsigned long) CK_Undo ); /* Tool hint */ CSetToolHint (catstrs (ident, ".editmenu", 0), _("Manipulating blocks of text")); @@ -428,10 +434,10 @@ void CDrawEditMenuButtons (const char *ident, Window parent, Window focus_return CDrawMenuButton (catstrs (ident, ".searchmenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 4, _(" Srch/Replce "), - _("Search...\tF7"), '~', menu_cmd, CK_Find, - _("Search again\tF17"), '~', menu_cmd, CK_Find_Again, - _("Replace...\tF4"), '~', menu_cmd, CK_Replace, - _("Replace again\tF14"), '~', menu_cmd, CK_Replace_Again + _("Search...\tF7"), '~', menu_cmd, (unsigned long) CK_Find, + _("Search again\tF17"), '~', menu_cmd, (unsigned long) CK_Find_Again, + _("Replace...\tF4"), '~', menu_cmd, (unsigned long) CK_Replace, + _("Replace again\tF14"), '~', menu_cmd, (unsigned long) CK_Replace_Again ); /* Tool hint */ CSetToolHint (catstrs (ident, ".searchmenu", 0), _("Search for and replace text")); @@ -440,17 +446,17 @@ void CDrawEditMenuButtons (const char *ident, Window parent, Window focus_return CDrawMenuButton (catstrs (ident, ".commandmenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 11, _(" Command "), - _("Goto line...\tM-l"), '~', menu_cmd, CK_Goto, - "", ' ', 0, 0, - _("Start record macro\tC-r"), '~', menu_cmd, CK_Begin_Record_Macro, - _("Finish record macro...\tC-r"), '~', menu_cmd, CK_End_Record_Macro, - _("Execute macro...\tC-a, KEY"), '~', menu_ctrl_key, XK_a, - _("Delete macro...\t"), '~', menu_cmd, CK_Delete_Macro, - "", ' ', 0, 0, - _("Insert date/time\tC-d"), '~', menu_cmd, CK_Date, - _("Format paragraph\tM-p"), '~', menu_cmd, CK_Paragraph_Format, - "", ' ', 0, 0, - _("Refresh display\tC-l"), '~', menu_cmd, CK_Refresh + _("Goto line...\tM-l"), '~', menu_cmd, (unsigned long) CK_Goto, + "", ' ', (void *) 0, 0L, + _("Start record macro\tC-r"), '~', menu_cmd, (unsigned long) CK_Begin_Record_Macro, + _("Finish record macro...\tC-r"), '~', menu_cmd, (unsigned long) CK_End_Record_Macro, + _("Execute macro...\tC-a, KEY"), '~', menu_ctrl_key, (unsigned long) XK_a, + _("Delete macro...\t"), '~', menu_cmd, (unsigned long) CK_Delete_Macro, + "", ' ', (void *) 0, 0L, + _("Insert date/time\tC-d"), '~', menu_cmd, (unsigned long) CK_Date, + _("Format paragraph\tM-p"), '~', menu_cmd, (unsigned long) CK_Paragraph_Format, + "", ' ', (void *) 0, 0L, + _("Refresh display\tC-l"), '~', menu_cmd, (unsigned long) CK_Refresh ); /* Tool hint */ CSetToolHint (catstrs (ident, ".commandmenu", 0), _("Macros and internal commands")); diff --git a/gtkedit/editoptions.c b/gtkedit/editoptions.c index 306388719..143c7c03d 100644 --- a/gtkedit/editoptions.c +++ b/gtkedit/editoptions.c @@ -16,7 +16,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ #include #include "edit.h" diff --git a/gtkedit/editwidget.c b/gtkedit/editwidget.c index 76494b016..9709f1b5a 100644 --- a/gtkedit/editwidget.c +++ b/gtkedit/editwidget.c @@ -16,7 +16,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ #include diff --git a/gtkedit/propfont.c b/gtkedit/propfont.c index 020ccffd0..2a078d3ff 100644 --- a/gtkedit/propfont.c +++ b/gtkedit/propfont.c @@ -13,7 +13,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ #include #include "edit.h" @@ -57,6 +59,7 @@ void set_style_color ( { int fgp, bgp; fgp = (s & 0xFF000000UL) >> 24; +/* NO_COLOR would give fgp == 255 */ if (fgp < 255) *fg = color_palette (fgp); else @@ -277,23 +280,41 @@ static inline cache_type get_style (WEdit * edit, long q, int c, long m1, long m return s | ((fg & 0xFF) << 24) | ((bg & 0xFF) << 16); } -void convert_text (WEdit * edit, long q, cache_type *p, int x, int x_max) +void convert_text (WEdit * edit, long q, cache_type * p, int x, int x_max, int row) { int c; cache_type s; long m1, m2; unsigned char *r, text[4]; + int book_mark_colors[10], book_mark, book_mark_cycle = 0, the_end = 0; + eval_marks (edit, &m1, &m2); + + book_mark = book_mark_query_all (edit, edit->start_line + row, book_mark_colors); + for (;;) { c = edit_get_byte (edit, q); - *p = get_style (edit, q, c, m1, m2, x); + if (!the_end) + *p = get_style (edit, q, c, m1, m2, x); + if (book_mark) { + if (the_end) + *p = 0; + *p = (*p & 0x0000FFFF) | (book_mark_colors[book_mark_cycle++ % book_mark] << 16); + } switch (c) { case '\n': - *p++ |= ' '; - *p = 0; - if (x > edit->max_column) - edit->max_column = x; - return; + if (book_mark) { /* bookmarks must show right across the screen */ + the_end = 1; + c = ' '; + q--; + goto the_default; + } else { + *p++ |= ' '; + *p = 0; + if (x > edit->max_column) + edit->max_column = x; + return; + } case '\t': if (fixed_font) { int t; @@ -301,6 +322,10 @@ void convert_text (WEdit * edit, long q, cache_type *p, int x, int x_max) t = min (t, x_max); s = *p; while (x < t) { +#if 0 + if (book_mark) + *p = (*p & 0x0000FFFF) | (book_mark_colors[book_mark_cycle++ % book_mark] << 16); +#endif x += per_char[' ']; *p++ = s | ' '; } @@ -310,6 +335,7 @@ void convert_text (WEdit * edit, long q, cache_type *p, int x, int x_max) } break; default: + the_default: x += convert_to_long_printable (c, text); r = text; s = *p; @@ -557,7 +583,7 @@ cache_type mode_spacing = 0; #define NOT_VALID (-2000000000) void edit_draw_proportional (void *data, - void (*converttext) (void *, long, cache_type *, int, int), + void (*converttext) (void *, long, cache_type *, int, int, int), int calctextpos (void *, long, long *, int), int scroll_right, Window win, @@ -594,7 +620,7 @@ void edit_draw_proportional (void *data, /* q contains the offset in the edit buffer */ /* translate this line into printable characters with a style (=color) high byte */ - (*converttext) (data, q, line, x0, x_max - scroll_right - EDIT_TEXT_HORIZONTAL_OFFSET); + (*converttext) (data, q, line, x0, x_max - scroll_right - EDIT_TEXT_HORIZONTAL_OFFSET, row); /* adjust for the horizontal scroll and border */ x0 += scroll_right + EDIT_TEXT_HORIZONTAL_OFFSET; @@ -693,7 +719,7 @@ void edit_draw_this_line_proportional (WEdit * edit, long b, int row, int start_ edit_get_syntax_color (edit, b - 1, &fg, &bg); edit_draw_proportional (edit, - (void (*) (void *, long, cache_type *, int, int)) convert_text, + (void (*) (void *, long, cache_type *, int, int, int)) convert_text, (int (*) (void *, long, long *, int)) calc_text_pos, edit->start_col, CWindowOf (edit->widget), end_column, b, row, row * FONT_PIX_PER_LINE + EDIT_TEXT_VERTICAL_OFFSET, @@ -799,7 +825,7 @@ int calc_text_len2 (CWidget *w, long b, long upto) int highlight_this_line; /* this is for the text widget (i.e. nroff formatting) */ -void convert_text2 (CWidget * w, long q, cache_type *line, int x, int x_max) +void convert_text2 (CWidget * w, long q, cache_type *line, int x, int x_max, int row) { int c = 0, d; cache_type s, *p; diff --git a/gtkedit/syntax.c b/gtkedit/syntax.c index f6313588e..64493dfe0 100644 --- a/gtkedit/syntax.c +++ b/gtkedit/syntax.c @@ -16,7 +16,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. +*/ #include #if defined(MIDNIGHT) || defined(GTK) @@ -698,15 +700,41 @@ int this_allocate_color (WEdit *edit, char *fg) #endif #endif +static char *error_file_name = 0; + +static FILE *open_include_file (char *filename) +{ + FILE *f; + char p[MAX_PATH_LEN]; + syntax_free (error_file_name); + error_file_name = strdup (filename); + if (*filename == '/') + return fopen (filename, "r"); + strcpy (p, home_dir); + strcat (p, EDIT_DIR "/"); + strcat (p, filename); + syntax_free (error_file_name); + error_file_name = strdup (p); + f = fopen (p, "r"); + if (f) + return f; + strcpy (p, LIBDIR "/syntax/"); + strcat (p, filename); + syntax_free (error_file_name); + error_file_name = strdup (p); + return fopen (p, "r"); +} + /* returns line number on error */ static int edit_read_syntax_rules (WEdit * edit, FILE * f) { + FILE *g = 0; char *fg, *bg; char last_fg[32] = "", last_bg[32] = ""; - char whole_right[256]; - char whole_left[256]; + char whole_right[512]; + char whole_left[512]; char *args[1024], *l = 0; - int line = 0; + int save_line = 0, line = 0; struct context_rule **r, *c; int num_words = -1, num_contexts = -1; int argc, result = 0; @@ -722,12 +750,40 @@ static int edit_read_syntax_rules (WEdit * edit, FILE * f) for (;;) { char **a; line++; - if (!read_one_line (&l, f)) - break; + l = 0; + if (!read_one_line (&l, f)) { + if (g) { + fclose (f); + f = g; + g = 0; + line = save_line + 1; + syntax_free (error_file_name); + if (l) + free (l); + if (!read_one_line (&l, f)) + break; + } else { + break; + } + } get_args (l, args, &argc); a = args + 1; if (!args[0]) { /* do nothing */ + } else if (!strcmp (args[0], "include")) { + if (g || argc != 2) { + result = line; + break; + } + g = f; + f = open_include_file (args[1]); + if (!f) { + syntax_free (error_file_name); + result = line; + break; + } + save_line = line; + line = 0; } else if (!strcmp (args[0], "wholechars")) { check_a; if (!strcmp (*a, "left")) { @@ -956,7 +1012,7 @@ void edit_free_syntax_rules (WEdit * edit) syntax_free (edit->rules); } -#define CURRENT_SYNTAX_RULES_VERSION "44" +#define CURRENT_SYNTAX_RULES_VERSION "48" char *syntax_text[] = { "# syntax rules version " CURRENT_SYNTAX_RULES_VERSION, @@ -978,1955 +1034,63 @@ char *syntax_text[] = { "# brightcyan", "# white", "", -"###############################################################################", +"file gobledy_gook #\\sHelp\\ssupport\\sother\\sfile\\stypes", +"context default", +"file gobledy_gook #\\sby\\scoding\\srules\\sin\\s~/.cedit/syntax.", +"context default", +"file gobledy_gook #\\sSee\\sman/syntax\\sin\\sthe\\ssource\\sdistribution", +"context default", +"file gobledy_gook #\\sand\\sconsult\\sthe\\sman\\spage.", +"context default", +"", +"", "file ..\\*\\\\.diff$ Unified\\sDiff\\sOutput ^diff.\\*(-u|--unified)", -"# yawn", -"context default", -" keyword linestart @@*@@ green/16", -" keyword linestart \\s black/0 white/26", -"context linestart diff \\n white/26 red/9", -"context linestart --- \\n brightmagenta/20", -"context linestart +++ \\n brightmagenta/20", -"context linestart + \\n brightgreen/6", -"context linestart - \\n brightred/18", -"context linestart A \\n white/26 black/0", -"context linestart B \\n white/26 black/0", -"context linestart C \\n white/26 black/0", -"context linestart D \\n white/26 black/0", -"context linestart E \\n white/26 black/0", -"context linestart F \\n white/26 black/0", -"context linestart G \\n white/26 black/0", -"context linestart H \\n white/26 black/0", -"context linestart I \\n white/26 black/0", -"context linestart J \\n white/26 black/0", -"context linestart K \\n white/26 black/0", -"context linestart L \\n white/26 black/0", -"context linestart M \\n white/26 black/0", -"context linestart N \\n white/26 black/0", -"context linestart O \\n white/26 black/0", -"context linestart P \\n white/26 black/0", -"context linestart Q \\n white/26 black/0", -"context linestart R \\n white/26 black/0", -"context linestart S \\n white/26 black/0", -"context linestart T \\n white/26 black/0", -"context linestart U \\n white/26 black/0", -"context linestart V \\n white/26 black/0", -"context linestart W \\n white/26 black/0", -"context linestart X \\n white/26 black/0", -"context linestart Y \\n white/26 black/0", -"context linestart Z \\n white/26 black/0", +"include diff.syntax", +"", +"file ..\\*\\\\.diff$ Context\\sDiff\\sOutput ^diff.\\*(-c|--context)", +"include diffc.syntax", "", -"###############################################################################", "file ..\\*\\\\.lsm$ LSM\\sFile", +"include lsm.syntax", "", -"context default", -" keyword linestart Begin3 brightmagenta/20", -" keyword linestart Title:\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s red/9 yellow/24", -" keyword linestart Version:\\s\\s\\s\\s\\s\\s\\s\\s red/9 yellow/24", -" keyword linestart Entered-date:\\s\\s\\s red/9 yellow/24", -" keyword linestart Description:\\s\\s\\s\\s red/9 yellow/24", -" keyword linestart Keywords:\\s\\s\\s\\s\\s\\s\\s red/9 yellow/24", -" keyword linestart Alternate-site:\\s red/9 yellow/24", -" keyword linestart Primary-site:\\s\\s\\s red/9 yellow/24", -" keyword linestart Original-site:\\s\\s red/9 yellow/24", -" keyword linestart Platforms:\\s\\s\\s\\s\\s\\s red/9 yellow/24", -" keyword linestart Copying-policy:\\s red/9 yellow/24", -" keyword linestart End brightmagenta/20", -"", -" keyword linestart \\t\\t white/26 yellow/24", -" keyword linestart \\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s\\s white/26 yellow/24", -" keyword whole GPL green/6", -" keyword whole BSD green/6", -" keyword whole Shareware green/6", -" keyword whole sunsite.unc.edu green/6", -" keyword wholeright \\s*.tar.gz green/6", -" keyword wholeright \\s*.lsm green/6", -"", -"context linestart Author:\\s\\s\\s\\s\\s\\s\\s\\s\\s \\n brightred/19", -" keyword whole \\s*@*\\s(*) cyan/16", -"", -"context linestart Maintained-by:\\s\\s \\n brightred/19", -" keyword whole \\s*@*\\s(*) cyan/16", -"", -"###############################################################################", "file ..\\*\\\\.sh$ Shell\\sScript ^#!\\s\\*/.\\*/(ksh|bash|sh|pdkzsh)$", +"include sh.syntax", "", -"context default", -" keyword whole for yellow/24", -" keyword whole in yellow/24", -" keyword whole do yellow/24", -" keyword whole done yellow/24", -" keyword whole select yellow/24", -" keyword whole case yellow/24", -" keyword whole esac yellow/24", -" keyword whole if yellow/24", -" keyword whole then yellow/24", -" keyword whole elif yellow/24", -" keyword whole else yellow/24", -" keyword whole fi yellow/24", -" keyword whole while yellow/24", -" keyword whole until yellow/24", -" keyword ;; brightred/18", -" keyword \\\\\" brightred/18", -" keyword \\\\' brightred/18", -" keyword ` brightred/18", -" keyword ; brightcyan/17", -" keyword $(*) brightgreen/16", -" keyword ${*} brightgreen/16", -" keyword { brightcyan/14", -" keyword } brightcyan/14", -"", -" keyword whole linestart #!\\[\\s\\]/bin/\\[abkpct\\]sh brightcyan/17 black/0", -"", -" keyword $\\* brightred/18", -" keyword $@ brightred/18", -" keyword $# brightred/18", -" keyword $? brightred/18", -" keyword $- brightred/18", -" keyword $$ brightred/18", -" keyword $! brightred/18", -" keyword $_ brightred/18", -"", -" keyword wholeright $\\[0123456789\\]0 brightred/18", -" keyword wholeright $\\[0123456789\\]1 brightred/18", -" keyword wholeright $\\[0123456789\\]2 brightred/18", -" keyword wholeright $\\[0123456789\\]3 brightred/18", -" keyword wholeright $\\[0123456789\\]4 brightred/18", -" keyword wholeright $\\[0123456789\\]5 brightred/18", -" keyword wholeright $\\[0123456789\\]6 brightred/18", -" keyword wholeright $\\[0123456789\\]7 brightred/18", -" keyword wholeright $\\[0123456789\\]8 brightred/18", -" keyword wholeright $\\[0123456789\\]9 brightred/18", -"", -" keyword wholeright $+A brightgreen/16", -" keyword wholeright $+B brightgreen/16", -" keyword wholeright $+C brightgreen/16", -" keyword wholeright $+D brightgreen/16", -" keyword wholeright $+E brightgreen/16", -" keyword wholeright $+F brightgreen/16", -" keyword wholeright $+G brightgreen/16", -" keyword wholeright $+H brightgreen/16", -" keyword wholeright $+I brightgreen/16", -" keyword wholeright $+J brightgreen/16", -" keyword wholeright $+K brightgreen/16", -" keyword wholeright $+L brightgreen/16", -" keyword wholeright $+M brightgreen/16", -" keyword wholeright $+N brightgreen/16", -" keyword wholeright $+O brightgreen/16", -" keyword wholeright $+P brightgreen/16", -" keyword wholeright $+Q brightgreen/16", -" keyword wholeright $+R brightgreen/16", -" keyword wholeright $+S brightgreen/16", -" keyword wholeright $+T brightgreen/16", -" keyword wholeright $+U brightgreen/16", -" keyword wholeright $+V brightgreen/16", -" keyword wholeright $+W brightgreen/16", -" keyword wholeright $+X brightgreen/16", -" keyword wholeright $+Y brightgreen/16", -" keyword wholeright $+Z brightgreen/16", -"", -" keyword wholeright $+a brightgreen/16", -" keyword wholeright $+b brightgreen/16", -" keyword wholeright $+c brightgreen/16", -" keyword wholeright $+d brightgreen/16", -" keyword wholeright $+e brightgreen/16", -" keyword wholeright $+f brightgreen/16", -" keyword wholeright $+g brightgreen/16", -" keyword wholeright $+h brightgreen/16", -" keyword wholeright $+i brightgreen/16", -" keyword wholeright $+j brightgreen/16", -" keyword wholeright $+k brightgreen/16", -" keyword wholeright $+l brightgreen/16", -" keyword wholeright $+m brightgreen/16", -" keyword wholeright $+n brightgreen/16", -" keyword wholeright $+o brightgreen/16", -" keyword wholeright $+p brightgreen/16", -" keyword wholeright $+q brightgreen/16", -" keyword wholeright $+r brightgreen/16", -" keyword wholeright $+s brightgreen/16", -" keyword wholeright $+t brightgreen/16", -" keyword wholeright $+u brightgreen/16", -" keyword wholeright $+v brightgreen/16", -" keyword wholeright $+w brightgreen/16", -" keyword wholeright $+x brightgreen/16", -" keyword wholeright $+y brightgreen/16", -" keyword wholeright $+z brightgreen/16", -"", -" keyword wholeright $+0 brightgreen/16", -" keyword wholeright $+1 brightgreen/16", -" keyword wholeright $+2 brightgreen/16", -" keyword wholeright $+3 brightgreen/16", -" keyword wholeright $+4 brightgreen/16", -" keyword wholeright $+5 brightgreen/16", -" keyword wholeright $+6 brightgreen/16", -" keyword wholeright $+7 brightgreen/16", -" keyword wholeright $+8 brightgreen/16", -" keyword wholeright $+9 brightgreen/16", -"", -" keyword $ brightgreen/16", -"", -" keyword wholeleft function*() brightblue/11", -"", -"wholechars right abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._", -"wholechars left abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._", -"", -" keyword whole arch cyan/14", -" keyword whole ash cyan/14", -" keyword whole awk cyan/14", -" keyword whole basename cyan/14", -" keyword whole bash cyan/14", -" keyword whole basnemae cyan/14", -" keyword whole bg_backup cyan/14", -" keyword whole bg_restore cyan/14", -" keyword whole bsh cyan/14", -" keyword whole cat cyan/14", -" keyword whole chgrp cyan/14", -" keyword whole chmod cyan/14", -" keyword whole chown cyan/14", -" keyword whole cp cyan/14", -" keyword whole cpio cyan/14", -" keyword whole csh cyan/14", -" keyword whole date cyan/14", -" keyword whole dd cyan/14", -" keyword whole df cyan/14", -" keyword whole dmesg cyan/14", -" keyword whole dnsdomainname cyan/14", -" keyword whole doexec cyan/14", -" keyword whole domainname cyan/14", -" keyword whole echo cyan/14", -" keyword whole ed cyan/14", -" keyword whole egrep cyan/14", -" keyword whole ex cyan/14", -" keyword whole false cyan/14", -" keyword whole fgrep cyan/14", -" keyword whole fsconf cyan/14", -" keyword whole gawk cyan/14", -" keyword whole grep cyan/14", -" keyword whole gunzip cyan/14", -" keyword whole gzip cyan/14", -" keyword whole hostname cyan/14", -" keyword whole igawk cyan/14", -" keyword whole ipcalc cyan/14", -" keyword whole kill cyan/14", -" keyword whole ksh cyan/14", -" keyword whole linuxconf cyan/14", -" keyword whole ln cyan/14", -" keyword whole login cyan/14", -" keyword whole lpdconf cyan/14", -" keyword whole ls cyan/14", -" keyword whole mail cyan/14", -" keyword whole mkdir cyan/14", -" keyword whole mknod cyan/14", -" keyword whole mktemp cyan/14", -" keyword whole more cyan/14", -" keyword whole mount cyan/14", -" keyword whole mt cyan/14", -" keyword whole mv cyan/14", -" keyword whole netconf cyan/14", -" keyword whole netstat cyan/14", -" keyword whole nice cyan/14", -" keyword whole nisdomainname cyan/14", -" keyword whole ping cyan/14", -" keyword whole ps cyan/14", -" keyword whole pwd cyan/14", -" keyword whole red cyan/14", -" keyword whole remadmin cyan/14", -" keyword whole rm cyan/14", -" keyword whole rmdir cyan/14", -" keyword whole rpm cyan/14", -" keyword whole sed cyan/14", -" keyword whole setserial cyan/14", -" keyword whole sh cyan/14", -" keyword whole sleep cyan/14", -" keyword whole sort cyan/14", -" keyword whole stty cyan/14", -" keyword whole su cyan/14", -" keyword whole sync cyan/14", -" keyword whole taper cyan/14", -" keyword whole tar cyan/14", -" keyword whole tcsh cyan/14", -" keyword whole touch cyan/14", -" keyword whole true cyan/14", -" keyword whole umount cyan/14", -" keyword whole uname cyan/14", -" keyword whole userconf cyan/14", -" keyword whole usleep cyan/14", -" keyword whole vi cyan/14", -" keyword whole view cyan/14", -" keyword whole vim cyan/14", -" keyword whole xconf cyan/14", -" keyword whole ypdomainname cyan/14", -" keyword whole zcat cyan/14", -" keyword whole zsh cyan/14", -"", -"wholechars right abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", -"wholechars left abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_", -"", -"context # \\n brown/22", -"", -"context exclusive whole <\\[\\s\\\\\\]EOF EOF green/6", -"", -"context ' ' green/6", -"", -"context \" \" green/6", -" keyword \\\\' brightgreen/16", -" keyword \\\\\" brightgreen/16", -" keyword $(*) brightgreen/16", -" keyword ${*} brightgreen/16", -" keyword $\\* brightred/18", -" keyword $@ brightred/18", -" keyword $# brightred/18", -" keyword $? brightred/18", -" keyword $- brightred/18", -" keyword $$ brightred/18", -" keyword $! brightred/18", -" keyword $_ brightred/18", -" keyword wholeright $\\[0123456789\\]0 brightred/18", -" keyword wholeright $\\[0123456789\\]1 brightred/18", -" keyword wholeright $\\[0123456789\\]2 brightred/18", -" keyword wholeright $\\[0123456789\\]3 brightred/18", -" keyword wholeright $\\[0123456789\\]4 brightred/18", -" keyword wholeright $\\[0123456789\\]5 brightred/18", -" keyword wholeright $\\[0123456789\\]6 brightred/18", -" keyword wholeright $\\[0123456789\\]7 brightred/18", -" keyword wholeright $\\[0123456789\\]8 brightred/18", -" keyword wholeright $\\[0123456789\\]9 brightred/18", -"", -" keyword wholeright $+A brightgreen/16", -" keyword wholeright $+B brightgreen/16", -" keyword wholeright $+C brightgreen/16", -" keyword wholeright $+D brightgreen/16", -" keyword wholeright $+E brightgreen/16", -" keyword wholeright $+F brightgreen/16", -" keyword wholeright $+G brightgreen/16", -" keyword wholeright $+H brightgreen/16", -" keyword wholeright $+I brightgreen/16", -" keyword wholeright $+J brightgreen/16", -" keyword wholeright $+K brightgreen/16", -" keyword wholeright $+L brightgreen/16", -" keyword wholeright $+M brightgreen/16", -" keyword wholeright $+N brightgreen/16", -" keyword wholeright $+O brightgreen/16", -" keyword wholeright $+P brightgreen/16", -" keyword wholeright $+Q brightgreen/16", -" keyword wholeright $+R brightgreen/16", -" keyword wholeright $+S brightgreen/16", -" keyword wholeright $+T brightgreen/16", -" keyword wholeright $+U brightgreen/16", -" keyword wholeright $+V brightgreen/16", -" keyword wholeright $+W brightgreen/16", -" keyword wholeright $+X brightgreen/16", -" keyword wholeright $+Y brightgreen/16", -" keyword wholeright $+Z brightgreen/16", -"", -" keyword wholeright $+a brightgreen/16", -" keyword wholeright $+b brightgreen/16", -" keyword wholeright $+c brightgreen/16", -" keyword wholeright $+d brightgreen/16", -" keyword wholeright $+e brightgreen/16", -" keyword wholeright $+f brightgreen/16", -" keyword wholeright $+g brightgreen/16", -" keyword wholeright $+h brightgreen/16", -" keyword wholeright $+i brightgreen/16", -" keyword wholeright $+j brightgreen/16", -" keyword wholeright $+k brightgreen/16", -" keyword wholeright $+l brightgreen/16", -" keyword wholeright $+m brightgreen/16", -" keyword wholeright $+n brightgreen/16", -" keyword wholeright $+o brightgreen/16", -" keyword wholeright $+p brightgreen/16", -" keyword wholeright $+q brightgreen/16", -" keyword wholeright $+r brightgreen/16", -" keyword wholeright $+s brightgreen/16", -" keyword wholeright $+t brightgreen/16", -" keyword wholeright $+u brightgreen/16", -" keyword wholeright $+v brightgreen/16", -" keyword wholeright $+w brightgreen/16", -" keyword wholeright $+x brightgreen/16", -" keyword wholeright $+y brightgreen/16", -" keyword wholeright $+z brightgreen/16", -"", -" keyword wholeright $+0 brightgreen/16", -" keyword wholeright $+1 brightgreen/16", -" keyword wholeright $+2 brightgreen/16", -" keyword wholeright $+3 brightgreen/16", -" keyword wholeright $+4 brightgreen/16", -" keyword wholeright $+5 brightgreen/16", -" keyword wholeright $+6 brightgreen/16", -" keyword wholeright $+7 brightgreen/16", -" keyword wholeright $+8 brightgreen/16", -" keyword wholeright $+9 brightgreen/16", -"", -" keyword $ brightgreen/16", -"", -"context exclusive ` ` white/26 black/0", -" keyword '*' green/6", -" keyword \" green/6", -" keyword ; brightcyan/17", -" keyword $(*) brightgreen/16", -" keyword ${*} brightgreen/16", -" keyword { brightcyan/14", -" keyword } brightcyan/14", -"", -" keyword $\\* brightred/18", -" keyword $@ brightred/18", -" keyword $# brightred/18", -" keyword $? brightred/18", -" keyword $- brightred/18", -" keyword $$ brightred/18", -" keyword $! brightred/18", -" keyword $_ brightred/18", -"", -" keyword wholeright $\\[0123456789\\]0 brightred/18", -" keyword wholeright $\\[0123456789\\]1 brightred/18", -" keyword wholeright $\\[0123456789\\]2 brightred/18", -" keyword wholeright $\\[0123456789\\]3 brightred/18", -" keyword wholeright $\\[0123456789\\]4 brightred/18", -" keyword wholeright $\\[0123456789\\]5 brightred/18", -" keyword wholeright $\\[0123456789\\]6 brightred/18", -" keyword wholeright $\\[0123456789\\]7 brightred/18", -" keyword wholeright $\\[0123456789\\]8 brightred/18", -" keyword wholeright $\\[0123456789\\]9 brightred/18", -"", -" keyword wholeright $+A brightgreen/16", -" keyword wholeright $+B brightgreen/16", -" keyword wholeright $+C brightgreen/16", -" keyword wholeright $+D brightgreen/16", -" keyword wholeright $+E brightgreen/16", -" keyword wholeright $+F brightgreen/16", -" keyword wholeright $+G brightgreen/16", -" keyword wholeright $+H brightgreen/16", -" keyword wholeright $+I brightgreen/16", -" keyword wholeright $+J brightgreen/16", -" keyword wholeright $+K brightgreen/16", -" keyword wholeright $+L brightgreen/16", -" keyword wholeright $+M brightgreen/16", -" keyword wholeright $+N brightgreen/16", -" keyword wholeright $+O brightgreen/16", -" keyword wholeright $+P brightgreen/16", -" keyword wholeright $+Q brightgreen/16", -" keyword wholeright $+R brightgreen/16", -" keyword wholeright $+S brightgreen/16", -" keyword wholeright $+T brightgreen/16", -" keyword wholeright $+U brightgreen/16", -" keyword wholeright $+V brightgreen/16", -" keyword wholeright $+W brightgreen/16", -" keyword wholeright $+X brightgreen/16", -" keyword wholeright $+Y brightgreen/16", -" keyword wholeright $+Z brightgreen/16", -"", -" keyword wholeright $+a brightgreen/16", -" keyword wholeright $+b brightgreen/16", -" keyword wholeright $+c brightgreen/16", -" keyword wholeright $+d brightgreen/16", -" keyword wholeright $+e brightgreen/16", -" keyword wholeright $+f brightgreen/16", -" keyword wholeright $+g brightgreen/16", -" keyword wholeright $+h brightgreen/16", -" keyword wholeright $+i brightgreen/16", -" keyword wholeright $+j brightgreen/16", -" keyword wholeright $+k brightgreen/16", -" keyword wholeright $+l brightgreen/16", -" keyword wholeright $+m brightgreen/16", -" keyword wholeright $+n brightgreen/16", -" keyword wholeright $+o brightgreen/16", -" keyword wholeright $+p brightgreen/16", -" keyword wholeright $+q brightgreen/16", -" keyword wholeright $+r brightgreen/16", -" keyword wholeright $+s brightgreen/16", -" keyword wholeright $+t brightgreen/16", -" keyword wholeright $+u brightgreen/16", -" keyword wholeright $+v brightgreen/16", -" keyword wholeright $+w brightgreen/16", -" keyword wholeright $+x brightgreen/16", -" keyword wholeright $+y brightgreen/16", -" keyword wholeright $+z brightgreen/16", -"", -" keyword wholeright $+0 brightgreen/16", -" keyword wholeright $+1 brightgreen/16", -" keyword wholeright $+2 brightgreen/16", -" keyword wholeright $+3 brightgreen/16", -" keyword wholeright $+4 brightgreen/16", -" keyword wholeright $+5 brightgreen/16", -" keyword wholeright $+6 brightgreen/16", -" keyword wholeright $+7 brightgreen/16", -" keyword wholeright $+8 brightgreen/16", -" keyword wholeright $+9 brightgreen/16", -"", -" keyword $ brightgreen/16", -"", -"wholechars right abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._", -"wholechars left abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._", -"", -" keyword whole arch cyan/14", -" keyword whole ash cyan/14", -" keyword whole awk cyan/14", -" keyword whole basename cyan/14", -" keyword whole bash cyan/14", -" keyword whole basnemae cyan/14", -" keyword whole bg_backup cyan/14", -" keyword whole bg_restore cyan/14", -" keyword whole bsh cyan/14", -" keyword whole cat cyan/14", -" keyword whole chgrp cyan/14", -" keyword whole chmod cyan/14", -" keyword whole chown cyan/14", -" keyword whole cp cyan/14", -" keyword whole cpio cyan/14", -" keyword whole csh cyan/14", -" keyword whole date cyan/14", -" keyword whole dd cyan/14", -" keyword whole df cyan/14", -" keyword whole dmesg cyan/14", -" keyword whole dnsdomainname cyan/14", -" keyword whole doexec cyan/14", -" keyword whole domainname cyan/14", -" keyword whole echo cyan/14", -" keyword whole ed cyan/14", -" keyword whole egrep cyan/14", -" keyword whole ex cyan/14", -" keyword whole false cyan/14", -" keyword whole fgrep cyan/14", -" keyword whole fsconf cyan/14", -" keyword whole gawk cyan/14", -" keyword whole grep cyan/14", -" keyword whole gunzip cyan/14", -" keyword whole gzip cyan/14", -" keyword whole hostname cyan/14", -" keyword whole igawk cyan/14", -" keyword whole ipcalc cyan/14", -" keyword whole kill cyan/14", -" keyword whole ksh cyan/14", -" keyword whole linuxconf cyan/14", -" keyword whole ln cyan/14", -" keyword whole login cyan/14", -" keyword whole lpdconf cyan/14", -" keyword whole ls cyan/14", -" keyword whole mail cyan/14", -" keyword whole mkdir cyan/14", -" keyword whole mknod cyan/14", -" keyword whole mktemp cyan/14", -" keyword whole more cyan/14", -" keyword whole mount cyan/14", -" keyword whole mt cyan/14", -" keyword whole mv cyan/14", -" keyword whole netconf cyan/14", -" keyword whole netstat cyan/14", -" keyword whole nice cyan/14", -" keyword whole nisdomainname cyan/14", -" keyword whole ping cyan/14", -" keyword whole ps cyan/14", -" keyword whole pwd cyan/14", -" keyword whole red cyan/14", -" keyword whole remadmin cyan/14", -" keyword whole rm cyan/14", -" keyword whole rmdir cyan/14", -" keyword whole rpm cyan/14", -" keyword whole sed cyan/14", -" keyword whole setserial cyan/14", -" keyword whole sh cyan/14", -" keyword whole sleep cyan/14", -" keyword whole sort cyan/14", -" keyword whole stty cyan/14", -" keyword whole su cyan/14", -" keyword whole sync cyan/14", -" keyword whole taper cyan/14", -" keyword whole tar cyan/14", -" keyword whole tcsh cyan/14", -" keyword whole touch cyan/14", -" keyword whole true cyan/14", -" keyword whole umount cyan/14", -" keyword whole uname cyan/14", -" keyword whole userconf cyan/14", -" keyword whole usleep cyan/14", -" keyword whole vi cyan/14", -" keyword whole view cyan/14", -" keyword whole vim cyan/14", -" keyword whole xconf cyan/14", -" keyword whole ypdomainname cyan/14", -" keyword whole zcat cyan/14", -" keyword whole zsh cyan/14", -"", -"###############################################################################", "file ..\\*\\\\.(pl|PL])$ Perl\\sProgram ^#!\\s\\*/.\\*/perl$", -"context default", -" keyword whole linestart #!\\[\\s\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/bin/perl brightcyan/17 black/0", -" keyword whole linestart #!\\[\\s\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/bin/perl brightcyan/17 black/0", -" keyword whole linestart #!\\[\\s\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/bin/perl brightcyan/17 black/0", -" keyword whole linestart #!\\[\\s\\]/\\[abcdefghijklmnopqrstuvwxyz\\]/bin/perl brightcyan/17 black/0", -" keyword whole linestart #!\\[\\s\\]/bin/perl brightcyan/17 black/0", +"include perl.syntax", "", -" keyword $_ red/orange", -" keyword $. red/orange", -" keyword $/ red/orange", -" keyword $, red/orange", -" keyword $\" red/orange", -" keyword $\\\\ red/orange", -" keyword $# red/orange", -" keyword $\\* red/orange", -" keyword $? red/orange", -" keyword $] red/orange", -" keyword $[ red/orange", -" keyword $; red/orange", -" keyword $! red/orange", -" keyword $@ red/orange", -" keyword $: red/orange", -" keyword $0 red/orange", -" keyword $$ red/orange", -" keyword $< red/orange", -" keyword $> red/orange", -" keyword $( red/orange", -" keyword $) red/orange", -"", -" keyword $% red/orange", -" keyword $= red/orange", -" keyword $- red/orange", -" keyword $~ red/orange", -" keyword $| red/orange", -" keyword $& red/orange", -" keyword $` red/orange", -" keyword $' red/orange", -" keyword $+ red/orange", -" keyword $11 red/orange", -" keyword $12 red/orange", -" keyword $13 red/orange", -" keyword $14 red/orange", -" keyword $15 red/orange", -" keyword $16 red/orange", -" keyword $17 red/orange", -" keyword $18 red/orange", -" keyword $19 red/orange", -" keyword $20 red/orange", -" keyword $10 red/orange", -" keyword $1 red/orange", -" keyword $2 red/orange", -" keyword $3 red/orange", -" keyword $4 red/orange", -" keyword $5 red/orange", -" keyword $6 red/orange", -" keyword $7 red/orange", -" keyword $8 red/orange", -" keyword $9 red/orange", -" keyword $0 red/orange", -"", -" keyword $^A red/orange", -" keyword $^D red/orange", -" keyword $^E red/orange", -" keyword $^I red/orange", -" keyword $^L red/orange", -" keyword $^P red/orange", -" keyword $^T red/orange", -" keyword $^W red/orange", -" keyword $^X red/orange", -" keyword $^A red/orange", -"", -" keyword @EXPORT red/orange", -" keyword @EXPORT_OK red/orange", -" keyword @INC red/orange", -" keyword @ISA red/orange", -" keyword @_ red/orange", -" keyword @ENV red/orange", -" keyword @OVERLOAD red/orange", -" keyword @SIG red/orange", -"", -" keyword $ brightgreen/15", -" keyword & brightmagenta/19", -" keyword % brightcyan/17", -" keyword @ white/21", -" keyword \\\\\" brightred/18", -" keyword \\\\' brightred/18", -"", -" keyword <+> brightred/18", -" keyword -> yellow/24", -" keyword => yellow/24", -" keyword > yellow/24", -" keyword < yellow/24", -" keyword \\+ yellow/24", -" keyword - yellow/24", -" keyword \\* yellow/24", -" keyword / yellow/24", -" keyword % yellow/24", -" keyword = yellow/24", -" keyword != yellow/24", -" keyword == yellow/24", -" keyword whole ge yellow/24", -" keyword whole le yellow/24", -" keyword whole gt yellow/24", -" keyword whole lt yellow/24", -" keyword whole eq yellow/24", -" keyword whole ne yellow/24", -" keyword whole cmp yellow/24", -" keyword ~ yellow/24", -" keyword { brightcyan/14", -" keyword } brightcyan/14", -" keyword ( brightcyan/15", -" keyword ) brightcyan/15", -" keyword [ brightcyan/14", -" keyword ] brightcyan/14", -" keyword , brightcyan/14", -" keyword .. brightcyan/14", -" keyword : brightcyan/14", -" keyword ; brightmagenta/19", -"", -" keyword whole sub yellow/24", -" keyword whole STDIN brightred/18", -" keyword whole STDOUT brightred/18", -" keyword whole STDERR brightred/18", -" keyword whole STDARGV brightred/18", -" keyword whole DATA brightred/18", -"", -" keyword whole do magenta/23", -" keyword whole if magenta/23", -" keyword whole until magenta/23", -" keyword whole elsif magenta/23", -" keyword whole else magenta/23", -" keyword whole unless magenta/23", -" keyword whole while magenta/23", -" keyword whole foreach magenta/23", -" keyword whole goto magenta/23", -" keyword whole last magenta/23", -" keyword whole next magenta/23", -" keyword whole bless magenta/23", -" keyword whole caller magenta/23", -" keyword whole import magenta/23", -" keyword whole package magenta/23", -" keyword whole require magenta/23", -" keyword whole return magenta/23", -" keyword whole untie magenta/23", -" keyword whole use magenta/23", -"", -" keyword whole diagnostics brightcyan/17", -" keyword whole integer brightcyan/17", -" keyword whole less brightcyan/17", -" keyword whole lib brightcyan/17", -" keyword whole ops brightcyan/17", -" keyword whole overload brightcyan/17", -" keyword whole sigtrap brightcyan/17", -" keyword whole strict brightcyan/17", -" keyword whole vars brightcyan/17", -"", -" keyword whole abs yellow/24", -" keyword whole atan2 yellow/24", -" keyword whole cos yellow/24", -" keyword whole exp yellow/24", -" keyword whole int yellow/24", -" keyword whole log yellow/24", -" keyword whole rand yellow/24", -" keyword whole sin yellow/24", -" keyword whole sqrt yellow/24", -" keyword whole srand yellow/24", -" keyword whole time yellow/24", -" keyword whole chr yellow/24", -" keyword whole gmtime yellow/24", -" keyword whole hex yellow/24", -" keyword whole localtime yellow/24", -" keyword whole oct yellow/24", -" keyword whole ord yellow/24", -" keyword whole vec yellow/24", -" keyword whole pack yellow/24", -" keyword whole unpack yellow/24", -"", -" keyword whole chomp yellow/YellowGreen", -" keyword whole chop yellow/YellowGreen", -" keyword whole crypt yellow/YellowGreen", -" keyword whole eval yellow/YellowGreen", -" keyword whole index yellow/YellowGreen", -" keyword whole length yellow/YellowGreen", -" keyword whole lc yellow/YellowGreen", -" keyword whole lcfirst yellow/YellowGreen", -" keyword whole quotemeta yellow/YellowGreen", -" keyword whole rindex yellow/YellowGreen", -" keyword whole substr yellow/YellowGreen", -" keyword whole uc yellow/YellowGreen", -" keyword whole ucfirst yellow/YellowGreen", -"", -" keyword whole delete yellow/24", -" keyword whole each yellow/24", -" keyword whole exists yellow/24", -" keyword whole grep yellow/24", -" keyword whole join yellow/24", -" keyword whole keys yellow/24", -" keyword whole map yellow/24", -" keyword whole pop yellow/24", -" keyword whole push yellow/24", -" keyword whole reverse yellow/24", -" keyword whole scalar yellow/24", -" keyword whole shift yellow/24", -" keyword whole sort yellow/24", -" keyword whole splice yellow/24", -" keyword whole split yellow/24", -" keyword whole unshift yellow/24", -" keyword whole values yellow/24", -"", -" keyword whole chmod yellow/24", -" keyword whole chown yellow/24", -" keyword whole truncate yellow/24", -" keyword whole link yellow/24", -" keyword whole lstat yellow/24", -" keyword whole mkdir yellow/24", -" keyword whole readlink yellow/24", -" keyword whole rename yellow/24", -" keyword whole rmdir yellow/24", -" keyword whole stat yellow/24", -" keyword whole symlink yellow/24", -" keyword whole unlink yellow/24", -" keyword whole utime yellow/24", -"", -" keyword whole binmade yellow/24", -" keyword whole close yellow/24", -" keyword whole dbmclose yellow/24", -" keyword whole dbmopen yellow/24", -" keyword whole binmade yellow/24", -" keyword whole eof yellow/24", -" keyword whole fcntl yellow/24", -" keyword whole fileno yellow/24", -" keyword whole flock yellow/24", -" keyword whole getc yellow/24", -" keyword whole ioctl yellow/24", -" keyword whole open yellow/24", -" keyword whole pipe yellow/24", -" keyword whole print yellow/24", -" keyword whole printf yellow/24", -" keyword whole read yellow/24", -" keyword whole seek yellow/24", -" keyword whole select yellow/24", -" keyword whole sprintf yellow/24", -" keyword whole sysopen yellow/24", -" keyword whole sysread yellow/24", -" keyword whole syswrite yellow/24", -" keyword whole tell yellow/24", -"", -" keyword whole formline yellow/24", -" keyword whole write yellow/24", -"", -" keyword whole closedir yellow/24", -" keyword whole opendir yellow/24", -" keyword whole readdir yellow/24", -" keyword whole rewinddir yellow/24", -" keyword whole seekdir yellow/24", -" keyword whole telldir yellow/24", -"", -" keyword whole alarm yellow/24", -" keyword whole chdir yellow/24", -" keyword whole chroot yellow/24", -" keyword whole die yellow/24", -" keyword whole exec yellow/24", -" keyword whole exit yellow/24", -" keyword whole fork yellow/24", -" keyword whole getlogin yellow/24", -" keyword whole getpgrp yellow/24", -" keyword whole getppid yellow/24", -" keyword whole getpriority yellow/24", -" keyword whole glob yellow/24", -" keyword whole kill yellow/24", -" keyword whole setpgrp yellow/24", -" keyword whole setpriority yellow/24", -" keyword whole sleep yellow/24", -" keyword whole syscall yellow/24", -" keyword whole system yellow/24", -" keyword whole times yellow/24", -" keyword whole umask yellow/24", -" keyword whole wait yellow/24", -" keyword whole waitpid yellow/24", -" keyword whole warn yellow/24", -"", -" keyword whole accept yellow/24", -" keyword whole bind yellow/24", -" keyword whole connect yellow/24", -" keyword whole getpeername yellow/24", -" keyword whole getsockname yellow/24", -" keyword whole getsockopt yellow/24", -" keyword whole listen yellow/24", -" keyword whole recv yellow/24", -" keyword whole send yellow/24", -" keyword whole setsockopt yellow/24", -" keyword whole shutdown yellow/24", -" keyword whole socket yellow/24", -" keyword whole socketpair yellow/24", -"", -" keyword whole msgctl yellow/24", -" keyword whole msgget yellow/24", -" keyword whole msgsnd yellow/24", -" keyword whole msgrcv yellow/24", -" keyword whole semctl yellow/24", -" keyword whole semget yellow/24", -" keyword whole semop yellow/24", -" keyword whole shmctl yellow/24", -" keyword whole shmget yellow/24", -" keyword whole shmread yellow/24", -" keyword whole shmwrite yellow/24", -"", -" keyword whole defined yellow/24", -" keyword whole dump yellow/24", -" keyword whole eval yellow/24", -" keyword whole local yellow/24", -" keyword whole my yellow/24", -" keyword whole ref yellow/24", -" keyword whole reset yellow/24", -" keyword whole scalar yellow/24", -" keyword whole undef yellow/24", -" keyword whole wantarray yellow/24", -"", -" keyword whole endpwent yellow/24", -" keyword whole getpwent yellow/24", -" keyword whole getpwnam yellow/24", -" keyword whole getpwuid yellow/24", -" keyword whole setpwent yellow/24", -" keyword whole endgrent yellow/24", -" keyword whole getgrgid yellow/24", -" keyword whole getgrnam yellow/24", -" keyword whole getgrent yellow/24", -" keyword whole setgrent yellow/24", -"", -" keyword whole endhostent yellow/24", -" keyword whole gethostbyaddr yellow/24", -" keyword whole gethostbyname yellow/24", -" keyword whole gethostent yellow/24", -" keyword whole sethostent yellow/24", -"", -" keyword whole endnetent yellow/24", -" keyword whole getnetbyaddr yellow/24", -" keyword whole getnetbyname yellow/24", -" keyword whole getnetent yellow/24", -" keyword whole setnetent yellow/24", -" keyword whole endservent yellow/24", -" keyword whole getservbyname yellow/24", -" keyword whole getservbyport yellow/24", -" keyword whole getservent yellow/24", -" keyword whole serservent yellow/24", -" keyword whole endprotoent yellow/24", -" keyword whole getprotobyname yellow/24", -" keyword whole getprotobynumber yellow/24", -" keyword whole getprotoent yellow/24", -" keyword whole setprotoent yellow/24", -"", -"context exclusive whole <\\[\\s\\\\\\]EOF EOF green/6", -"context # \\n brown/22", -"context linestart = =cut brown/22", -"context \" \" green/6", -" keyword \\\\\" brightgreen/16", -" keyword \\\\\\\\ brightgreen/16", -"context ' ' brightgreen/16", -" keyword \\\\' green/6", -" keyword \\\\\\\\ green/6", -"", -"context exclusive ` ` white/26 black/0", -"", -"context whole __END__ guacomale_pudding white/26 black/0", -"", -"###############################################################################", "file ..\\*\\\\.(py|PY])$ Python\\sProgram ^#!\\s\\*/.\\*/python$", -"context default", -" keyword : brightred/18", -" keyword > yellow/24", -" keyword < yellow/24", -" keyword \\+ yellow/24", -" keyword - yellow/24", -" keyword \\* yellow/24", -" keyword / yellow/24", -" keyword % yellow/24", -" keyword = yellow/24", -" keyword != yellow/24", -" keyword == yellow/24", -" keyword { brightcyan/14", -" keyword } brightcyan/14", -" keyword ( brightcyan/15", -" keyword ) brightcyan/15", -" keyword [ brightcyan/14", -" keyword ] brightcyan/14", -" keyword , brightcyan/14", -" keyword : brightcyan/14", -" keyword ; brightmagenta/19", -" keyword whole self brightred/18", -" keyword whole access yellow/24", -" keyword whole and yellow/24", -" keyword whole break yellow/24", -" keyword whole class yellow/24", -" keyword whole continue yellow/24", -" keyword whole def yellow/24", -" keyword whole del yellow/24", -" keyword whole elif yellow/24", -" keyword whole else yellow/24", -" keyword whole except yellow/24", -" keyword whole exec yellow/24", -" keyword whole finally yellow/24", -" keyword whole for yellow/24", -" keyword whole from yellow/24", -" keyword whole global yellow/24", -" keyword whole if yellow/24", -" keyword whole import yellow/24", -" keyword whole in yellow/24", -" keyword whole is yellow/24", -" keyword whole lambda yellow/24", -" keyword whole not yellow/24", -" keyword whole or yellow/24", -" keyword whole pass yellow/24", -" keyword whole print yellow/24", -" keyword whole raise yellow/24", -" keyword whole return yellow/24", -" keyword whole try yellow/24", -" keyword whole while yellow/24", +"include python.syntax", "", -" keyword whole abs brightcyan/17", -" keyword whole apply brightcyan/17", -" keyword whole callable brightcyan/17", -" keyword whole chr brightcyan/17", -" keyword whole cmp brightcyan/17", -" keyword whole coerce brightcyan/17", -" keyword whole compile brightcyan/17", -" keyword whole delattr brightcyan/17", -" keyword whole dir brightcyan/17", -" keyword whole divmod brightcyan/17", -" keyword whole eval brightcyan/17", -" keyword whole exec brightcyan/17", -" keyword whole execfile brightcyan/17", -" keyword whole filter brightcyan/17", -" keyword whole float brightcyan/17", -" keyword whole getattr brightcyan/17", -" keyword whole globals brightcyan/17", -" keyword whole hasattr brightcyan/17", -" keyword whole hash brightcyan/17", -" keyword whole hex brightcyan/17", -" keyword whole id brightcyan/17", -" keyword whole input brightcyan/17", -" keyword whole int brightcyan/17", -" keyword whole len brightcyan/17", -" keyword whole locals brightcyan/17", -" keyword whole long brightcyan/17", -" keyword whole map brightcyan/17", -" keyword whole max brightcyan/17", -" keyword whole min brightcyan/17", -" keyword whole oct brightcyan/17", -" keyword whole open brightcyan/17", -" keyword whole ord brightcyan/17", -" keyword whole pow brightcyan/17", -" keyword whole range brightcyan/17", -" keyword whole raw_input brightcyan/17", -" keyword whole reduce brightcyan/17", -" keyword whole reload brightcyan/17", -" keyword whole repr brightcyan/17", -" keyword whole round brightcyan/17", -" keyword whole setattr brightcyan/17", -" keyword whole str brightcyan/17", -" keyword whole tuple brightcyan/17", -" keyword whole type brightcyan/17", -" keyword whole vars brightcyan/17", -" keyword whole xrange brightcyan/17", -"", -" keyword whole atof magenta/23", -" keyword whole atoi magenta/23", -" keyword whole atol magenta/23", -" keyword whole expandtabs magenta/23", -" keyword whole find magenta/23", -" keyword whole rfind magenta/23", -" keyword whole index magenta/23", -" keyword whole rindex magenta/23", -" keyword whole count magenta/23", -" keyword whole split magenta/23", -" keyword whole splitfields magenta/23", -" keyword whole join magenta/23", -" keyword whole joinfields magenta/23", -" keyword whole strip magenta/23", -" keyword whole swapcase magenta/23", -" keyword whole upper magenta/23", -" keyword whole lower magenta/23", -" keyword whole ljust magenta/23", -" keyword whole rjust magenta/23", -" keyword whole center magenta/23", -" keyword whole zfill magenta/23", -"", -" keyword whole __init__ lightgray/13", -" keyword whole __del__ lightgray/13", -" keyword whole __repr__ lightgray/13", -" keyword whole __str__ lightgray/13", -" keyword whole __cmp__ lightgray/13", -" keyword whole __hash__ lightgray/13", -" keyword whole __call__ lightgray/13", -" keyword whole __getattr__ lightgray/13", -" keyword whole __setattr__ lightgray/13", -" keyword whole __delattr__ lightgray/13", -" keyword whole __len__ lightgray/13", -" keyword whole __getitem__ lightgray/13", -" keyword whole __setitem__ lightgray/13", -" keyword whole __delitem__ lightgray/13", -" keyword whole __getslice__ lightgray/13", -" keyword whole __setslice__ lightgray/13", -" keyword whole __delslice__ lightgray/13", -" keyword whole __add__ lightgray/13", -" keyword whole __sub__ lightgray/13", -" keyword whole __mul__ lightgray/13", -" keyword whole __div__ lightgray/13", -" keyword whole __mod__ lightgray/13", -" keyword whole __divmod__ lightgray/13", -" keyword whole __pow__ lightgray/13", -" keyword whole __lshift__ lightgray/13", -" keyword whole __rshift__ lightgray/13", -" keyword whole __and__ lightgray/13", -" keyword whole __xor__ lightgray/13", -" keyword whole __or__ lightgray/13", -" keyword whole __neg__ lightgray/13", -" keyword whole __pos__ lightgray/13", -" keyword whole __abs__ lightgray/13", -" keyword whole __invert__ lightgray/13", -" keyword whole __nonzero__ lightgray/13", -" keyword whole __coerce__ lightgray/13", -" keyword whole __int__ lightgray/13", -" keyword whole __long__ lightgray/13", -" keyword whole __float__ lightgray/13", -" keyword whole __oct__ lightgray/13", -" keyword whole __hex__ lightgray/13", -"", -" keyword whole __init__ lightgray/13", -" keyword whole __del__ lightgray/13", -" keyword whole __repr__ lightgray/13", -" keyword whole __str__ lightgray/13", -" keyword whole __cmp__ lightgray/13", -" keyword whole __hash__ lightgray/13", -" keyword whole __call__ lightgray/13", -" keyword whole __getattr__ lightgray/13", -" keyword whole __setattr__ lightgray/13", -" keyword whole __delattr__ lightgray/13", -" keyword whole __len__ lightgray/13", -" keyword whole __getitem__ lightgray/13", -" keyword whole __setitem__ lightgray/13", -" keyword whole __delitem__ lightgray/13", -" keyword whole __getslice__ lightgray/13", -" keyword whole __setslice__ lightgray/13", -" keyword whole __delslice__ lightgray/13", -" keyword whole __add__ lightgray/13", -" keyword whole __sub__ lightgray/13", -" keyword whole __mul__ lightgray/13", -" keyword whole __div__ lightgray/13", -" keyword whole __mod__ lightgray/13", -" keyword whole __divmod__ lightgray/13", -" keyword whole __pow__ lightgray/13", -" keyword whole __lshift__ lightgray/13", -" keyword whole __rshift__ lightgray/13", -" keyword whole __and__ lightgray/13", -" keyword whole __xor__ lightgray/13", -" keyword whole __or__ lightgray/13", -" keyword whole __neg__ lightgray/13", -" keyword whole __pos__ lightgray/13", -" keyword whole __abs__ lightgray/13", -" keyword whole __invert__ lightgray/13", -" keyword whole __nonzero__ lightgray/13", -" keyword whole __coerce__ lightgray/13", -" keyword whole __int__ lightgray/13", -" keyword whole __long__ lightgray/13", -" keyword whole __float__ lightgray/13", -" keyword whole __oct__ lightgray/13", -" keyword whole __hex__ lightgray/13", -"", -" keyword whole __radd__ lightgray/13", -" keyword whole __rsub__ lightgray/13", -" keyword whole __rmul__ lightgray/13", -" keyword whole __rdiv__ lightgray/13", -" keyword whole __rmod__ lightgray/13", -" keyword whole __rdivmod__ lightgray/13", -" keyword whole __rpow__ lightgray/13", -" keyword whole __rlshift__ lightgray/13", -" keyword whole __rrshift__ lightgray/13", -" keyword whole __rand__ lightgray/13", -" keyword whole __rxor__ lightgray/13", -" keyword whole __ror__ lightgray/13", -"", -" keyword whole __*__ brightred/18", -"", -"context \"\"\" \"\"\" brown/22", -"context # \\n brown/22", -"context \" \" green/6", -" keyword \\\\\" brightgreen/16", -" keyword %% brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]e brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]E brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]f brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]g brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]G brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]d brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]i brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]o brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]u brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]x brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]X brightgreen/16", -" keyword %\\[hl\\]n brightgreen/16", -" keyword %\\[.\\]\\[0123456789\\]s brightgreen/16", -" keyword %[*] brightgreen/16", -" keyword %c brightgreen/16", -" keyword \\\\\\\\ brightgreen/16", -" keyword \\\\' brightgreen/16", -" keyword \\\\a brightgreen/16", -" keyword \\\\b brightgreen/16", -" keyword \\\\t brightgreen/16", -" keyword \\\\n brightgreen/16", -" keyword \\\\v brightgreen/16", -" keyword \\\\f brightgreen/16", -" keyword \\\\r brightgreen/16", -" keyword \\\\0 brightgreen/16", -"", -"context ' ' green/6", -" keyword \\\\\" brightgreen/16", -" keyword %% brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]e brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]E brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]f brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]g brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]G brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]d brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]i brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]o brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]u brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]x brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]X brightgreen/16", -" keyword %\\[hl\\]n brightgreen/16", -" keyword %\\[.\\]\\[0123456789\\]s brightgreen/16", -" keyword %[*] brightgreen/16", -" keyword %c brightgreen/16", -" keyword \\\\\\\\ brightgreen/16", -" keyword \\\\' brightgreen/16", -" keyword \\\\a brightgreen/16", -" keyword \\\\b brightgreen/16", -" keyword \\\\t brightgreen/16", -" keyword \\\\n brightgreen/16", -" keyword \\\\v brightgreen/16", -" keyword \\\\f brightgreen/16", -" keyword \\\\r brightgreen/16", -" keyword \\\\0 brightgreen/16", -"", -"###############################################################################", "file ..\\*\\\\.(man|[0-9n]|[0-9]x)$ NROFF\\sSource", +"include nroff.syntax", "", -"context default", -" keyword \\\\fP brightgreen/6", -" keyword \\\\fR brightgreen/6", -" keyword \\\\fB brightgreen/6", -" keyword \\\\fI brightgreen/6", -" keyword linestart .AS cyan/5", -" keyword linestart .Ar cyan/5", -" keyword linestart .At cyan/5", -" keyword linestart .BE cyan/5", -" keyword linestart .BH cyan/5", -" keyword linestart .BI cyan/5", -" keyword linestart .BR cyan/5", -" keyword linestart .BS cyan/5", -" keyword linestart .Bd cyan/5", -" keyword linestart .Bk cyan/5", -" keyword linestart .Bl cyan/5", -" keyword linestart .Bu cyan/5", -" keyword linestart .Bx cyan/5", -" keyword linestart .CE cyan/5", -" keyword linestart .CM cyan/5", -" keyword linestart .CS cyan/5", -" keyword linestart .CT cyan/5", -" keyword linestart .CW cyan/5", -" keyword linestart .Cm cyan/5", -" keyword linestart .Co cyan/5", -" keyword linestart .DA cyan/5", -" keyword linestart .DE cyan/5", -" keyword linestart .DS cyan/5", -" keyword linestart .DT cyan/5", -" keyword linestart .Dd cyan/5", -" keyword linestart .De cyan/5", -" keyword linestart .Dl cyan/5", -" keyword linestart .Dq cyan/5", -" keyword linestart .Ds cyan/5", -" keyword linestart .Dt cyan/5", -" keyword linestart .Dv cyan/5", -" keyword linestart .EE cyan/5", -" keyword linestart .EN cyan/5", -" keyword linestart .EQ cyan/5", -" keyword linestart .EX cyan/5", -" keyword linestart .Ed cyan/5", -" keyword linestart .Ee cyan/5", -" keyword linestart .Ek cyan/5", -" keyword linestart .El cyan/5", -" keyword linestart .Em cyan/5", -" keyword linestart .En cyan/5", -" keyword linestart .Ev cyan/5", -" keyword linestart .Ex cyan/5", -" keyword linestart .FI cyan/5", -" keyword linestart .FL cyan/5", -" keyword linestart .FN cyan/5", -" keyword linestart .FT cyan/5", -" keyword linestart .Fi cyan/5", -" keyword linestart .Fl cyan/5", -" keyword linestart .Fn cyan/5", -" keyword linestart .HP cyan/5", -" keyword linestart .HS cyan/5", -" keyword linestart .Hh cyan/5", -" keyword linestart .Hi cyan/5", -" keyword linestart .IB cyan/5", -" keyword linestart .IP cyan/5", -" keyword linestart .IR cyan/5", -" keyword linestart .IX cyan/5", -" keyword linestart .Ic cyan/5", -" keyword linestart .Id cyan/5", -" keyword linestart .Ip cyan/5", -" keyword linestart .It cyan/5", -" keyword linestart .LI cyan/5", -" keyword linestart .LO cyan/5", -" keyword linestart .LP cyan/5", -" keyword linestart .LR cyan/5", -" keyword linestart .Li cyan/5", -" keyword linestart .MF cyan/5", -" keyword linestart .ML cyan/5", -" keyword linestart .MU cyan/5", -" keyword linestart .MV cyan/5", -" keyword linestart .N cyan/5", -" keyword linestart .NF cyan/5", -" keyword linestart .Nd cyan/5", -" keyword linestart .Nm cyan/5", -" keyword linestart .No cyan/5", -" keyword linestart .OP cyan/5", -" keyword linestart .Oc cyan/5", -" keyword linestart .Oo cyan/5", -" keyword linestart .Op cyan/5", -" keyword linestart .Os cyan/5", -" keyword linestart .PD cyan/5", -" keyword linestart .PN cyan/5", -" keyword linestart .PP cyan/5", -" keyword linestart .PU cyan/5", -" keyword linestart .Pa cyan/5", -" keyword linestart .Pf cyan/5", -" keyword linestart .Pp cyan/5", -" keyword linestart .Pq cyan/5", -" keyword linestart .Pr cyan/5", -" keyword linestart .Ps cyan/5", -" keyword linestart .Ql cyan/5", -" keyword linestart .RB cyan/5", -" keyword linestart .RE cyan/5", -" keyword linestart .RI cyan/5", -" keyword linestart .RS cyan/5", -" keyword linestart .RT cyan/5", -" keyword linestart .Re cyan/5", -" keyword linestart .Rs cyan/5", -" keyword linestart .SB cyan/5", -" keyword linestart .SH cyan/5", -" keyword linestart .SM cyan/5", -" keyword linestart .SP cyan/5", -" keyword linestart .SS cyan/5", -" keyword linestart .Sa cyan/5", -" keyword linestart .Sh cyan/5", -" keyword linestart .Sm cyan/5", -" keyword linestart .Sp cyan/5", -" keyword linestart .Sq cyan/5", -" keyword linestart .Ss cyan/5", -" keyword linestart .St cyan/5", -" keyword linestart .Sx cyan/5", -" keyword linestart .Sy cyan/5", -" keyword linestart .TE cyan/5", -" keyword linestart .TH cyan/5", -" keyword linestart .TP cyan/5", -" keyword linestart .TQ cyan/5", -" keyword linestart .TS cyan/5", -" keyword linestart .Tn cyan/5", -" keyword linestart .Tp cyan/5", -" keyword linestart .UC cyan/5", -" keyword linestart .Uh cyan/5", -" keyword linestart .Ux cyan/5", -" keyword linestart .VE cyan/5", -" keyword linestart .VS cyan/5", -" keyword linestart .Va cyan/5", -" keyword linestart .Vb cyan/5", -" keyword linestart .Ve cyan/5", -" keyword linestart .Xc cyan/5", -" keyword linestart .Xe cyan/5", -" keyword linestart .Xr cyan/5", -" keyword linestart .YN cyan/5", -" keyword linestart .ad cyan/5", -" keyword linestart .am cyan/5", -" keyword linestart .bd cyan/5", -" keyword linestart .bp cyan/5", -" keyword linestart .br cyan/5", -" keyword linestart .ce cyan/5", -" keyword linestart .cs cyan/5", -" keyword linestart .de cyan/5", -" keyword linestart .ds cyan/5", -" keyword linestart .ec cyan/5", -" keyword linestart .eh cyan/5", -" keyword linestart .el cyan/5", -" keyword linestart .eo cyan/5", -" keyword linestart .ev cyan/5", -" keyword linestart .fc cyan/5", -" keyword linestart .fi cyan/5", -" keyword linestart .ft cyan/5", -" keyword linestart .hy cyan/5", -" keyword linestart .iX cyan/5", -" keyword linestart .ie cyan/5", -" keyword linestart .if cyan/5", -" keyword linestart .ig cyan/5", -" keyword linestart .in cyan/5", -" keyword linestart .ll cyan/5", -" keyword linestart .lp cyan/5", -" keyword linestart .ls cyan/5", -" keyword linestart .mk cyan/5", -" keyword linestart .na cyan/5", -" keyword linestart .ne cyan/5", -" keyword linestart .nf cyan/5", -" keyword linestart .nh cyan/5", -" keyword linestart .nr cyan/5", -" keyword linestart .ns cyan/5", -" keyword linestart .oh cyan/5", -" keyword linestart .ps cyan/5", -" keyword linestart .re cyan/5", -" keyword linestart .rm cyan/5", -" keyword linestart .rn cyan/5", -" keyword linestart .rr cyan/5", -" keyword linestart .so cyan/5", -" keyword linestart .sp cyan/5", -" keyword linestart .ss cyan/5", -" keyword linestart .ta cyan/5", -" keyword linestart .ti cyan/5", -" keyword linestart .tm cyan/5", -" keyword linestart .tr cyan/5", -" keyword linestart .ul cyan/5", -" keyword linestart .vs cyan/5", -" keyword linestart .zZ cyan/5", -" keyword linestart .e cyan/5", -" keyword linestart .d cyan/5", -" keyword linestart .h cyan/5", -" keyword linestart .B cyan/5", -" keyword linestart .I cyan/5", -" keyword linestart .R cyan/5", -" keyword linestart .P cyan/5", -" keyword linestart .L cyan/5", -" keyword linestart .V cyan/5", -" keyword linestart .F cyan/5", -" keyword linestart .T cyan/5", -" keyword linestart .X cyan/5", -" keyword linestart .Y cyan/5", -" keyword linestart .b cyan/5", -" keyword linestart .l cyan/5", -" keyword linestart .i cyan/5", -"", -"context exclusive linestart .SH \\n brightred/18", -"context exclusive linestart .TH \\n brightred/18", -"context exclusive linestart .B \\n magenta/23", -"context exclusive linestart .I \\n yellow/24", -"context exclusive linestart .nf linestart .fi green/15", -"", -"# font changes should end in a \\fP", -"context exclusive \\\\fB \\\\fP magenta/23", -"context exclusive \\\\fI \\\\fP yellow/24", -"context linestart .\\\\\" \\n brown/22", -"", -"###############################################################################", -"# Assumes you've set a dark background, e.g. navy blue.", "file ..\\*\\\\.(htm|html|HTM|HTML)$ HTML\\sFile", +"include html.syntax", "", -"context default white/25", -" keyword whole &*; brightgreen/16", -"context white/26", -"context < > brightcyan/17", -" keyword \"http:*\" magenta/22", -" keyword \"ftp:*\" magenta/22", -" keyword \"mailto:*\" magenta/22", -" keyword \"gopher:*\" magenta/22", -" keyword \"telnet:*\" magenta/22", -" keyword \"file:*\" magenta/22", -" keyword \"*.gif\" brightred/19", -" keyword \"*.jpg\" brightred/19", -" keyword \"*.png\" brightred/19", -" keyword \"*\" cyan/5", +"file ..\\*\\\\.(pp|PP|pas|PAS|)$ Pascal Program", +"include pascal.syntax", "", -"###############################################################################", -"# Pascal (BP7 IDE alike)", -"file ..\\*\\\\.(pp|PP|pas|PAS)$ Pascal Program", -"context default yellow/24", -" keyword whole absolute white/25", -" keyword whole and white/25", -" keyword whole array white/25", -" keyword whole as white/25", -" keyword whole asm white/25", -" keyword whole assembler white/25", -" keyword whole begin white/25", -" keyword whole break white/25", -" keyword whole case white/25", -" keyword whole class white/25", -" keyword whole const white/25", -" keyword whole continue white/25", -" keyword whole constructor white/25", -" keyword whole destructor white/25", -" keyword whole dispose white/25", -" keyword whole div white/25", -" keyword whole do white/25", -" keyword whole downto white/25", -" keyword whole else white/25", -" keyword whole end white/25", -" keyword whole except white/25", -" keyword whole exit white/25", -" keyword whole export white/25", -" keyword whole exports white/25", -" keyword whole external white/25", -" keyword whole fail white/25", -" keyword whole far white/25", -" keyword whole false white/25", -" keyword whole file white/25", -" keyword whole finally white/25", -" keyword whole for white/25", -" keyword whole forward white/25", -" keyword whole function white/25", -" keyword whole goto white/25", -" keyword whole if white/25", -" keyword whole implementation white/25", -" keyword whole in white/25", -" keyword whole inherited white/25", -" keyword whole initialization white/25", -" keyword whole inline white/25", -" keyword whole interface white/25", -" keyword whole interrupt white/25", -" keyword whole is white/25", -" keyword whole label white/25", -" keyword whole library white/25", -" keyword whole mod white/25", -" keyword whole near white/25", -" keyword whole new white/25", -" keyword whole nil white/25", -" keyword whole not white/25", -" keyword whole object white/25", -" keyword whole of white/25", -" keyword whole on white/25", -" keyword whole operator white/25", -" keyword whole or white/25", -" keyword whole otherwise white/25", -" keyword whole packed white/25", -" keyword whole procedure white/25", -" keyword whole program white/25", -" keyword whole property white/25", -" keyword whole raise white/25", -" keyword whole record white/25", -" keyword whole repeat white/25", -" keyword whole self white/25", -" keyword whole set white/25", -" keyword whole shl white/25", -" keyword whole shr white/25", -" keyword whole string white/25", -" keyword whole then white/25", -" keyword whole to white/25", -" keyword whole true white/25", -" keyword whole try white/25", -" keyword whole type white/25", -" keyword whole unit white/25", -" keyword whole until white/25", -" keyword whole uses white/25", -" keyword whole var white/25", -" keyword whole virtual white/25", -" keyword whole while white/25", -" keyword whole with white/25", -" keyword whole xor white/25", -" keyword whole .. white/25", -" ", -" keyword > cyan/5", -" keyword < cyan/5", -" keyword \\+ cyan/5", -" keyword - cyan/5", -" keyword / cyan/5", -" keyword % cyan/5", -" keyword = cyan/5", -" keyword [ cyan/5", -" keyword ] cyan/5", -" keyword ( cyan/5", -" keyword ) cyan/5", -" keyword , cyan/5", -" keyword . cyan/5", -" keyword : cyan/5", -" keyword ; cyan/5", -" keyword {$*} brightred/19", -"", -"context ' ' brightcyan/22", -"context // \\n brown/22", -"context (\\* \\*) brown/22", -"# context {$ } brightred/19", -"# keyword \\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\\]\\[-\\+\\] brightgreen/16", -"# keyword $* brightgreen/16", -"context { } lightgray/22", -"", -"", -"###############################################################################", "file ..\\*\\\\.tex$ LaTeX\\s2.09\\sDocument", -"context default", -"wholechars left \\\\ ", -"wholechars right abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", +"include latex.syntax", "", -"# type style", -" keyword whole \\\\tiny yellow/24", -" keyword whole \\\\scriptsize yellow/24", -" keyword whole \\\\footnotesize yellow/24", -" keyword whole \\\\small yellow/24", -" keyword whole \\\\normalsize yellow/24", -" keyword whole \\\\large yellow/24", -" keyword whole \\\\Large yellow/24", -" keyword whole \\\\LARGE yellow/24", -" keyword whole \\\\huge yellow/24", -" keyword whole \\\\Huge yellow/24", -"", -"# accents and symbols", -" keyword whole \\\\`{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\'{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\^{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\\"{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\~{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\={\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\.{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\u{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\v{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\H{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\t{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\c{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\d{\\[aeiouAEIOU\\]} yellow/24", -" keyword whole \\\\b{\\[aeiouAEIOU\\]} yellow/24", -"", -" keyword whole \\\\dag yellow/24", -" keyword whole \\\\ddag yellow/24", -" keyword whole \\\\S yellow/24", -" keyword whole \\\\P yellow/24", -" keyword whole \\\\copyright yellow/24", -" keyword whole \\\\pounds yellow/24", -"", -"# sectioning and table of contents", -" keyword whole \\\\part[*]{*} brightred/19", -" keyword whole \\\\part{*} brightred/19", -" keyword whole \\\\part\\*{*} brightred/19", -" keyword whole \\\\chapter[*]{*} brightred/19", -" keyword whole \\\\chapter{*} brightred/19", -" keyword whole \\\\chapter\\*{*} brightred/19", -" keyword whole \\\\section[*]{*} brightred/19", -" keyword whole \\\\section{*} brightred/19", -" keyword whole \\\\section\\*{*} brightred/19", -" keyword whole \\\\subsection[*]{*} brightred/19", -" keyword whole \\\\subsection{*} brightred/19", -" keyword whole \\\\subsection\\*{*} brightred/19", -" keyword whole \\\\subsubsection[*]{*} brightred/19", -" keyword whole \\\\subsubsection{*} brightred/19", -" keyword whole \\\\subsubsection\\*{*} brightred/19", -" keyword whole \\\\paragraph[*]{*} brightred/19", -" keyword whole \\\\paragraph{*} brightred/19", -" keyword whole \\\\paragraph\\*{*} brightred/19", -" keyword whole \\\\subparagraph[*]{*} brightred/19", -" keyword whole \\\\subparagraph{*} brightred/19", -" keyword whole \\\\subparagraph\\*{*} brightred/19", -"", -" keyword whole \\\\appendix brightred/19", -" keyword whole \\\\tableofcontents brightred/19", -"", -"# misc", -" keyword whole \\\\item[*] yellow/24", -" keyword whole \\\\item yellow/24", -" keyword whole \\\\\\\\ yellow/24", -" keyword \\\\\\s yellow/24 black/0", -" keyword %% yellow/24", -"", -"# docuement and page styles ", -" keyword whole \\\\documentstyle[*]{*} yellow/20", -" keyword whole \\\\documentstyle{*} yellow/20", -" keyword whole \\\\pagestyle{*} yellow/20", -"", -"# cross references", -" keyword whole \\\\label{*} yellow/24", -" keyword whole \\\\ref{*} yellow/24", -"", -"# bibliography and citations", -" keyword whole \\\\bibliography{*} yellow/24", -" keyword whole \\\\bibitem[*]{*} yellow/24", -" keyword whole \\\\bibitem{*} yellow/24", -" keyword whole \\\\cite[*]{*} yellow/24", -" keyword whole \\\\cite{*} yellow/24", -"", -"# splitting the input", -" keyword whole \\\\input{*} yellow/20", -" keyword whole \\\\include{*} yellow/20", -" keyword whole \\\\includeonly{*} yellow/20", -"", -"# line breaking", -" keyword whole \\\\linebreak[\\[01234\\]] yellow/24", -" keyword whole \\\\nolinebreak[\\[01234\\]] yellow/24", -" keyword whole \\\\linebreak yellow/24", -" keyword whole \\\\nolinebreak yellow/24", -" keyword whole \\\\[+] yellow/24", -" keyword whole \\\\- yellow/24", -" keyword whole \\\\sloppy yellow/24", -"", -"# page breaking", -" keyword whole \\\\pagebreak[\\[01234\\]] yellow/24", -" keyword whole \\\\nopagebreak[\\[01234\\]] yellow/24", -" keyword whole \\\\pagebreak yellow/24", -" keyword whole \\\\nopagebreak yellow/24", -" keyword whole \\\\samepage yellow/24", -" keyword whole \\\\newpage yellow/24", -" keyword whole \\\\clearpage yellow/24", -"", -"# defintiions", -" keyword \\\\newcommand{*}[*] cyan/5", -" keyword \\\\newcommand{*} cyan/5", -" keyword \\\\newenvironment{*}[*]{*} cyan/5", -" keyword \\\\newenvironment{*}{*} cyan/5", -"", -"# boxes", -"", -"# begins and ends", -" keyword \\\\begin{document} brightred/14", -" keyword \\\\begin{equation} brightred/14", -" keyword \\\\begin{eqnarray} brightred/14", -" keyword \\\\begin{quote} brightred/14", -" keyword \\\\begin{quotation} brightred/14", -" keyword \\\\begin{center} brightred/14", -" keyword \\\\begin{verse} brightred/14", -" keyword \\\\begin{verbatim} brightred/14", -" keyword \\\\begin{itemize} brightred/14", -" keyword \\\\begin{enumerate} brightred/14", -" keyword \\\\begin{description} brightred/14", -" keyword \\\\begin{list} brightred/14", -" keyword \\\\begin{array} brightred/14", -" keyword \\\\begin{tabular} brightred/14", -" keyword \\\\begin{thebibliography}{*} brightred/14", -" keyword \\\\begin{sloppypar} brightred/14", -"", -" keyword \\\\end{document} brightred/14", -" keyword \\\\end{equation} brightred/14", -" keyword \\\\end{eqnarray} brightred/14", -" keyword \\\\end{quote} brightred/14", -" keyword \\\\end{quotation} brightred/14", -" keyword \\\\end{center} brightred/14", -" keyword \\\\end{verse} brightred/14", -" keyword \\\\end{verbatim} brightred/14", -" keyword \\\\end{itemize} brightred/14", -" keyword \\\\end{enumerate} brightred/14", -" keyword \\\\end{description} brightred/14", -" keyword \\\\end{list} brightred/14", -" keyword \\\\end{array} brightred/14", -" keyword \\\\end{tabular} brightred/14", -" keyword \\\\end{thebibliography}{*} brightred/14", -" keyword \\\\end{sloppypar} brightred/14", -"", -" keyword \\\\begin{*} brightcyan/16", -" keyword \\\\end{*} brightcyan/16", -"", -" keyword \\\\theorem{*}{*} yellow/24", -"", -"# if all else fails", -" keyword whole \\\\+[*]{*}{*}{*} brightcyan/17", -" keyword whole \\\\+[*]{*}{*} brightcyan/17", -" keyword whole \\\\+{*}{*}{*}{*} brightcyan/17", -" keyword whole \\\\+{*}{*}{*} brightcyan/17", -" keyword whole \\\\+{*}{*} brightcyan/17", -" keyword whole \\\\+{*} brightcyan/17", -" keyword \\\\\\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\\]\\n brightcyan/17", -" keyword \\\\\\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\\]\\s brightcyan/17", -" keyword \\\\\\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\\]\\t brightcyan/17", -"", -"context \\\\pagenumbering{ } yellow/20", -" keyword arabic brightcyan/17", -" keyword roman brightcyan/17", -" keyword alph brightcyan/17", -" keyword Roman brightcyan/17", -" keyword Alph brightcyan/17", -"", -"context % \\n brown/22", -"", -"# mathematical formulas", -"context $ $ brightgreen/6", -"context exclusive \\\\begin{equation} \\\\end{equation} brightgreen/6", -"context exclusive \\\\begin{eqnarray} \\\\end{eqnarray} brightgreen/6", -"", -"", -"###############################################################################", "file ..\\*\\\\.([chC]|CC|cxx|cc|cpp|CPP|CXX)$ C/C\\+\\+\\sProgram", -"context default", -" keyword whole auto yellow/24", -" keyword whole break yellow/24", -" keyword whole case yellow/24", -" keyword whole char yellow/24", -" keyword whole const yellow/24", -" keyword whole continue yellow/24", -" keyword whole default yellow/24", -" keyword whole do yellow/24", -" keyword whole double yellow/24", -" keyword whole else yellow/24", -" keyword whole enum yellow/24", -" keyword whole extern yellow/24", -" keyword whole float yellow/24", -" keyword whole for yellow/24", -" keyword whole goto yellow/24", -" keyword whole if yellow/24", -" keyword whole int yellow/24", -" keyword whole long yellow/24", -" keyword whole register yellow/24", -" keyword whole return yellow/24", -" keyword whole short yellow/24", -" keyword whole signed yellow/24", -" keyword whole sizeof yellow/24", -" keyword whole static yellow/24", -" keyword whole struct yellow/24", -" keyword whole switch yellow/24", -" keyword whole typedef yellow/24", -" keyword whole union yellow/24", -" keyword whole unsigned yellow/24", -" keyword whole void yellow/24", -" keyword whole volatile yellow/24", -" keyword whole while yellow/24", -" keyword whole asm yellow/24", -" keyword whole catch yellow/24", -" keyword whole class yellow/24", -" keyword whole friend yellow/24", -" keyword whole delete yellow/24", -" keyword whole inline yellow/24", -" keyword whole new yellow/24", -" keyword whole operator yellow/24", -" keyword whole private yellow/24", -" keyword whole protected yellow/24", -" keyword whole public yellow/24", -" keyword whole this yellow/24", -" keyword whole throw yellow/24", -" keyword whole template yellow/24", -" keyword whole try yellow/24", -" keyword whole virtual yellow/24", -" keyword whole bool yellow/24", -" keyword whole const_cast yellow/24", -" keyword whole dynamic_cast yellow/24", -" keyword whole explicit yellow/24", -" keyword whole false yellow/24", -" keyword whole mutable yellow/24", -" keyword whole namespace yellow/24", -" keyword whole reinterpret_cast yellow/24", -" keyword whole static_cast yellow/24", -" keyword whole true yellow/24", -" keyword whole typeid yellow/24", -" keyword whole typename yellow/24", -" keyword whole using yellow/24", -" keyword whole wchar_t yellow/24", -" keyword whole ... yellow/24", +"include c.syntax", "", -" keyword /\\* brown/22", -" keyword \\*/ brown/22", +"file ..\\*\\\\.(java|JAVA|Java|jav)$ Java\\sProgram", +"include java.syntax", "", -" keyword '\\s' brightgreen/16", -" keyword '+' brightgreen/16", -" keyword > yellow/24", -" keyword < yellow/24", -" keyword \\+ yellow/24", -" keyword - yellow/24", -" keyword \\* yellow/24", -"# keyword / yellow/24", -" keyword % yellow/24", -" keyword = yellow/24", -" keyword != yellow/24", -" keyword == yellow/24", -" keyword { brightcyan/14", -" keyword } brightcyan/14", -" keyword ( brightcyan/15", -" keyword ) brightcyan/15", -" keyword [ brightcyan/14", -" keyword ] brightcyan/14", -" keyword , brightcyan/14", -" keyword : brightcyan/14", -" keyword ; brightmagenta/19", -"context exclusive /\\* \\*/ brown/22", -"context // \\n brown/22", -"context linestart # \\n brightred/18", -" keyword \\\\\\n yellow/24", -" keyword /\\**\\*/ brown/22", -" keyword \"+\" red/19", -" keyword <+> red/19", -"context \" \" green/6", -" keyword \\\\\" brightgreen/16", -" keyword %% brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]e brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]E brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]f brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]g brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[L\\]G brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]d brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]i brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]o brightgreen/16", -" keyword %\\[0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]u brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]x brightgreen/16", -" keyword %\\[#0\\s-\\+,\\]\\[0123456789\\]\\[.\\]\\[0123456789\\]\\[hl\\]X brightgreen/16", -" keyword %\\[hl\\]n brightgreen/16", -" keyword %\\[.\\]\\[0123456789\\]s brightgreen/16", -" keyword %[*] brightgreen/16", -" keyword %c brightgreen/16", -" keyword \\\\\\\\ brightgreen/16", -" keyword \\\\' brightgreen/16", -" keyword \\\\a brightgreen/16", -" keyword \\\\b brightgreen/16", -" keyword \\\\t brightgreen/16", -" keyword \\\\n brightgreen/16", -" keyword \\\\v brightgreen/16", -" keyword \\\\f brightgreen/16", -" keyword \\\\r brightgreen/16", -" keyword \\\\0 brightgreen/16", +"file ..\\*\\\\.(st)$ SmallTalk\\sProgram", +"include smalltalk.syntax", +"", +"file ..\\*\\\\.(ml|mli|mly|mll|mlp)$ ML\\sProgram", +"include ml.syntax", "", -"###############################################################################", "file .\\*ChangeLog$ GNU\\sDistribution\\sChangeLog\\sFile", +"include changelog.syntax", "", -"context default", -" keyword \\s+() brightmagenta/23", -" keyword \\t+() brightmagenta/23", -"", -"context linestart \\t\\* : brightcyan/17", -"context linestart \\s\\s\\s\\s\\s\\s\\s\\s\\* : brightcyan/17", -"", -"context linestart 19+-+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"context linestart 20+-+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"context linestart Mon\\s+\\s+\\s+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"context linestart Tue\\s+\\s+\\s+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"context linestart Wed\\s+\\s+\\s+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"context linestart Thu\\s+\\s+\\s+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"context linestart Fri\\s+\\s+\\s+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"context linestart Sat\\s+\\s+\\s+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"context linestart Sun\\s+\\s+\\s+\\s \\n yellow/24", -" keyword <+@+> brightred/19", -"", -"", -"###############################################################################", "file .\\*Makefile[\\\\\\.a-z]\\*$ Makefile", -"", -"context default", -" keyword $(*) yellow/24", -" keyword ${*} brightgreen/16", -" keyword whole linestart include magenta", -" keyword whole linestart endif magenta", -" keyword whole linestart ifeq magenta", -" keyword whole linestart ifneq magenta", -" keyword whole linestart else magenta", -" keyword linestart \\t lightgray/13 red", -" keyword whole .PHONY white/25", -" keyword whole .NOEXPORT white/25", -" keyword = white/25", -" keyword : yellow/24", -" keyword \\\\\\n yellow/24", -"# this handles strange cases like @something@@somethingelse@ properly", -" keyword whole @+@ brightmagenta/23 black/0", -" keyword @+@ brightmagenta/23 black/0", -"", -"context linestart # \\n brown/22", -" keyword whole @+@ brightmagenta/23 black/0", -" keyword @+@ brightmagenta/23 black/0", -"", -"context exclusive = \\n brightcyan/17", -" keyword \\\\\\n yellow/24", -" keyword $(*) yellow/24", -" keyword ${*} brightgreen/16", -" keyword linestart \\t lightgray/13 red", -" keyword whole @+@ brightmagenta/23 black/0", -" keyword @+@ brightmagenta/23 black/0", -"", -"context exclusive linestart \\t \\n", -" keyword \\\\\\n yellow/24", -" keyword $(*) yellow/24", -" keyword ${*} brightgreen/16", -" keyword linestart \\t lightgray/13 red", -" keyword whole @+@ brightmagenta/23 black/0", -" keyword @+@ brightmagenta/23 black/0", -"", -"###############################################################################", +"include makefile.syntax", "", "file .\\*syntax$ Syntax\\sHighlighting\\sdefinitions", "", @@ -2952,6 +1116,7 @@ char *syntax_text[] = { " keyword whole wh\\olechars\\[\\t\\s\\]right brightcyan/17", " keyword whole wh\\olechars brightcyan/17", " keyword whole f\\ile brightgreen/6", +" keyword whole in\\clude brightred/18", "", " keyword whole 0 lightgray/0 blue/26", " keyword whole 1 lightgray/1 blue/26", @@ -3000,15 +1165,6 @@ char *syntax_text[] = { "", "context linestart # \\n brown/22", "", -"file \\.\\* Help\\ssupport\\sother\\sfile\\stypes", -"context default", -"file \\.\\* by\\scoding\\srules\\sin\\s~/.cedit/syntax.", -"context default", -"file \\.\\* See\\sman/syntax\\sin\\sthe\\ssource\\sdistribution", -"context default", -"file \\.\\* and\\sconsult\\sthe\\sman\\spage.", -"context default", -"", 0}; @@ -3103,9 +1259,12 @@ static int edit_read_syntax_file (WEdit * edit, char **names, char *syntax_file, int line_error; found_type: line_error = edit_read_syntax_rules (edit, f); - if (line_error) - result = line + line_error; - else { + if (line_error) { + if (!error_file_name) /* an included file */ + result = line + line_error; + else + result = line_error; + } else { syntax_free (edit->syntax_type); edit->syntax_type = strdup (args[2]); if (syntax_change_callback) @@ -3183,8 +1342,9 @@ void edit_load_syntax (WEdit * edit, char **names, char *type) if (r) { char s[80]; edit_free_syntax_rules (edit); - sprintf (s, _ (" Syntax error in file %s on line %d "), f, r); + sprintf (s, _ (" Error in file %s on line %d "), error_file_name ? error_file_name : f, r); edit_error_dialog (_ (" Load syntax file "), s); + syntax_free (error_file_name); return; } } @@ -3210,3 +1370,5 @@ void edit_get_syntax_color (WEdit * edit, long byte_index, int *fg, int *bg) #endif /* !defined(MIDNIGHT) || defined(HAVE_SYNTAXH) */ + + diff --git a/gtkedit/wordproc.c b/gtkedit/wordproc.c index 5b147d875..edca1af8a 100644 --- a/gtkedit/wordproc.c +++ b/gtkedit/wordproc.c @@ -14,7 +14,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. */ #include diff --git a/gtkedit/xdnd.h b/gtkedit/xdnd.h index 227804bb7..98467e5a3 100644 --- a/gtkedit/xdnd.h +++ b/gtkedit/xdnd.h @@ -13,7 +13,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. */ #ifndef _X_DND_H @@ -23,7 +24,10 @@ extern "C" { #endif +/* you can set this to either 2 (which support 0 and 1 as well) or 3 */ #define XDND_VERSION 2 +/* #define XDND_VERSION 3 */ + /* XdndEnter */ #define XDND_THREE 3