├── .gitattributes ├── .gitignore ├── AUTHORS ├── Artistic ├── CMakeLists.txt ├── COPYING ├── HISTORY ├── INSTALL ├── README ├── config ├── ab_c.fte ├── ab_c_os2.fte ├── ab_java.fte ├── ab_perl.fte ├── ab_rexx.fte ├── ab_sh.fte ├── color.fte ├── global.fte ├── k_brief.fte ├── kbd │ ├── k_c.fte │ ├── k_fte.fte │ ├── k_groovy.fte │ ├── k_html.fte │ ├── k_java.fte │ ├── k_perl.fte │ ├── k_rexx.fte │ ├── k_rst.fte │ └── k_sgml.fte ├── m_4gl.fte ├── m_a51.fte ├── m_ada.fte ├── m_asm.fte ├── m_asm370.fte ├── m_basic.fte ├── m_bin.fte ├── m_c.fte ├── m_catbs.fte ├── m_clario.fte ├── m_cmake.fte ├── m_css.fte ├── m_diff.fte ├── m_ebnf.fte ├── m_eiffel.fte ├── m_euphoria.fte ├── m_falcon.fte ├── m_fort90.fte ├── m_fte.fte ├── m_gawk.fte ├── m_groovy.fte ├── m_html.fte ├── m_icon.fte ├── m_idl.fte ├── m_ipf.fte ├── m_java.fte ├── m_ldsgml.fte ├── m_lisaac.fte ├── m_lua.fte ├── m_make.fte ├── m_markup.fte ├── m_merge.fte ├── m_mod3.fte ├── m_msg.fte ├── m_mvsasm.fte ├── m_ocaml.fte ├── m_pascal.fte ├── m_perl.fte ├── m_php.fte ├── m_plain.fte ├── m_py.fte ├── m_resdlg.fte ├── m_rexx.fte ├── m_rpm.fte ├── m_rst.fte ├── m_ruby.fte ├── m_sgml.fte ├── m_sh.fte ├── m_siod.fte ├── m_sl.fte ├── m_sml.fte ├── m_source.fte ├── m_sql.fte ├── m_tcl.fte ├── m_tex.fte ├── m_texi.fte ├── m_text.fte ├── m_unrealscript.fte ├── m_vhdl.fte ├── m_vi.fte ├── m_xml.fte ├── m_xp.fte ├── m_xslt.fte ├── main.fte ├── menu │ ├── m_c.fte │ ├── m_groovy.fte │ ├── m_html.fte │ ├── m_rexx.fte │ ├── m_rst.fte │ └── m_sgml.fte ├── mymain.fte ├── pal_b_kb.fte ├── pal_base.fte ├── pal_blk.fte ├── pal_blue.fte ├── pal_bluez.fte ├── pal_gray.fte ├── pal_nce.fte ├── pal_wht.fte ├── rgbcolor.fte ├── systemmain.fte ├── ui_brief.fte ├── ui_fte.fte ├── ui_k_fte.fte ├── ui_k_joe.fte ├── ui_k_ne.fte ├── ui_k_ws.fte ├── ui_m_fte.fte ├── ui_m_ne.fte ├── ui_m_ws.fte ├── ui_mew.fte ├── ui_ne.fte ├── ui_vi.fte ├── ui_ws.fte └── uicstyle.fte ├── file_id.diz ├── macosx ├── English.lproj │ ├── InfoPlist.strings │ └── MainMenu.nib │ │ ├── classes.nib │ │ ├── info.nib │ │ └── keyedobjects.nib ├── Info.plist ├── eFTE.xcodeproj │ └── project.pbxproj └── efte.icns ├── packaging ├── archlinux │ └── PKGBUILD ├── debian │ ├── README.debian │ ├── builddeb │ ├── cefte.1 │ ├── changelog │ ├── conffiles │ ├── control │ ├── copyright │ ├── efte.1 │ ├── fte-console.dirs │ ├── fte-console.lintian │ ├── fte-console.menu │ ├── fte-console.postinst │ ├── fte-console.suid │ ├── fte-docs.dirs │ ├── fte-docs.menu │ ├── fte-terminal.dirs │ ├── fte-xwindow.dirs │ ├── fte-xwindow.menu │ ├── fte.dirs │ ├── postinst │ ├── postrm │ ├── prerm │ └── rules ├── gentoo │ ├── efte-0.95.ebuild │ ├── efte-0.96.ebuild │ └── efte-0.97.ebuild ├── macports │ └── Portfile ├── rpm │ └── efte.spec ├── shared │ ├── efte.desktop │ ├── efte128x128.xpm │ ├── efte16x16.xpm │ ├── efte16x16_simple.xpm │ ├── efte20x20_simple.xpm │ ├── efte256x256.xpm │ ├── efte32x32.xpm │ ├── efte40x40.xpm │ ├── efte48x48.xpm │ ├── efte512x512.xpm │ ├── efte64x64.xpm │ └── eftewin32.ico ├── source │ └── build.sh └── windows │ └── x86.iss └── src ├── AppController.h ├── AppController.m ├── CMakeLists.txt ├── FTETextAreaView.h ├── FTETextAreaView.m ├── Makefile ├── bin2c.cpp ├── bmps ├── close.bmp ├── copy.bmp ├── cut.bmp ├── errnext.bmp ├── errprev.bmp ├── exit.bmp ├── last.bmp ├── next.bmp ├── open.bmp ├── paste.bmp ├── pastecol.bmp ├── prev.bmp ├── redo.bmp ├── save.bmp ├── tagfind.bmp ├── tagnext.bmp ├── tagpop.bmp ├── tagprev.bmp └── undo.bmp ├── c_bind.cpp ├── c_bind.h ├── c_cmdtab.h ├── c_color.cpp ├── c_color.h ├── c_commands.h ├── c_config.cpp ├── c_config.h ├── c_desktop.cpp ├── c_desktop.h ├── c_fconfig.h ├── c_hilit.cpp ├── c_hilit.h ├── c_history.cpp ├── c_history.h ├── c_mode.cpp ├── c_mode.h ├── cfte.cpp ├── clip.h ├── clip_gpm.cpp ├── clip_no.cpp ├── clip_os2.cpp ├── clip_pm.cpp ├── clip_pmv.cpp ├── clip_vio.cpp ├── clip_x11.cpp ├── clipprog.cpp ├── clipserv.cpp ├── clipserv.def ├── cliputil.cpp ├── cliputil.def ├── cocoa.h ├── cocoa.mm ├── commands.cpp ├── compkeys.cpp ├── con_cocoa.cpp ├── con_i18n.cpp ├── con_i18n.h ├── con_ikcz.h ├── con_linux.cpp ├── con_ncurses.cpp ├── con_nt.cpp ├── con_os2.cpp ├── con_x11.cpp ├── config.h.in ├── conkbd.h ├── console.h ├── defcfg.fte ├── defcfg2.fte ├── dialog.h ├── e_block.cpp ├── e_buffer.cpp ├── e_buffer.h ├── e_cmds.cpp ├── e_cvslog.cpp ├── e_cvslog.h ├── e_file.cpp ├── e_fold.cpp ├── e_line.cpp ├── e_loadsave.cpp ├── e_mark.cpp ├── e_mark.h ├── e_os2.cpp ├── e_print.cpp ├── e_redraw.cpp ├── e_regex.cpp ├── e_regex.h ├── e_search.cpp ├── e_svnlog.cpp ├── e_svnlog.h ├── e_tags.cpp ├── e_tags.h ├── e_trans.cpp ├── e_undo.cpp ├── e_undo.h ├── e_unix.cpp ├── e_win32.cpp ├── egui.cpp ├── egui.h ├── fnmatch.h ├── fte-bcc2.mak ├── fte-cygwin-xf86.mak ├── fte-emx.mak ├── fte-owos2.mak ├── fte-vag.mak ├── fte-x2.mak ├── fte-xwin.mak ├── fte.cpp ├── fte.def ├── fte.h ├── ftepm.def ├── ftepm.rc ├── ftever.h ├── ftewin32.rc ├── g_draw.cpp ├── g_menu.cpp ├── g_nodlg.cpp ├── g_pm.cpp ├── g_text.cpp ├── g_unix_pipe.cpp ├── gui.cpp ├── gui.h ├── h_ada.cpp ├── h_c.cpp ├── h_c.h ├── h_catbs.cpp ├── h_cont.cpp ├── h_fte.cpp ├── h_ipf.cpp ├── h_make.cpp ├── h_msg.cpp ├── h_pascal.cpp ├── h_perl.cpp ├── h_plain.cpp ├── h_rexx.cpp ├── h_sh.cpp ├── h_simple.cpp ├── h_tex.cpp ├── i_ascii.cpp ├── i_ascii.h ├── i_choice.cpp ├── i_choice.h ├── i_complete.cpp ├── i_complete.h ├── i_input.cpp ├── i_input.h ├── i_key.cpp ├── i_key.h ├── i_modelview.cpp ├── i_modelview.h ├── i_oview.cpp ├── i_oview.h ├── i_search.cpp ├── i_search.h ├── i_view.cpp ├── i_view.h ├── icons ├── error.ico ├── ftepm.ico └── ftewin32.ico ├── indent.cpp ├── log.cpp ├── log.h ├── memicmp.cpp ├── menu_text.cpp ├── namemaps.h ├── o_buffer.cpp ├── o_buflist.cpp ├── o_buflist.h ├── o_cvs.cpp ├── o_cvs.h ├── o_cvsbase.cpp ├── o_cvsbase.h ├── o_cvsdiff.cpp ├── o_cvsdiff.h ├── o_directory.cpp ├── o_directory.h ├── o_list.cpp ├── o_list.h ├── o_messages.cpp ├── o_messages.h ├── o_model.cpp ├── o_model.h ├── o_modemap.cpp ├── o_modemap.h ├── o_routine.cpp ├── o_routine.h ├── o_svn.cpp ├── o_svn.h ├── o_svnbase.cpp ├── o_svnbase.h ├── o_svndiff.cpp ├── o_svndiff.h ├── objs.inc ├── owconvert.mak ├── pm_tool.cpp ├── pm_tool.h ├── pmdlg.h ├── pmdlg.rc ├── s_direct.cpp ├── s_direct.h ├── s_files.cpp ├── s_files.h ├── s_string.cpp ├── s_string.h ├── s_util.cpp ├── s_util.h ├── simple.fte ├── sysdep.h ├── view.cpp └── watconvert.cpp /.gitattributes: -------------------------------------------------------------------------------- 1 | # On Windows, some Git clients may normalize all text files' line-endings to 2 | # CRLF, which causes obscure errors when running shell scripts. That is why 3 | # at least *.spec and *.sh need to have LF line-endings always. 4 | *.spec eol=lf 5 | *.sh eol=lf 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.obj 3 | *.exe 4 | *.a 5 | src/config.h 6 | macosx/eFTE.xcodeproj/project.xcworkspace/ 7 | macosx/eFTE.xcodeproj/xcuserdata/ 8 | macosx/build/ 9 | src/.depend.mak 10 | src/bin2c 11 | src/config.h 12 | src/defcfg.h 13 | src/nefte 14 | src/vefte 15 | src/efte 16 | 17 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Current Authors 2 | * Jeremy Cowgar 3 | * Lauri Nurmi 4 | * Timo Sirainen 5 | 6 | Current Contact Method: 7 | https://github.com/lanurmi/efte/ 8 | irc: #efte on irc.freenode.net 9 | 10 | Earlier Authors 11 | * Marko Macek 12 | 13 | Contributors 14 | * F.Jalvingh 15 | * Markus F.X.J. Oberhumer 16 | * Martin Frydl 17 | * S.Pinigin 18 | * Zednek Kabelac 19 | * Don Mahurin 20 | * Lothar Schmidt 21 | 22 | If you feel your name should be listed but it isn't, please contact us. 23 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Build system for eFTE 3 | # 4 | # Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | # 6 | # You may distribute under the terms of either the GNU General Public 7 | # License or the Artistic License, as specified in the README file. 8 | # 9 | 10 | cmake_minimum_required(VERSION 2.4) 11 | 12 | PROJECT( eFTE ) 13 | ADD_SUBDIRECTORY( src ) 14 | 15 | INSTALL( DIRECTORY config 16 | DESTINATION share/efte 17 | FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ 18 | DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE 19 | WORLD_READ WORLD_EXECUTE 20 | PATTERN ".svn" EXCLUDE 21 | PATTERN "*~" EXCLUDE 22 | PATTERN "config/*" ) 23 | 24 | INSTALL( FILES AUTHORS Artistic COPYING HISTORY README 25 | DESTINATION share/doc/efte 26 | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) 27 | 28 | INSTALL( FILES packaging/shared/efte.desktop 29 | DESTINATION share/applications 30 | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) 31 | INSTALL( FILES 32 | packaging/shared/efte16x16.xpm 33 | packaging/shared/efte32x32.xpm 34 | packaging/shared/efte48x48.xpm 35 | packaging/shared/efte64x64.xpm 36 | DESTINATION share/pixmaps 37 | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) 38 | 39 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Please see the wiki for installation information: 2 | 3 | https://github.com/lanurmi/efte/ -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | 2 | eFTE, Version 1.1 3 | 4 | Copyright 2008-2016 by eFTE SF Group. 5 | Copyright 1994-1998 by Marko Macek. 6 | All rights reserved. 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of either: 10 | 11 | a) the GNU General Public License as published by the Free 12 | Software Foundation; either version 2, or (at your option) any 13 | later version, or 14 | 15 | b) the "Artistic License" which comes with this Kit. 16 | 17 | This program is distributed in the hope that it will be useful, 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either 20 | the GNU General Public License or the Artistic License for more details. 21 | 22 | You should have received a copy of the Artistic License with this 23 | Kit, in the file named "Artistic". If not, I'll be glad to provide one. 24 | 25 | You should also have received a copy of the GNU General Public License 26 | along with this program; if not, write to the Free Software 27 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 28 | 29 | ----------------------------------------------------------------------- 30 | 31 | WWW: https://github.com/lanurmi/efte/ 32 | 33 | Current Authors (alphabetical order): 34 | Jeremy Cowgar..... jcowgar 35 | Lauri Nurmi....... lanurmi 36 | 37 | Original Author: Marko Macek 38 | Original URL: http://fte.sourceforge.net 39 | 40 | FTE Contributors: 41 | - Timo Sirainen 42 | - F.Jalvingh 43 | NT/Win95/DOS port. 44 | - Markus F.X.J. Oberhumer 45 | DOS port (DJGPP) 46 | 47 | See file HISTORY for a list of recent changes. 48 | -------------------------------------------------------------------------------- /config/ab_c.fte: -------------------------------------------------------------------------------- 1 | # c language templates 2 | 3 | eventmap C { 4 | # these work well for default indentation settings 5 | # changes may be necessary if you use different indentation 6 | 7 | # typical usage would be typing ifx and . 8 | # useful command here is which adds 9 | # a new line after the current one, and indents it properly. 10 | # in cmode defined as LineAdd; LineIndent; 11 | abbrev 'ifx' { 12 | KillWordPrev; 13 | %if(BSD_BRACE) 14 | InsertString 'if ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 15 | InsertString '{'; LineIndent; LineNew; 16 | %endif 17 | %if(1TBS_BRACE) 18 | InsertString 'if () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 19 | %endif 20 | InsertString '}'; LineIndent; 21 | MoveSavedPos; Fail; # do not insert typed character 22 | } 23 | abbrev 'whx' { 24 | KillWordPrev; 25 | %if(BSD_BRACE) 26 | InsertString 'while ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 27 | InsertString '{'; LineIndent; LineNew; 28 | %endif 29 | %if(1TBS_BRACE) 30 | InsertString 'while () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 31 | %endif 32 | InsertString '}'; LineIndent; 33 | MoveSavedPos; Fail; 34 | } 35 | abbrev 'swx' { 36 | KillWordPrev; 37 | %if(BSD_BRACE) 38 | InsertString 'switch ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 39 | InsertString '{'; LineIndent; LineNew; 40 | %endif 41 | %if(1TBS_BRACE) 42 | InsertString 'switch () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 43 | %endif 44 | InsertString '}'; LineIndent; 45 | MoveSavedPos; Fail; 46 | } 47 | abbrev 'cax' { 48 | KillWordPrev; InsertString 'case :'; LineIndent; LineNew; 49 | InsertString 'break;'; LineIndent; 50 | MoveUp; MoveLineEnd; MovePrev; 51 | Fail; 52 | } 53 | abbrev 'dex' { 54 | KillWordPrev; InsertString 'default:'; LineIndent; 2:LineNew; 55 | InsertString 'break;'; LineIndent; 56 | MoveUp; LineIndent; 57 | Fail; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /config/ab_c_os2.fte: -------------------------------------------------------------------------------- 1 | # abbreviations for OS/2 api. 2 | eventmap C { 3 | abbrev 'wswp' 'WinSetWindowPos'; 4 | abbrev 'wcsw' 'WinCreateStdWindow'; 5 | abbrev 'wrc' 'WinRegisterClass'; 6 | abbrev 'wdwp' 'WinDefWindowProc'; 7 | abbrev 'wdw' 'WinDestroyWindow'; 8 | abbrev 'wir' 'WinInvalidateRect'; 9 | abbrev 'wbp' 'WinBeginPaint'; 10 | abbrev 'wdb' 'WinDrawBitmap'; 11 | abbrev 'wdt' 'WinDrawText'; 12 | abbrev 'wep' 'WinEndPaint'; 13 | abbrev 'wi' 'WinInitialize'; 14 | abbrev 'wt' 'WinTerminate'; 15 | abbrev 'wsm' 'WinSendMsg'; 16 | abbrev 'wpm' 'WinPostMsg'; 17 | 18 | abbrev 'MR' 'MRESULT'; 19 | abbrev 'MP' 'MPARAM'; 20 | 21 | # MPFROMxxx 22 | abbrev 'MPV' 'MPVOID'; 23 | abbrev 'MPP' 'MPFROMP'; 24 | abbrev 'MPHW' 'MPFROMHWND'; 25 | abbrev 'MPC' 'MPFROMCHAR'; 26 | abbrev 'MPS' 'MPFROMSHORT'; 27 | abbrev 'MPS2' 'MPFROMSHORT2'; 28 | abbrev 'MPL' 'MPFROMLONG'; 29 | 30 | # xxxFROMMP 31 | abbrev 'PMP' 'PVOIDFROMMP'; 32 | abbrev 'HWMP' 'HWNDFROMMP'; 33 | abbrev 'C1MP' 'CHAR1FROMMP'; 34 | abbrev 'C2MP' 'CHAR2FROMMP'; 35 | abbrev 'C3MP' 'CHAR3FROMMP'; 36 | abbrev 'C4MP' 'CHAR4FROMMP'; 37 | 38 | # MRFROMxxx 39 | abbrev 'MRP' 'MRFROMP'; 40 | abbrev 'MRS' 'MRFROMSHORT'; 41 | abbrev 'MR2S' 'MRFROM2SHORT'; 42 | abbrev 'MRL' 'MRFROMLONG'; 43 | 44 | # xxxFROMMR 45 | abbrev 'PMR' 'PVOIDFROMMR'; 46 | abbrev 'S1MR' 'SHORT1FROMMR'; 47 | abbrev 'S2MR' 'SHORT2FROMMR'; 48 | abbrev 'LMR' 'LONGFROMMR'; 49 | } 50 | -------------------------------------------------------------------------------- /config/ab_java.fte: -------------------------------------------------------------------------------- 1 | # Java language templates 2 | 3 | eventmap JAVA { 4 | # these work well for default indentation settings 5 | # changes may be necessary if you use different indentation 6 | 7 | # typical usage would be typing ifx and . 8 | # useful command here is which adds 9 | # a new line after the current one, and indents it properly. 10 | # in cmode defined as LineAdd; LineIndent; 11 | abbrev 'ifx' { 12 | KillWordPrev; 13 | %if(BSD_BRACE) 14 | InsertString 'if ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 15 | InsertString '{'; LineIndent; LineNew; 16 | %endif 17 | %if(1TBS_BRACE) 18 | InsertString 'if () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 19 | %endif 20 | InsertString '}'; LineIndent; 21 | MoveSavedPos; Fail; # do not insert typed character 22 | } 23 | abbrev 'whx' { 24 | KillWordPrev; 25 | %if(BSD_BRACE) 26 | InsertString 'while ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 27 | InsertString '{'; LineIndent; LineNew; 28 | %endif 29 | %if(1TBS_BRACE) 30 | InsertString 'while () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 31 | %endif 32 | InsertString '}'; LineIndent; 33 | MoveSavedPos; Fail; 34 | } 35 | abbrev 'swx' { 36 | KillWordPrev; 37 | %if(BSD_BRACE) 38 | InsertString 'switch ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 39 | InsertString '{'; LineIndent; LineNew; 40 | %endif 41 | %if(1TBS_BRACE) 42 | InsertString 'switch () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 43 | %endif 44 | InsertString '}'; LineIndent; 45 | MoveSavedPos; Fail; 46 | } 47 | abbrev 'cax' { 48 | KillWordPrev; InsertString 'case :'; LineIndent; LineNew; 49 | InsertString 'break;'; LineIndent; 50 | MoveUp; MoveLineEnd; MovePrev; 51 | Fail; 52 | } 53 | abbrev 'dex' { 54 | KillWordPrev; InsertString 'default:'; LineIndent; 2:LineNew; 55 | InsertString 'break;'; LineIndent; 56 | MoveUp; LineIndent; 57 | Fail; 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /config/ab_perl.fte: -------------------------------------------------------------------------------- 1 | # perl language templates 2 | 3 | eventmap PERL { 4 | # these work well for default indentation settings 5 | # changes may be necessary if you use different indentation 6 | 7 | # typical usage would be typing ifx and . 8 | # useful command here is which adds 9 | # a new line after the current one, and indents it properly. 10 | # in cmode defined as LineAdd; LineIndent; 11 | abbrev 'ifx' { 12 | KillWordPrev; 13 | %if(BSD_BRACE) 14 | InsertString 'if ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 15 | InsertString '{'; LineIndent; LineNew; 16 | %endif 17 | %if(1TBS_BRACE) 18 | InsertString 'if () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 19 | %endif 20 | InsertString '}'; LineIndent; 21 | MoveSavedPos; Fail; # do not insert typed character 22 | } 23 | abbrev 'whx' { 24 | KillWordPrev; 25 | %if(BSD_BRACE) 26 | InsertString 'while ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 27 | InsertString '{'; LineIndent; LineNew; 28 | %endif 29 | %if(1TBS_BRACE) 30 | InsertString 'while () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 31 | %endif 32 | InsertString '}'; LineIndent; 33 | MoveSavedPos; Fail; 34 | } 35 | abbrev 'unx' { 36 | KillWordPrev; 37 | %if(BSD_BRACE) 38 | InsertString 'unless ()'; MoveLeft; SavePos; MoveRight; LineIndent; LineNew; 39 | InsertString '{'; LineIndent; LineNew; 40 | %endif 41 | %if(1TBS_BRACE) 42 | InsertString 'unless () {'; 3:MoveLeft; SavePos; 3:MoveRight; LineIndent; LineNew; 43 | %endif 44 | InsertString '}'; LineIndent; 45 | MoveSavedPos; Fail; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /config/ab_rexx.fte: -------------------------------------------------------------------------------- 1 | # FTE Abbrevs for REXX mode 2 | # by Michael DeBusk 3 | # debu4335@eclipsetel.com 4 | # Revision March 19, 2001 5 | 6 | eventmap REXX { 7 | # Header Comment 8 | # Note: If the environment variable USER is set, 9 | # This macro will insert the contents after the 10 | # word "Author:" and leave the cursor after 11 | # "Purpose:". If it is not set, the macro will 12 | # fail after "Author:". 13 | abbrev 'headx' { 14 | KillWordPrev; 15 | REXX_Heading; 16 | Fail; # do not insert typed character 17 | } 18 | 19 | abbrev 'utilx' { 20 | KillWordPrev; 21 | REXX_RexxUtil; 22 | Fail; # do not insert typed character 23 | } 24 | 25 | %if(OS_OS2) 26 | abbrev 'sockx' { 27 | KillWordPrev; 28 | REXX_RxSock; 29 | Fail; # do not insert typed character 30 | } 31 | 32 | abbrev 'ftpx' { 33 | KillWordPrev; 34 | REXX_RxFTP; 35 | Fail; # do not insert typed character 36 | } 37 | %endif 38 | 39 | abbrev 'dox' { 40 | KillWordPrev; 41 | REXX_Do; 42 | Fail; # do not insert typed character 43 | } 44 | 45 | abbrev 'dux' { 46 | KillWordPrev; 47 | REXX_DoUntil; 48 | Fail; # do not insert typed character 49 | } 50 | 51 | abbrev 'dwx' { 52 | KillWordPrev; 53 | REXX_DoWhile; 54 | Fail; # do not insert typed character 55 | } 56 | 57 | abbrev 'dfx' { 58 | KillWordPrev; 59 | REXX_DoForever; 60 | Fail; # do not insert typed character 61 | } 62 | 63 | abbrev 'ifx' { 64 | KillWordPrev; 65 | REXX_If; 66 | Fail; # do not insert typed character 67 | } 68 | 69 | abbrev 'selx' { 70 | KillWordPrev; 71 | REXX_Select; 72 | Fail; # do not insert typed character 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /config/ab_sh.fte: -------------------------------------------------------------------------------- 1 | eventmap SH { 2 | abbrev 'ifx' { 3 | KillWordPrev; InsertString 'if [ ]'; LineIndent; LineNew; 4 | InsertString 'then'; LineIndent; LineNew; 5 | InsertString 'fi'; LineIndent; 6 | 2:MoveUp; MoveLineEnd; 2:MoveLeft; 7 | Fail; # do not insert typed character 8 | } 9 | abbrev 'fox' { 10 | KillWordPrev; InsertString 'for in'; LineIndent; LineNew; 11 | InsertString 'do'; LineIndent; LineNew; 12 | InsertString 'done'; LineIndent; 13 | 2:MoveUp; MoveLineEnd; 3:MoveLeft; 14 | Fail; # do not insert typed character 15 | } 16 | abbrev 'whx' { 17 | KillWordPrev; InsertString 'while [ ]'; LineIndent; LineNew; 18 | InsertString 'do'; LineIndent; LineNew; 19 | InsertString 'done'; LineIndent; 20 | 2:MoveUp; MoveLineEnd; 2:MoveLeft; 21 | Fail; 22 | } 23 | abbrev 'cax' { 24 | KillWordPrev; InsertString 'case of'; LineIndent; LineNew; 25 | InsertString 'esac'; LineIndent; 26 | MoveUp; MoveLineEnd; 3:MoveLeft; 27 | Fail; 28 | } 29 | abbrev 'dox' { 30 | KillWordPrev; InsertString 'do'; LineIndent; 2:LineNew; 31 | InsertString 'done'; LineIndent; 32 | MoveUp; LineIndent; MoveLineEnd; 33 | Fail; 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /config/kbd/k_c.fte: -------------------------------------------------------------------------------- 1 | eventmap C { 2 | key [Tab] { LineIndent; LineTrim } 3 | key [{] { SelfInsert; ?LineIndent } 4 | key [}] { SelfInsert; ?LineIndent; MoveLeft; ?HilitMatchBracket; MoveRight } 5 | key [)] { SelfInsert; MoveLeft; ?HilitMatchBracket; MoveRight } 6 | key [\]] { SelfInsert; MoveLeft; ?HilitMatchBracket; MoveRight } 7 | key [:] { SelfInsert; ?LineIndent } 8 | key [#] { SelfInsert; ?LineIndent } 9 | #key [A+\\] { BlockReIndent; FileTrim; WinRefresh } 10 | key [G-Enter] { LineIndent; LineNew; } 11 | key [A+G-Enter] { LineIndent; LineAdd; LineIndent } 12 | key [S+G-Enter] { LineIndent; LineInsert; LineIndent } 13 | } 14 | -------------------------------------------------------------------------------- /config/kbd/k_fte.fte: -------------------------------------------------------------------------------- 1 | # additional keybindings for FTE edit mode 2 | # included from ../ui.fte 3 | 4 | eventmap FTE { 5 | key [Tab] { LineIndent; LineTrim } 6 | key [G-Enter] { LineIndent; LineNew; LineIndent } 7 | key [{] { SelfInsert; LineIndent } 8 | key [}] { SelfInsert; LineIndent } 9 | } 10 | -------------------------------------------------------------------------------- /config/kbd/k_groovy.fte: -------------------------------------------------------------------------------- 1 | eventmap GROOVY { 2 | } 3 | -------------------------------------------------------------------------------- /config/kbd/k_java.fte: -------------------------------------------------------------------------------- 1 | # additional keybindings for JAVA mode 2 | # included from ../ui.fte 3 | 4 | eventmap JAVA { 5 | key [C+E_0] { JAVA_Base } 6 | 7 | key [Tab] { LineIndent; LineTrim } 8 | key [G-Enter] { LineIndent; LineNew; LineIndent } 9 | key [{] { SelfInsert; LineIndent } 10 | key [}] { SelfInsert; LineIndent } 11 | key [:] { SelfInsert; LineIndent } 12 | key [#] { SelfInsert; LineIndent } 13 | key [A+\\] { BlockReIndent } 14 | } 15 | -------------------------------------------------------------------------------- /config/kbd/k_perl.fte: -------------------------------------------------------------------------------- 1 | # additional keybindings for PERL mode 2 | # included from ../ui.fte 3 | 4 | eventmap PERL { 5 | key [Tab] { LineIndent LineTrim } 6 | key [G-Enter] { LineIndent LineNew LineIndent } 7 | 8 | key [#] { SelfInsert LineIndent } 9 | key [{] { SelfInsert LineIndent } 10 | key [}] { SelfInsert LineIndent } 11 | key [A+\\] { BlockReIndent } 12 | } 13 | -------------------------------------------------------------------------------- /config/kbd/k_rexx.fte: -------------------------------------------------------------------------------- 1 | # FTE keybindings for REXX mode 2 | # enhanced from the original by Michael DeBusk 3 | # debu4335@eclipsetel.com 4 | # Revision March 19, 2001 5 | 6 | eventmap REXX { 7 | key [Tab] { LineIndent; LineTrim } 8 | key [G-Enter] { LineIndent; LineNew; LineIndent } 9 | key [:] { SelfInsert; LineIndent } 10 | key [A+\\] { BlockReIndent } 11 | key [C+E_c] { REXX_Comment } 12 | # key [C+E_u] { REXX_RexxUtil } 13 | # key [C+E_s] { REXX_RxSock } 14 | # key [C+E_f] { REXX_RxFTP } 15 | # key [C+E_0] { REXX_Heading } 16 | # key [C+E_1] { REXX_Do } 17 | # key [C+E_2] { REXX_DoWhile } 18 | # key [C+E_3] { REXX_DoUntil } 19 | # key [C+E_4] { REXX_DoForever } 20 | # key [C+E_5] { REXX_If } 21 | # key [C+E_6] { REXX_Select } 22 | } 23 | -------------------------------------------------------------------------------- /config/kbd/k_rst.fte: -------------------------------------------------------------------------------- 1 | # FTE keybindings for editing reStructuredText files 2 | # maintained by: Sergey Pinigin 3 | # Revision: 2006-08-29 4 | # 5 | # this file defines additional keybindings for RST mode. 6 | # RST_* macros are defined in ../m_rst.fte 7 | # menus are defined in ../menu/m_rst.fte 8 | # this file is included from ../ui_fte.fte 9 | 10 | eventmap reST { 11 | 12 | # Sections 13 | # Press after input Section name 14 | 15 | key [C+E_1] { RST_H1 } 16 | key [C+E_2] { RST_H2 } 17 | key [C+E_3] { RST_H3 } 18 | key [C+E_4] { RST_H4 } 19 | key [C+E_5] { RST_H5 } 20 | 21 | 22 | key [C+G+Up] { RST_ROLE_EMP } 23 | key [C+G+Down] { RST_ROLE_STR } 24 | key [C+E_C+L] { RST_ROLE_LIT } 25 | 26 | key [A+G+Up] { RST_INLINE_EMP } 27 | key [A+G+Down] { RST_INLINE_STR } 28 | key [C+E_0] { RST_INLINE_INT } 29 | key [C+E_9] { RST_INLINE_LIT } 30 | 31 | key [C+E_C+H] { RST_INLINE_HLINK } 32 | key [C+E_C+U] { RST_INLINE_ELINK } 33 | key [C+E_C+T] { RST_INLINE_ITAG } 34 | key [C+E_C+R] { RST_INLINE_REF } # []_ 35 | key [C+E_C+A] { RST_INLINE_REFA } # [#]_ 36 | key [C+E_C+\\] { RST_INLINE_REFS } # ||_ 37 | 38 | key [C+E_A+A] { RST_ADM_ATTE } 39 | key [C+E_A+C] { RST_ADM_CAUT } 40 | key [C+E_A+D] { RST_ADM_DANG } 41 | key [C+E_A+E] { RST_ADM_ERRO } 42 | key [C+E_A+H] { RST_ADM_HINT } 43 | key [C+E_A+I] { RST_ADM_IMPO } 44 | key [C+E_A+N] { RST_ADM_NOTE } 45 | key [C+E_A+T] { RST_ADM_TIP } 46 | key [C+E_A+W] { RST_ADM_WARN } 47 | key [C+E_A+L] { RST_ADM_TITL } 48 | key [C+E_A+O] { RST_ADM_ADMO } 49 | 50 | key [C+E_C+I] { RST_IMAGE } 51 | key [C+E_C+F] { RST_FIGURE } 52 | 53 | # List Enter 54 | key [C+Enter] { RST_LISTS_1ENT } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /config/kbd/k_sgml.fte: -------------------------------------------------------------------------------- 1 | # this file defines additional keybindings for SGML mode. 2 | # SGML_* macros are defined in ../m_sgml.fte 3 | # menus are defined in ../menu/m_sgml.fte 4 | # this file is included from ../ui.fte 5 | 6 | eventmap SGML { 7 | key [C+E_0] { SGML_Base } 8 | 9 | key [C+E_C+B] { SGML_BO } 10 | key [C+E_C+I] { SGML_IT } 11 | key [C+E_C+P] { SGML_PA } 12 | key [C+E_C+S] { SGML_SE } 13 | key [C+E_C+C] { SGML_CH } 14 | key [C+E_C+R] { SGML_REF } 15 | key [C+E_C+X] { SGML_EX } 16 | key [C+E_x] { SGML_EX } 17 | 18 | # character escapes 19 | 20 | key [C+E_&] { InsertString "&"; } 21 | key [C+E_<] { InsertString "<"; } 22 | key [C+E_>] { InsertString ">"; } 23 | key [C+E_@] { InsertString "©"; } 24 | } 25 | -------------------------------------------------------------------------------- /config/m_bin.fte: -------------------------------------------------------------------------------- 1 | mode BIN: PLAIN { # Binary Mode 2 | # FileNameRx = /\.\c{EXE}|{DLL}|{LIB}|{OBJ}|{BIN}|{ZIP}|{TAR}|{Z}|{GZ}|{COM}$/; 3 | # OBJ is file for Alias Wavefront 4 | FileNameRx = /\.\c{EXE}|{DLL}|{LIB}|{BIN}|{ZIP}|{TAR}|{Z}|{GZ}|{COM}$/; 5 | FirstLineRx = /[^\r\n\t -\xFF]/; 6 | HilitOn = 0; 7 | AutoIndent = 0; 8 | ShowTabs = 1; 9 | DetectLineSep = 0; 10 | StripChar = -1; 11 | LineChar = -1; 12 | AddCR = 0; 13 | AddLF = 0; 14 | ExpandTabs = 0; 15 | ForceNewLine = 0; 16 | TabSize = 8; 17 | LoadMargin = 64; 18 | SpaceTabs = 0; 19 | BackSpKillTab = 1; 20 | DeleteKillTab = 1; 21 | BackSpUnindents = 0; 22 | Trim = 0; 23 | ShowMarkers = 1; 24 | WordWrap = 0; 25 | MatchCase = 1; 26 | ReadOnly = 1; 27 | MultiLineHilit = 0; 28 | AutoHilitParen = 0; 29 | Abbreviations = 0; 30 | } 31 | 32 | oinclude 'mym_bin.fte'; 33 | -------------------------------------------------------------------------------- /config/m_catbs.fte: -------------------------------------------------------------------------------- 1 | # for viewing nroff output (do NOT use for editing). 2 | 3 | colorize CATBS { 4 | SyntaxParser = 'CATBS'; 5 | 6 | color { 7 | { 'Normal', 'Editor_Default' }, 8 | { 'Keyword', 'Editor_Keywords' }, 9 | { 'Symbol', 'Editor_Bold' }, 10 | }; 11 | } 12 | 13 | mode CATBS: PLAIN { 14 | FileNameRx = /\.\c{MAN}|{CAT}$/; # == never 15 | HilitOn = 1; 16 | Colorizer = 'CATBS'; 17 | ReadOnly = 1; # this mode cannot edit properly 18 | } 19 | 20 | oinclude 'mym_catbs.fte'; 21 | -------------------------------------------------------------------------------- /config/m_clario.fte: -------------------------------------------------------------------------------- 1 | # CLARION 2 | # Contributed by: thoye@sn.no (Thore Harald Hoye) 3 | 4 | colorize CLARION { 5 | SyntaxParser = 'Ada'; # ? 6 | 7 | color { 8 | { 'Normal', 'Editor_Default' }, 9 | { 'Number', 'Lang_Number' }, 10 | { 'Punctuation', 'Lang_Punctuation' }, 11 | { 'String', 'Lang_String' }, 12 | { 'Comment', 'Lang_Comment' }, 13 | { 'Function', 'Lang_Function' }, 14 | }; 15 | 16 | keyword 'Editor_Keywords' { 17 | 'accept', 'and', 'begin', 'break', 'by', 'case', 'compile', 'cycle', 18 | 'do','eject', 'else', 'elsif', 'embed', 'end', 'endembed', 'execute', 19 | 'exit', 'function', 'goto', 'if', 'include', 'loop', 'member', 'not', 20 | 'of', 'omit', 'or', 'orof', 'procedure', 'program', 'return', 21 | 'routine', 'section', 'then', 'times', 'to', 'until', 'while', 'xor', 22 | }; 23 | 24 | keyword 'Editor_Keywords4' { 25 | 'application', 'code', 'detail', 'file', 'footer', 'form', 'group', 26 | 'header', 'item', 'map', 'menu', 'menubar', 'module', 'option', 27 | 'queue', 'record', 'report', 'subtitle', 'title', 'toolbar', 'view', 28 | 'window', 29 | }; 30 | 31 | keyword 'Editor_Keywords2' { 32 | 'localrequest', 'originalrequest', 'localresponse', 'windowopened', 33 | 'windowinitialized', 'forcerefresh', 'currenttab', 'globalrequest', 34 | 'requestcancelled', 'globalresponse', 'selectrecord', 'recordfiltered', 35 | }; 36 | 37 | keyword 'Editor_Keywords3' { 38 | 'initializewindow', 'refreshwindow', 'syncwindow', 'main', 39 | }; 40 | 41 | keyword 'Editor_Keywords5' { 42 | 'byte', 'short', 'ushort', 'long', 'ulong', 'sreal', 'real', 'bfloat4', 43 | 'bfloat8', 'date', 'time', 'string', 'decimal', 'pdecimal', 'pstring', 44 | 'cstring', 'group', 45 | }; 46 | } 47 | 48 | mode CLARION: SOURCE { # CLARION mode 49 | FileNameRx = '\\.\\c{CLW}$'; 50 | Colorizer = 'CLARION'; 51 | HilitOn = 1; 52 | AutoIndent = 1; 53 | IndentMode = 'PLAIN'; 54 | MatchCase = 1; 55 | Trim = 1; 56 | MultiLineHilit = 0; 57 | 58 | RoutineRegexp = /^\s*{function}|{procedure}\s/; 59 | 60 | # SaveFolds = 2; # save fold info at end of line 61 | # CommentStart = ' --'; 62 | # CommentEnd = ''; 63 | } 64 | 65 | oinclude 'mym_clario.fte'; 66 | -------------------------------------------------------------------------------- /config/m_diff.fte: -------------------------------------------------------------------------------- 1 | colorize DIFF { 2 | SyntaxParser = 'SIMPLE'; 3 | 4 | color { 5 | { 'Normal', 'Editor_Default' }, 6 | { 'Old', 'DIFF_Old' }, 7 | { 'New', 'DIFF_New' }, 8 | { 'Changed', 'DIFF_Changed' }, 9 | { 'CPreprocessor', 'Lang_Preprocessor' }, 10 | }; 11 | 12 | h_state 0 { 'Normal' } 13 | h_trans { 1, '^', 'New' } 14 | h_trans { 2, '^ 17 | h_trans { 4, '^<', '@@', 'CPreprocessor' } 18 | 19 | h_state 1 { 'New' } 20 | h_trans { 0, '$', '', 'Normal' } 21 | 22 | h_state 2 { 'Old' } 23 | h_trans { 0, '$', '', 'Normal' } 24 | 25 | h_state 3 { 'Changed' } 26 | h_trans { 0, '$', '', 'Normal' } 27 | 28 | # just to mark the hunk boundaries (unified diff) 29 | h_state 4 { 'CPreprocessor' } 30 | h_trans { 0, '$', '', 'Normal' } 31 | } 32 | 33 | mode DIFF: PLAIN { # unix/gnu diff 34 | FileNameRx = /\.\c{{DIFF?}|{D?PATCH}}$/; 35 | FirstLineRx = /^diff /; 36 | HilitOn = 1; 37 | Colorizer = 'DIFF'; 38 | MultiLineHilit = 0; 39 | } 40 | 41 | oinclude 'mym_diff.fte'; 42 | -------------------------------------------------------------------------------- /config/m_ebnf.fte: -------------------------------------------------------------------------------- 1 | colorize EBNF { 2 | SyntaxParser = 'SIMPLE'; 3 | 4 | color { 5 | { 'Normal', 'Editor_Default' }, 6 | { 'String', 'Lang_String' }, 7 | { 'Symbol', 'Lang_Function' }, 8 | { 'Punctuation', 'Lang_Punctuation' }, 9 | { 'Comment', 'Lang_Comment' }, 10 | }; 11 | 12 | h_state 0 { 'Normal' } 13 | h_trans { 1, '', '#', 'Comment' } 14 | h_trans { 2, '<', '"', 'String' } 15 | h_trans { 0, 's', '.|{}=[]()', 'Punctuation' } 16 | 17 | h_state 1 { 'Comment' } 18 | h_trans { 0, '$', '', 'Normal' } 19 | 20 | h_state 2 { 'Symbol' } 21 | h_trans { 0, '>', '"', 'String' } 22 | h_trans { 0, '$', '', 'String' } 23 | h_trans { 2, 'Qq', '\\', 'Symbol' } 24 | } 25 | 26 | mode EBNF: PLAIN { 27 | FileNameRx = '\\.\\c{EBNF}$'; 28 | Colorizer = 'EBNF'; 29 | HilitOn = 1; 30 | AutoIndent = 1; 31 | IndentMode = 'PLAIN'; 32 | MultiLineHilit = 1; 33 | AutoHilitParen = 1; 34 | } 35 | 36 | oinclude 'mym_ebnf.fte'; 37 | -------------------------------------------------------------------------------- /config/m_falcon.fte: -------------------------------------------------------------------------------- 1 | # FTE mode for editing Falcon files 2 | 3 | colorize FALCON { 4 | SyntaxParser = 'SIMPLE'; 5 | 6 | color { 7 | { 'Normal', 'Editor_Default' }, 8 | { 'Number', 'Lang_Number' }, 9 | { 'Punctuation', 'Lang_Punctuation' }, 10 | { 'String', 'Lang_String' }, 11 | { 'Comment', 'Lang_Comment' }, 12 | { 'Function', 'Lang_Function' }, 13 | }; 14 | 15 | keyword 'Editor_Keywords' { 16 | 'case', 'catch', 'class', 17 | 'default', 18 | 'elif', 'else', 'end', 'export', 19 | 'for','function', 20 | 'if', 'init', 21 | 'loop', 22 | 'object', 23 | 'switch', 'select', 24 | 'try', 25 | 'while' 26 | }; 27 | 28 | keyword 'Editor_Keywords2' { 29 | 'and', 'attributes', 30 | 'break', 31 | 'const', 'continue', 32 | 'dropping', 33 | 'forall', 'forfirst', 'forlast', 'from', 34 | 'global', 35 | 'in', 'include', 'int', 36 | 'launch', 'let', 'load', 37 | 'nil', 'not', 'notin', 38 | 'to', 39 | 'or', 40 | 'provides', 41 | 'return', 42 | 'static', 'step' 43 | }; 44 | } 45 | 46 | mode FALCON: SOURCE { # Falcon Mode 47 | FileNameRx = '\\.{fal}|{ftd}$'; 48 | Colorizer = 'FALCON'; 49 | HilitOn = 1; 50 | AutoIndent = 1; 51 | IndentMode = 'PLAIN'; 52 | TabSize = 3; 53 | RoutineRegexp = /^[\s\t]*{class}|{function}\s/; 54 | SaveFolds = 2; # save fold info at end of line 55 | CommentStart = '/*'; 56 | CommentEnd = '*/'; 57 | } 58 | 59 | oinclude 'mym_falcon.fte'; 60 | -------------------------------------------------------------------------------- /config/m_groovy.fte: -------------------------------------------------------------------------------- 1 | 2 | sub GROOVY_Base { 3 | MoveFileStart; 4 | InsertString "package "; 5 | 2:LineNew; 6 | InsertString "public class "; 7 | InsertString $FileBaseName; 8 | InsertString " {"; LineIndent; 9 | 2:LineNew; 10 | InsertString "}"; LineIndent; LineNew; 11 | MoveFileStart; 8:MoveRight; 12 | } 13 | 14 | colorize GROOVY { 15 | SyntaxParser = 'C'; 16 | 17 | color { 18 | { 'Normal', 'Editor_Default' }, 19 | { 'Number', 'Lang_DecimalNumber' }, 20 | { 'HexNumber', 'Lang_HexNumber' }, 21 | { 'Punctuation', 'Lang_Punctuation' }, 22 | { 'String', 'Lang_String' }, 23 | { 'Comment', 'Lang_Comment' }, 24 | { 'CPreprocessor', 'Lang_Preprocessor' }, 25 | { 'Function', 'Lang_Function' }, 26 | { 'Label', 'Lang_Label' }, 27 | }; 28 | 29 | keyword 'Editor_Keywords' { 30 | 'abstract', 'def', 'default', 'goto', 'null', 'synchronized', 31 | 'boolean', 'do', 'if', 'package', 'this', 32 | 'break', 'double', 'implements', 'private', 'threadsafe', 33 | 'byte', 'else', 'import', 'protected', 'throw', 34 | 'byvalue', 'extends', 'instanceof', 'public', 'transient', 35 | 'case', 'false', 'int', 'return', 'true', 36 | 'catch', 'final', 'interface', 'short', 'try', 37 | 'char', 'finally', 'long', 'static', 'void', 38 | 'class', 'float', 'native', 'super', 'while', 39 | 'const', 'for', 'new', 'switch', 'continue', 40 | 'throws' 41 | }; 42 | } 43 | 44 | mode GROOVY: SOURCE { # GROOVY Mode 45 | FileNameRx = /\.\c{GROOVY}$/; 46 | HilitOn = 1; 47 | Colorizer = 'GROOVY'; 48 | AutoIndent = 1; 49 | IndentMode = 'PLAIN'; 50 | MatchCase = 1; 51 | Trim = 1; 52 | MultiLineHilit = 1; 53 | AutoHilitParen = 1; 54 | RoutineRegexp = /^\s*\w[\w._]+{\s+[\w._]+}+[\w_]+\s*\([^;]*$/; 55 | 56 | SaveFolds = 2; # save fold info at end of line 57 | CommentStart = ' /*'; 58 | CommentEnd = '*/'; 59 | } 60 | 61 | oinclude 'mym_groovy.fte'; 62 | -------------------------------------------------------------------------------- /config/m_html.fte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/config/m_html.fte -------------------------------------------------------------------------------- /config/m_idl.fte: -------------------------------------------------------------------------------- 1 | # IDL mode - Don Mahurin 2 | 3 | colorize IDL { 4 | SyntaxParser = 'C'; 5 | 6 | color { 7 | { 'Normal', 'Editor_Default' }, 8 | { 'Number', 'Lang_DecimalNumber' }, 9 | { 'HexNumber', 'Lang_HexNumber' }, 10 | { 'Punctuation', 'Lang_Punctuation' }, 11 | { 'String', 'Lang_String' }, 12 | { 'Comment', 'Lang_Comment' }, 13 | { 'CPreprocessor', 'Lang_Preprocessor' }, 14 | { 'Function', 'Lang_Function' }, 15 | { 'Label', 'Lang_Label' }, 16 | }; 17 | 18 | keyword 'Editor_Keywords' 19 | { 20 | 'struct', 'typedef', 'int', 'enum', 'char', 'void', 'long', 21 | 'const', 'float', 22 | 'short', 'union', 23 | 'double', 24 | 'public', 25 | 'signed', 26 | 'static', 27 | 'private', 'virtual', 28 | 'unsigned', 29 | 'bool', 30 | }; 31 | } 32 | 33 | mode IDL: C { # IDL Mode 34 | FileNameRx = /\.\c{IDL}$/; 35 | HilitOn = 1; 36 | Colorizer = 'IDL'; 37 | AutoIndent = 1; 38 | IndentMode = 'C'; 39 | MatchCase = 1; 40 | Trim = 1; 41 | MultiLineHilit = 1; 42 | AutoHilitParen = 1; 43 | 44 | RoutineRegexp = /^\w[\w_:*&~]+[\w\\s_:*&~]@\(.*\){\s*\{}?\s*$/; 45 | 46 | SaveFolds = 2; # save fold info at end of line 47 | CommentStart = ' /*'; 48 | CommentEnd = '*/'; 49 | } 50 | 51 | oinclude 'mym_idl.fte'; 52 | -------------------------------------------------------------------------------- /config/m_ipf.fte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/config/m_ipf.fte -------------------------------------------------------------------------------- /config/m_java.fte: -------------------------------------------------------------------------------- 1 | 2 | sub JAVA_Base { 3 | MoveFileStart; 4 | InsertString "package /* package name */;"; 5 | 2:LineNew; 6 | InsertString "import java.util.*;"; LineNew; 7 | InsertString "import javax.swing.*;"; 2:LineNew; 8 | InsertString "public class "; 9 | InsertString $FileBaseName; 10 | LineNew; 11 | InsertString "{"; LineIndent; 12 | 2:LineNew; 13 | InsertString "public "; 14 | InsertString $FileBaseName; 15 | InsertString "()"; LineIndent; LineNew; 16 | InsertString "{"; LineIndent; 2:LineNew; 17 | InsertString "}"; LineIndent; 2:LineNew; 18 | InsertString "}"; LineIndent; LineNew; 19 | MoveFileStart; 8:MoveRight; 20 | } 21 | 22 | colorize JAVA { 23 | SyntaxParser = 'C'; 24 | 25 | color { 26 | { 'Normal', 'Editor_Default' }, 27 | { 'Number', 'Lang_DecimalNumber' }, 28 | { 'HexNumber', 'Lang_HexNumber' }, 29 | { 'Punctuation', 'Lang_Punctuation' }, 30 | { 'String', 'Lang_String' }, 31 | { 'Comment', 'Lang_Comment' }, 32 | { 'CPreprocessor', 'Lang_Preprocessor' }, 33 | { 'Function', 'Lang_Function' }, 34 | { 'Label', 'Lang_Label' }, 35 | }; 36 | 37 | keyword 'Editor_Keywords' { 38 | 'abstract', 'default', 'goto', 'null', 'synchronized', 39 | 'boolean', 'do', 'if', 'package', 'this', 40 | 'break', 'double', 'implements', 'private', 'threadsafe', 41 | 'byte', 'else', 'import', 'protected', 'throw', 42 | 'byvalue', 'extends', 'instanceof', 'public', 'transient', 43 | 'case', 'false', 'int', 'return', 'true', 44 | 'catch', 'final', 'interface', 'short', 'try', 45 | 'char', 'finally', 'long', 'static', 'void', 46 | 'class', 'float', 'native', 'super', 'while', 47 | 'const', 'for', 'new', 'switch', 'continue', 48 | 'throws' 49 | }; 50 | } 51 | 52 | mode JAVA: SOURCE { # JAVA Mode 53 | FileNameRx = /\.\c{JAVA}$/; 54 | HilitOn = 1; 55 | Colorizer = 'JAVA'; 56 | AutoIndent = 1; 57 | IndentMode = 'C'; 58 | MatchCase = 1; 59 | Trim = 1; 60 | MultiLineHilit = 1; 61 | AutoHilitParen = 1; 62 | RoutineRegexp = /^\s*\w[\w._]+{\s+[\w._]+}+[\w_]+\s*\([^;]*$/; 63 | 64 | SaveFolds = 2; # save fold info at end of line 65 | CommentStart = ' /*'; 66 | CommentEnd = '*/'; 67 | } 68 | 69 | oinclude 'mym_java.fte'; 70 | -------------------------------------------------------------------------------- /config/m_lisaac.fte: -------------------------------------------------------------------------------- 1 | # 2 | # eFTE mode for Lisaac (http://isaacproject.u-strasbg.fr) 3 | # 4 | 5 | colorize LISAAC { 6 | SyntaxParser = "SIMPLE"; 7 | 8 | color { 9 | { "Normal", "Editor_Default" }, 10 | { "Function", "Lang_Function" }, 11 | { "Number", "Lang_DecimalNumber" }, 12 | { "Comment", "Lang_Comment" }, 13 | { "String", "Lang_String" }, 14 | { "Punctuation", "Lang_Punctuation" }, 15 | }; 16 | 17 | keyword "Editor_Keywords" { 18 | "by", 19 | "do", "downto", 20 | "else", "elseif", 21 | "if", "if_false", "if_true", 22 | "or", 23 | "self", "shrink", 24 | "then", "to", 25 | "when", "while", "while_do" 26 | }; 27 | 28 | keyword "Editor_Keywords2" { 29 | "Expanded", 30 | "Header", 31 | "Inherit", "Insert", "Interrupt", 32 | "Left", 33 | "Mapping", 34 | "Old", 35 | "Private", "Public", 36 | "Right", 37 | "Section", "Self", "Strict" 38 | }; 39 | 40 | h_state 0 { "Normal" } 41 | h_trans { 1, "-s", "_a-z", "Normal" } 42 | h_trans { 2, "<", "//", "Comment" } 43 | h_trans { 3, "<", "/*", "Comment" } 44 | h_trans { 4, "", "\"", "String" } 45 | h_trans { 5, "", "'", "String" } 46 | h_trans { 6, "", "*/", "Comment" } 59 | 60 | h_state 4 { "String" } 61 | h_trans { 0, "", "\"", "String" } 62 | h_trans { 0, "$", "", "String" } 63 | h_trans { 4, "Qq", "\\", "String" } 64 | 65 | h_state 5 { "String" } 66 | h_trans { 0, "", "'", "String" } 67 | h_trans { 0, "$", "", "String" } 68 | h_trans { 5, "Qq", "\\", "String" } 69 | 70 | h_state 6 { "Number" } 71 | h_trans { 0, "-S", "0-9", "Normal" } 72 | h_trans { 0, "$", "", "Normal" } 73 | 74 | h_state 7 { "Function" } 75 | h_trans { 0, "-S", "A-Z", "Normal" } 76 | } 77 | 78 | mode LISAAC: SOURCE { 79 | FileNameRx = /\c\.li/; 80 | HilitOn = 1; 81 | Colorizer = "LISAAC"; 82 | AutoIndent = 1; 83 | IndentMode = "PLAIN"; 84 | MatchCase = 1; 85 | MultiLineHilit = 1; 86 | AutoHilitParen = 1; 87 | } 88 | 89 | oinclude "mym_lisaac.fte"; -------------------------------------------------------------------------------- /config/m_markup.fte: -------------------------------------------------------------------------------- 1 | # MARKUP mode 2 | # 3 | # All markup modes should inherit from this mode which enables the 4 | # user to easily modify preferences for all markup file types 5 | # 6 | 7 | mode MARKUP: PLAIN { 8 | } 9 | 10 | oinclude 'mym_markup.fte'; 11 | -------------------------------------------------------------------------------- /config/m_merge.fte: -------------------------------------------------------------------------------- 1 | colorize MERGE { 2 | SyntaxParser = 'SIMPLE'; 3 | color { 4 | { 'Normal', 'Editor_Default' }, 5 | { 'Changed', 'MERGE_Changed' }, 6 | { 'Old', 'MERGE_Old' }, 7 | { 'New', 'MERGE_New' }, 8 | { 'Control', 'MERGE_Control' }, 9 | }; 10 | 11 | h_state 0 { 'Normal' } 12 | h_trans { 1, '^<', '<<<<<<<', 'Control' } 13 | 14 | h_state 1 { 'Changed' } 15 | h_trans { 2, '^>', '|||||||', 'Control' } 16 | h_trans { 3, '^>', '=======', 'Control' } 17 | 18 | h_state 2 { 'Old' } 19 | h_trans { 3, '^>', '=======', 'Control' } 20 | 21 | h_state 3 { 'New' } 22 | h_trans { 0, '^>', '>>>>>>>', 'Control' } 23 | } 24 | 25 | mode MERGE: PLAIN { # unix/gnu rscmerge 26 | FileNameRx = /\.\cMRG$/; 27 | HilitOn = 1; 28 | Colorizer = 'MERGE'; 29 | MultiLineHilit = 0; 30 | } 31 | 32 | oinclude 'mym_merge.fte'; 33 | -------------------------------------------------------------------------------- /config/m_msg.fte: -------------------------------------------------------------------------------- 1 | 2 | colorize MSG { 3 | SyntaxParser = 'MSG'; 4 | 5 | color { 6 | { 'Normal', 'Editor_Bold' }, 7 | { 'Header', 'Msg_Header' }, 8 | { 'Quotes', 'Msg_Quotes' }, 9 | { 'Tag', 'Msg_Tag' }, 10 | { 'Control', 'Msg_Signature' }, 11 | }; 12 | } 13 | 14 | mode MSG: TEXT { # EMail messages 15 | FileNameRx = /\c{\.{MSG}|{YEP}|{SND}}|{^SLRN.\d+}|{{\.{article}|{letter}}|{snd}\.\d+}$/; 16 | # try also 1 17 | WordWrap = 1; # automagic wordwrap 18 | HilitOn = 1; # enable highlight 19 | Colorizer = 'MSG'; # Highilight messages 20 | 21 | RoutineRegexp = /^Subject:/; 22 | } 23 | 24 | oinclude 'mym_msg.fte'; 25 | -------------------------------------------------------------------------------- /config/m_mvsasm.fte: -------------------------------------------------------------------------------- 1 | colorize MVSASM { 2 | SyntaxParser = 'SIMPLE'; 3 | 4 | color { 5 | { 'Normal', 'Editor_Default' }, 6 | { 'Number', 'Lang_DecimalNumber' }, 7 | { 'HexNumber', 'Lang_HexNumber' }, 8 | { 'Punctuation', 'Lang_Punctuation' }, 9 | { 'String', 'Lang_String' }, 10 | { 'Comment', 'Lang_Comment' }, 11 | { 'CPreprocessor', 'Lang_Preprocessor' }, 12 | { 'Function', 'Lang_Function' }, 13 | { 'Label', 'Lang_Label' }, 14 | }; 15 | 16 | keyword 'Editor_Keywords' { 17 | 'mov', 'push', 'pop', 'movzx', 'movsx', 18 | 'shl', 'shr', 'and', 'or', 'xor', 'not', 19 | 'add', 'sub', 'neg', 'mul', 'div', 'idiv', 'imul', 20 | 'test', 'cmp', 21 | 'inc', 'dec', 22 | 'enter', 'leave', 23 | }; 24 | 25 | h_state 0 { 'Normal' } 26 | h_trans { 1, '^', '*', 'Comment' } # '*' at bol is COMMENT 27 | h_trans { 2, '^-S', ' ', 'Label' } # word at bol is LABEL 28 | h_trans { 3, '-S', ' ', 'Normal' } # word at non-bol is INSTRUCTION 29 | 30 | h_state 1 { 'Comment' } # comment 31 | h_trans { 0, '$', '', 'Normal' } 32 | 33 | h_state 2 { 'Label' } # first column is LABEL 34 | h_trans { 0, '$', '', 'Normal' } 35 | h_trans { 0, '-s', ' ', 'Label' } 36 | 37 | h_state 3 { 'Normal' } # keywords in second column 38 | h_trans { 0, '$', '', 'Normal' } 39 | h_trans { 1, '-s', ' ', 'Comment' } 40 | h_wtype { 1, 1, 1, '', 'a-zA-Z_' } 41 | 42 | # keywords here or global 43 | 44 | h_state 4 { 'Normal' } # eat non-keywords in second col 45 | h_trans { 0, '$', '', 'Normal' } 46 | h_trans { 1, '-s', ' ', 'Comment' } 47 | } 48 | 49 | mode MVSASM: SOURCE { 50 | FileNameRx = /\.\cMVSA$/; 51 | HilitOn = 1; 52 | Colorizer = 'MVSASM'; 53 | AutoHilitParen = 1; 54 | 55 | SaveFolds = 2; # save fold info at end of line 56 | CommentStart = ' ;'; 57 | CommentEnd = ''; 58 | } 59 | 60 | oinclude 'mym_mvsasm.fte'; 61 | -------------------------------------------------------------------------------- /config/m_ocaml.fte: -------------------------------------------------------------------------------- 1 | # OCAML mode 2 | # 3 | # Vlad Seryakov 4 | # vlad@crystalballinc.com 5 | 6 | colorize OCAML 7 | { 8 | SyntaxParser = 'SIMPLE'; 9 | 10 | color 11 | { 12 | {'Normal', 'Editor_Default'}, 13 | {'Number', 'Lang_DecimalNumber'}, 14 | {'Punctuation','Lang_Preprocessor'}, 15 | {'String','Lang_String'}, 16 | {'Comment','Lang_Comment'}, 17 | {'Label','Lang_Label'}, 18 | {'Function','Lang_Function'} 19 | }; 20 | 21 | keyword 'Editor_Keywords' 22 | { 23 | 'and', 'as', 'assert', 'asr', 'begin', 'class', 24 | 'constraint', 'do', 'done', 'downto', 'else', 'end', 25 | 'exception', 'external', 'false', 'for', 'fun', 'function', 26 | 'functor', 'if', 'in', 'include', 'inherit', 'initializer', 27 | 'land', 'lazy', 'let', 'lor', 'lsl', 'lsr', 28 | 'lxor', 'match', 'method', 'mod', 'module', 'mutable', 29 | 'new', 'object', 'of', 'open', 'or', 'private', 30 | 'rec', 'sig', 'struct', 'then', 'to', 'true', 31 | 'try', 'type', 'val', 'virtual', 'when', 'while', 32 | 'with' 33 | }; 34 | 35 | h_state 0 {'Normal'} 36 | h_trans {1, '>', '(*', 'Comment'} 37 | h_trans {2, '', '"', 'String'} 38 | h_trans {3, 's', '0-9', 'Number'} 39 | h_trans {0, 'S', '_a-zA-Z0-9', 'Punctuation'} 40 | h_trans {4, '-s', 'a-zA-Z_', 'Normal' } 41 | 42 | h_state 1 {'Comment'} 43 | h_trans {0, '<', '*)', 'Comment'} 44 | 45 | h_state 2 {'String'} 46 | h_trans {0, '', '"', 'String'} 47 | 48 | h_state 3 {'Number'} 49 | h_trans {0, 'S-', '0-9\.', 'Number'} 50 | 51 | h_state 4 { 'Normal' } 52 | h_trans { 0, '$', '', 'Normal' } 53 | h_wtype { 0, 0, 0, 'i', 'a-zA-Z0-9_' } 54 | } 55 | 56 | mode OCAML: PLAIN { 57 | FileNameRx = /\.\c{ML}|{MLI}$/; 58 | HilitOn = 1; 59 | Colorizer = 'OCAML'; 60 | AutoIndent = 1; 61 | IndentMode = 'PLAIN'; 62 | MatchCase = 1; 63 | Trim = 1; 64 | MultiLineHilit = 1; 65 | AutoHilitParen = 1; 66 | SaveFolds = 2; 67 | CommentStart = ' (*'; 68 | CommentEnd = '*)'; 69 | RoutineRegexp = /^{let}|{module}|{type}\ .+}/; 70 | } 71 | 72 | -------------------------------------------------------------------------------- /config/m_resdlg.fte: -------------------------------------------------------------------------------- 1 | # OS/2 and Win* resource file (.RC) 2 | 3 | colorize RESOURCE { 4 | SyntaxParser = 'C'; 5 | 6 | color { 7 | { 'Normal', 'Editor_Default' }, 8 | { 'Number', 'Lang_DecimalNumber' }, 9 | { 'HexNumber', 'Lang_HexNumber' }, 10 | { 'Punctuation', 'Lang_Punctuation' }, 11 | { 'String', 'Lang_String' }, 12 | { 'Comment', 'Lang_Comment' }, 13 | { 'CPreprocessor', 'Lang_Preprocessor' }, 14 | { 'Function', 'Lang_Function' }, 15 | { 'Label', 'Lang_Label' }, 16 | }; 17 | 18 | # keywords need to be defined... for os2 and win* 19 | } 20 | 21 | mode RESOURCE: PLAIN { # Resource file 22 | FileNameRx = /\.\c{RC}|{DLG}$/; 23 | HilitOn = 1; 24 | Colorizer = 'RESOURCE'; 25 | MultiLineHilit = 1; 26 | AutoHilitParen = 1; 27 | 28 | SaveFolds = 2; # save fold info at end of line 29 | CommentStart = ' /*'; 30 | CommentEnd = '*/'; 31 | } 32 | 33 | oinclude 'mym_resdlg.fte'; 34 | -------------------------------------------------------------------------------- /config/m_rpm.fte: -------------------------------------------------------------------------------- 1 | # m_rpm.fte 2 | # 3 | # Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | # 5 | # You may distribute under the terms of either the GNU General Public 6 | # License or the Artistic License, as specified in the README file. 7 | # 8 | # eFTE mode for editing RPM spec files 9 | # 10 | 11 | colorize RPM { 12 | SyntaxParser = "SIMPLE"; 13 | 14 | color { 15 | { "Normal", "Editor_Default" }, 16 | { "Comment", "Lang_Comment" }, 17 | { "Command", "Lang_Command" }, 18 | { "String", "Lang_String" }, 19 | { "Number", "Lang_DecimalNumber" }, 20 | { "Punctuation", "Lang_Punctuation" }, 21 | }; 22 | 23 | # Header (0) 24 | h_state 0 { "Normal" } 25 | h_trans { 2, "^", "%", "String" } 26 | h_trans { 3, "x", "^[A-Za-z0-9_]", "Command" } 27 | 28 | h_state 1 { "Normal" } 29 | h_trans { 2, "^", "%", "String" } 30 | h_trans { 1, "$", "", "Normal" } 31 | 32 | # Section Header 33 | h_state 2 { "String" } 34 | h_trans { 1, "$", "", "String" } 35 | 36 | # Header command 37 | h_state 3 { "Command" } 38 | h_trans { 0, "", ":", "Command" } 39 | 40 | } 41 | 42 | mode RPM: SOURCE { 43 | FileNameRx = "\\.{spec}$"; 44 | Colorizer = "RPM"; 45 | HilitOn = 1; 46 | AutoIndent = 1; 47 | IndentMode = "PLAIN"; 48 | } 49 | 50 | oinclude "mym_rpm.fte"; 51 | -------------------------------------------------------------------------------- /config/m_rst.fte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/config/m_rst.fte -------------------------------------------------------------------------------- /config/m_sh.fte: -------------------------------------------------------------------------------- 1 | colorize SH { 2 | SyntaxParser = 'SH'; 3 | 4 | color { 5 | { 'Normal', 'Editor_Default' }, 6 | { 'Keyword', 'Editor_Keywords' }, 7 | { 'Number', 'Lang_DecimalNumber' }, 8 | { 'Comment', 'Lang_Comment' }, 9 | { 'String', 'Lang_String' }, 10 | { 'Control', 'Lang_Command' }, 11 | { 'Command', 'Lang_Function' }, 12 | { 'Punctuation','Lang_Punctuation' }, 13 | { 'Variable', 'Lang_Label' }, 14 | }; 15 | 16 | # keyword 'Lang_Label' { 17 | # 'PPID', 'PWD', 'OLDPWD', 'REPLY', 'UID', 18 | # 'EUID', 'GROUPS', 'BASH', 'BASH_VERSION', 19 | # 'BASH_VERSINFO', 'SHLVL', 'RANDOM', 20 | # 'SECONDS', 'LINEND', 'HISTCMD', 'DIRSTACK', 21 | # 'PIPESTATUS', 'OPTARG', 'OPTIND', 'HOSTNAME', 22 | # 'HOSTTYPE', 'OSTYPE', 'MACHTYPE', 'SHELLOPTS', 23 | # 'IFS', 'PATH', 'HOME', 'CDPATH', 'BASH_ENV', 24 | # 'MAIL', 'MAILCHECK', 'MAILPATH', 'PS1', 25 | # 'PS2', 'PS3', 'PS4', 'TIMEFORMAT', 'HISTSIZE', 26 | # 'HISTFILE', 'HISTFILESIZE', 'OPTERR', 'LANG', 27 | # 'LC_ALL', 'LC_COLLATE', 'LC_MESSAGES', 28 | # 'PROMPT_COMMAND', 'IGNOREEOF', 'TMOUT', 29 | # 'FCEDIT', 'FIGNORE', 'GLOBIGNORE', 'INPUTRC', 30 | # 'HISTCONTROL', 'HISTIGNORE', 'HOSTFILE', 31 | # 32 | # 'TERM', 'LD_LIBRARY_PATH', 'XAUTHORITY', 33 | # 'WINTERM', 34 | # }; 35 | 36 | keyword 'Editor_Keywords' { 37 | 'case', 'do', 'done', 'elif', 'else', 38 | 'esac', 'fi', 'for', 'function', 'if', 39 | 'in', 'then', 'until', 'while', 'exec', 40 | 'export', 'set', 'echo', 'exit', 'select', 41 | 'source', 'unset', 'alias', 'unalias', 42 | 'shift', 'break', 'read', 'return', 43 | }; 44 | } 45 | 46 | mode SH: SOURCE { # *sh 47 | FileNameRx = /{\.\cSH$}|{configure.{in}|{ac}}/; 48 | FirstLineRx = /^\#\![ ]*[^ ]*sh>/; 49 | RoutineRegexp = /^\s*{function\s\s*\S\S*\s*}|{\S\S*\s*\(\)}\s*$/; 50 | HilitOn = 1; 51 | Colorizer = 'SH'; 52 | MultiLineHilit = 1; 53 | AutoHilitParen = 1; 54 | 55 | SaveFolds = 2; # save fold info at end of line 56 | CommentStart = ' #'; 57 | CommentEnd = ''; 58 | } 59 | 60 | oinclude 'mym_sh.fte'; 61 | -------------------------------------------------------------------------------- /config/m_sml.fte: -------------------------------------------------------------------------------- 1 | # SML mode 2 | # 3 | # Chris Inacio 4 | # inacio@ece.cmu.edu 5 | 6 | colorize SML 7 | { 8 | SyntaxParser = 'SIMPLE'; 9 | 10 | color 11 | { 12 | {'Normal', 'Editor_Default'}, 13 | {'Number', 'Lang_DecimalNumber'}, 14 | {'Punctuation','Lang_Preprocessor'}, 15 | {'String','Lang_String'}, 16 | {'Comment','Lang_Comment'}, 17 | {'Label','Lang_Label'}, 18 | {'Function','Lang_Function'} 19 | }; 20 | 21 | keyword 'Editor_Keywords' 22 | { 23 | 'structure', 'and', 'local', 'in', 'end', 'signature', 'functor', 24 | 'struct', 'let', 'sig', 'where type', 'val', 'eqtype', 'type', 25 | 'datatype', 'exception', 'sharing', 'include', 'fun', 'abstype', 26 | 'open', 'infix', 'infixr', 'nonfix', 'raise', 'if', 'while', 27 | 'case', 'fn', 'op', 28 | }; 29 | 30 | h_state 0 {'Normal'} 31 | h_trans {1, '>', '(*', 'Comment'} 32 | h_trans {2, '', '"', 'String'} 33 | h_trans {3, 's', '0-9', 'Number'} 34 | h_trans {0, 'S', '_a-zA-Z0-9', 'Punctuation'} 35 | h_trans {4, '-s', 'a-zA-Z_', 'Normal' } 36 | 37 | h_state 1 {'Comment'} 38 | h_trans {0, '<', '*)', 'Comment'} 39 | 40 | h_state 2 {'String'} 41 | h_trans {0, '', '"', 'String'} 42 | 43 | h_state 3 {'Number'} 44 | h_trans {0, 'S-', '0-9\.', 'Number'} 45 | 46 | h_state 4 { 'Normal' } 47 | h_trans { 0, '$', '', 'Normal' } 48 | h_wtype { 0, 0, 0, 'i', 'a-zA-Z0-9_' } 49 | } 50 | 51 | mode SML: SOURCE { 52 | FileNameRx = /\.\c{SML}$/; 53 | HilitOn = 1; 54 | Colorizer = 'SML'; 55 | AutoIndent = 1; 56 | IndentMode = 'PLAIN'; 57 | MatchCase = 1; 58 | Trim = 1; 59 | MultiLineHilit = 1; 60 | AutoHilitParen = 1; 61 | SaveFolds = 2; 62 | CommentStart = ' (*'; 63 | CommentEnd = '*)'; 64 | } 65 | 66 | oinclude 'mym_sml.fte'; 67 | -------------------------------------------------------------------------------- /config/m_source.fte: -------------------------------------------------------------------------------- 1 | # SOURCE mode 2 | # 3 | # All source modes should inherit from this mode which enables the 4 | # user to easily modify preferences for all source code file types 5 | # 6 | 7 | mode SOURCE: PLAIN { 8 | } 9 | 10 | oinclude 'mym_source.fte'; 11 | -------------------------------------------------------------------------------- /config/m_text.fte: -------------------------------------------------------------------------------- 1 | 2 | mode TEXT: PLAIN { # Text files (wordwrap) 3 | FileNameRx = /\.\c{TXT}|{DOC}$/; 4 | # try also 1 5 | WordWrap = 2; 6 | } 7 | 8 | oinclude 'mym_text.fte'; 9 | -------------------------------------------------------------------------------- /config/m_unrealscript.fte: -------------------------------------------------------------------------------- 1 | # C mode 2 | 3 | colorize UNREALSCRIPT { 4 | SyntaxParser = 'C'; 5 | 6 | color { 7 | { 'Normal', 'Editor_Default' }, 8 | { 'Number', 'Lang_DecimalNumber' }, 9 | { 'HexNumber', 'Lang_HexNumber' }, 10 | { 'Punctuation', 'Lang_Punctuation' }, 11 | { 'String', 'Lang_String' }, 12 | { 'Comment', 'Lang_Comment' }, 13 | { 'CPreprocessor', 'Lang_Preprocessor' }, 14 | { 'Function', 'Lang_Function' }, 15 | { 'Label', 'Lang_Label' }, 16 | }; 17 | 18 | keyword 'Editor_Keywords' { 19 | 'class', 'extends', 'function', 'defaultproperties', 'Super', 20 | 'var', 'if', 'return', 'bool', 'true', 'false', 'string', 'local', 21 | 'Begin', 'Object', 'array', 'int', 'float', 'enum', 'localized', 22 | 'struct', 'config', 'for', 'else', 'event', 'exec', 'state', 'while', 23 | 'break', 'continue', 'native', 'simulated', 'abstract', 'native', 24 | 'nativereplication', 'const', 'final', 'iterator', 'static', 'color', 25 | 'simulated', 'replication', 'unreliable', 'foreach', 'optional', 26 | 'out', 'switch', 'transient', 'name', 'export', 'delegate', 'cpptext', 27 | 'globalconfig', 'self', 'preoperator', 'postoperator', 'operator', 28 | 'coerce', 'noexport', 'ignores', 29 | }; 30 | } 31 | 32 | mode UNREALSCRIPT: C { # UScript Mode 33 | FileNameRx = /\.\c{UC}$/; 34 | HilitOn = 1; 35 | Colorizer = 'UNREALSCRIPT'; 36 | AutoIndent = 0; 37 | IndentMode = 'C'; 38 | MatchCase = 0; 39 | Trim = 1; 40 | MultiLineHilit = 1; 41 | AutoHilitParen = 1; 42 | RoutineRegexp = /^\s*(({cpptext}|{defaultproperties}|{replication})\s*)|((({native}|{native\(\d+\)}|{final}|{static}|{simulated}|{exec})\s+)*({function}|{event})\s+(.+\s+)?[\w_]+\s*\([^;]*)$/; 43 | SaveFolds = 2; # save fold info at end of line 44 | CommentStart = ' /*'; 45 | CommentEnd = '*/'; 46 | } 47 | 48 | oinclude 'mym_unrealscript.fte'; 49 | -------------------------------------------------------------------------------- /config/m_xml.fte: -------------------------------------------------------------------------------- 1 | # 2 | # basic Syntaxhighliting for xml documents 3 | # based on HTML Mode 4 | 5 | sub XML_Base { 6 | InsertString '";'; 7 | LineNew; MoveLineStart; 8 | } 9 | 10 | 11 | colorize XML { 12 | SyntaxParser = 'SIMPLE'; 13 | 14 | color { 15 | { 'Normal', 'Editor_Keywords' }, 16 | { 'Command', 'Editor_Default' }, 17 | { 'Comment', 'Lang_Comment' }, 18 | { 'String', 'Lang_String' }, 19 | { 'Symbol', 'Markup_Symbol' }, 20 | { 'Tag', 'Markup_Tag' }, 21 | { 'Special', 'Markup_Special' }, 22 | }; 23 | 24 | keyword "Editor_Keywords" { 25 | "DOCTYPE", "PUBLIC", 26 | }; 27 | 28 | h_state 0 { 'Normal' } 29 | h_trans { 5, '<', '"; 75 | } 76 | 77 | eventmap XML { 78 | abbrev '_xml' { 79 | KillWordPrev; InsertString ''; LineNew; MoveLineStart; 80 | Fail; 81 | } 82 | } 83 | 84 | oinclude 'mym_xml.fte'; 85 | -------------------------------------------------------------------------------- /config/main.fte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/config/main.fte -------------------------------------------------------------------------------- /config/menu/m_c.fte: -------------------------------------------------------------------------------- 1 | # menu definitions for C mode 2 | 3 | menu Local_C { 4 | item "&Unmark\tEsc" { BlockMarkStream; BlockUnmark } 5 | item "Cu&t\tShift+Del" { BlockCut } 6 | item "&Copy\tCtrl+Ins" { BlockCopy } 7 | item "&Paste\tShift+Ins" { BlockPasteStream } 8 | item "P&aste Column\tAlt+Ins" { BlockPasteColumn } 9 | item; 10 | item "Delete &line\tCtrl+Y" { KillLine } 11 | item "Delete to &EOL\tAlt+End" { KillToLineEnd } 12 | item; 13 | item "&Save\tF2" { FileSave } 14 | item "Cl&ose\tAlt+Q" { FileClose } 15 | item; 16 | item "&Indent line\tTab" { LineIndent } 17 | item "I&ndent block\tAlt+\\" { BlockReIndent } 18 | } 19 | 20 | eventmap C { 21 | LocalMenu = 'Local_C'; # local menu for C mode 22 | } 23 | -------------------------------------------------------------------------------- /config/menu/m_groovy.fte: -------------------------------------------------------------------------------- 1 | # menu definitions for Groovy mode 2 | 3 | menu Local_GROOVY { 4 | item "&Unmark\tEsc" { BlockMarkStream; BlockUnmark } 5 | item "Cu&t\tShift+Del" { BlockCut } 6 | item "&Copy\tCtrl+Ins" { BlockCopy } 7 | item "&Paste\tShift+Ins" { BlockPasteStream } 8 | item "P&aste Column\tAlt+Ins" { BlockPasteColumn } 9 | item; 10 | item "Delete &line\tCtrl+Y" { KillLine } 11 | item "Delete to &EOL\tAlt+End" { KillToLineEnd } 12 | item; 13 | item "&Save\tF2" { FileSave } 14 | item "Cl&ose\tAlt+Q" { FileClose } 15 | item; 16 | item "&Indent line\tTab" { LineIndent } 17 | item "I&ndent block\tAlt+\\" { BlockReIndent } 18 | item; 19 | item "&Build via Ant\tF9" { Compile "ant -emacs -find build.xml " } 20 | } 21 | 22 | menu Groovy { 23 | item "&Build via Ant\tF9" { Compile "ant -emacs -find build.xml " } 24 | } 25 | 26 | menu Main_GROOVY { 27 | submenu "&File", File; 28 | submenu "&Edit", Edit; 29 | submenu "&Block", Block; 30 | submenu "&Search", Search; 31 | submenu "Fol&d", Fold; 32 | submenu "&Tools", Tools; 33 | submenu "&Groovy", Groovy; 34 | submenu "&Window", Window; 35 | submenu "&Options", Options; 36 | submenu "&Help", Help; 37 | } 38 | 39 | eventmap GROOVY { 40 | LocalMenu = "Local_GROOVY"; 41 | MainMenu = "Main_GROOVY"; 42 | 43 | key [A+G] { MainMenu 'M' } 44 | key [F9] { Compile "ant -emacs -find build.xml " } 45 | } 46 | -------------------------------------------------------------------------------- /config/menu/m_sgml.fte: -------------------------------------------------------------------------------- 1 | # SGML 2 | 3 | menu SGML_Meta { 4 | item "Ampersand" { InsertString "&"; } 5 | item "Less Than\tC-E <" { InsertString "<"; } 6 | item "Greater Than\tC-E >" { InsertString ">"; } 7 | item "CopyRight\tC-E @" { InsertString "©"; } 8 | } 9 | 10 | menu SGML_Ref { 11 | item "Reference" { SGML_REF } 12 | item "Example" { SGML_EX } 13 | item "Manual Refernce" { SGML_MRF } 14 | item "Email" { SGML_EML } 15 | item "Ftp Site" { SGML_FTPS } 16 | item "Ftp Path" { SGML_FTPP } 17 | item "HTTP Site" { SGML_HTPS } 18 | item "HTTP Path" { SGML_HTPP } 19 | item "URL" { SGML_URL } 20 | 21 | } 22 | 23 | menu SGML_List { 24 | item "Ordinary List" { SGML_ORD } 25 | item "Numbered List" { SGML_NUM } 26 | item "Tagged List" { SGML_TAG } 27 | item "Compact Style" { InsertString " compact"; } 28 | item "List Item" { InsertString " "; } 29 | } 30 | 31 | menu SGML_Style { 32 | item "Strong" { SGML_BO } 33 | item "Italic" { SGML_IT } 34 | item "TT" { SGML_TT } 35 | item "VAR" { SGML_VAR } 36 | item "Package" { SGML_PAK } 37 | item "PRGN" { SGML_PGN } 38 | item "File" { SGML_FIL } 39 | } 40 | 41 | menu SGMLTags { 42 | item "Paragraph

" { SGML_PA } 43 | item "Section " { SGML_SE } 44 | item "Chapter " { SGML_CH } 45 | item; 46 | submenu "Character Styles", SGML_Style; 47 | submenu "Lists", SGML_List; 48 | submenu "Cross Reference", SGML_Ref; 49 | submenu "Meta Characters", SGML_Meta; 50 | item; 51 | item "Blank Document " { SGML_Base } 52 | } 53 | 54 | menu Main_SGML { 55 | submenu "&File", File; 56 | submenu "&Edit", Edit; 57 | submenu "&Block", Block; 58 | submenu "&Search", Search; 59 | submenu "Fol&d", Fold; 60 | submenu "&Tools", Tools; 61 | submenu "SG&ML", SGMLTags; 62 | submenu "&Window", Window; 63 | submenu "&Options", Options; 64 | submenu "&Help", Help; 65 | } 66 | 67 | eventmap SGML { 68 | MainMenu = "Main_SGML"; # menu for menubar 69 | 70 | key [A+M] { MainMenu 'M' } 71 | } 72 | -------------------------------------------------------------------------------- /config/mymain.fte: -------------------------------------------------------------------------------- 1 | # Default personal main fte config file. 2 | 3 | # The purpose of this file is to allow individual users to add extra 4 | # functionality over and above what the sysadmin may have made available 5 | # without adversely affecting other users. 6 | 7 | # include the system main config - usually in /usr/local/fte/localconfig. 8 | include 'systemmain.fte'; 9 | 10 | # Personal settings go here. 11 | 12 | -------------------------------------------------------------------------------- /config/pal_b_kb.fte: -------------------------------------------------------------------------------- 1 | 2 | # color palette (black background) 3 | 4 | # different colors prefered by kabi 5 | 6 | # some values must be predefined here - 7 | # as only the first setting is used 8 | 9 | color_palette { 10 | { "bg", 'gray:black' }, # background 11 | 12 | { 'Lang_Punctuation', 'cyan:bg' }, 13 | { 'Lang_Preprocessor', 'cyan:bg' }, 14 | { 'Lang_Function', 'green:bg' }, 15 | } 16 | -------------------------------------------------------------------------------- /config/pal_base.fte: -------------------------------------------------------------------------------- 1 | # The basic symbol names for all colors. 2 | # 3 | # written by Elrond 4 | 5 | # the color palette is the definition of the symbolic colors 6 | # that are used everywhere else in the configuration files 7 | 8 | # syntax of the color specification is: 9 | # 10 | # fore back 11 | # or 12 | # symbolic_fore:symbolic_back 13 | # or 14 | # symbolic 15 | 16 | color_palette { 17 | # map system colors to symbolic 18 | 19 | { 'black', '0 0' }, 20 | { 'darkBlue', '1 1' }, 21 | { 'darkGreen', '2 2' }, 22 | { 'darkCyan', '3 3' }, 23 | { 'darkRed', '4 4' }, 24 | { 'darkMagenta', '5 5' }, 25 | { 'brown', '6 6' }, 26 | { 'gray', '7 7' }, 27 | { 'darkGray', '8 8' }, 28 | { 'blue', '9 9' }, 29 | { 'green', 'A A' }, 30 | { 'cyan', 'B B' }, 31 | { 'red', 'C C' }, 32 | { 'magenta', 'D D' }, 33 | { 'yellow', 'E E' }, 34 | { 'white', 'F F' }, 35 | } 36 | -------------------------------------------------------------------------------- /config/rgbcolor.fte: -------------------------------------------------------------------------------- 1 | object GLOBAL { 2 | RGBColor = '0:00,00,00'; 3 | RGBColor = '1:00,24,54'; 4 | RGBColor = '2:04,7c,34'; 5 | RGBColor = '3:00,7c,9c'; 6 | RGBColor = '4:98,00,00'; 7 | RGBColor = '5:00,a8,fc'; 8 | RGBColor = '6:88,88,00'; 9 | RGBColor = '7:a8,a8,a8'; 10 | RGBColor = '8:40,40,40'; 11 | RGBColor = '9:54,7c,ac'; 12 | RGBColor = 'a:54,f4,90'; 13 | RGBColor = 'b:54,e0,fc'; 14 | RGBColor = 'c:fc,68,54'; 15 | RGBColor = 'd:fc,84,b0'; 16 | RGBColor = 'e:fc,fc,54'; 17 | RGBColor = 'f:fc,fc,e4'; 18 | } 19 | -------------------------------------------------------------------------------- /config/systemmain.fte: -------------------------------------------------------------------------------- 1 | # Default system main fte config file. 2 | 3 | # The purpose of this file is to allow the system to have customizations 4 | # suitable for the owner of the machine or the corporation as required. This 5 | # allows the sysadmin to add new functionality in the system config that 6 | # all users will get while still being able to add the new configs that will 7 | # be made available with new versions of FTE. New versions of FTE will not 8 | # overwrite customizations this way. 9 | 10 | # include the main config - usually in /usr/local/efte/config. 11 | include 'main.fte'; 12 | 13 | # Local settings go here. 14 | -------------------------------------------------------------------------------- /config/ui_brief.fte: -------------------------------------------------------------------------------- 1 | # Brief (work in progress) 2 | 3 | include 'ui_m_fte.fte'; # TODO 4 | include 'k_brief.fte'; # incomplete 5 | 6 | include 'menu/m_c.fte'; 7 | include 'menu/m_html.fte'; 8 | 9 | include 'kbd/k_c.fte'; 10 | include 'kbd/k_java.fte'; 11 | include 'kbd/k_perl.fte'; 12 | include 'kbd/k_rexx.fte'; 13 | include 'kbd/k_fte.fte'; 14 | include 'kbd/k_html.fte'; 15 | -------------------------------------------------------------------------------- /config/ui_fte.fte: -------------------------------------------------------------------------------- 1 | # FTE 2 | 3 | include 'ui_m_fte.fte'; 4 | include 'ui_k_fte.fte'; 5 | 6 | include 'menu/m_c.fte'; 7 | include 'menu/m_groovy.fte'; 8 | include 'menu/m_html.fte'; 9 | include 'menu/m_rexx.fte'; 10 | include 'menu/m_sgml.fte'; 11 | include 'menu/m_rst.fte'; 12 | 13 | include 'kbd/k_c.fte'; 14 | include 'kbd/k_groovy.fte'; 15 | include 'kbd/k_java.fte'; 16 | include 'kbd/k_perl.fte'; 17 | include 'kbd/k_rexx.fte'; 18 | include 'kbd/k_fte.fte'; 19 | include 'kbd/k_html.fte'; 20 | include 'kbd/k_sgml.fte'; 21 | include 'kbd/k_rst.fte'; 22 | -------------------------------------------------------------------------------- /config/ui_k_joe.fte: -------------------------------------------------------------------------------- 1 | # 2 | # My basic joe like keybindings 3 | # 4 | # Copyright (C) 2002 Elrond 5 | # 6 | # The GNU General Public License applies. 7 | # 8 | 9 | 10 | eventmap MODEL { 11 | key [C+C] { FileClose } 12 | } 13 | 14 | eventmap PLAIN: MODEL { 15 | key [C+S-_] { Undo } 16 | key [C+^] { Redo } 17 | key [C+A] { MoveLineStart } 18 | key [C+C] { FileClose } 19 | key [C+D] { Delete } 20 | key [C+E] { MoveLineEnd } 21 | key [C+G] { MatchBracket } 22 | # key [C+K_/] { Filter_Block_Through_Command } 23 | key [C+K_Space] { ShowPosition } # joe shows more useful information 24 | key [C+K_.] { BlockIndent } 25 | key [C+K_,] { BlockUnindent } 26 | key [C+K_a] { LineCenter; MoveDown } 27 | key [C+K_b] { BlockBegin } 28 | key [C+K_c] { BlockCopy; BlockPaste } 29 | key [C+K_e] { FileOpen } 30 | key [C+K_f] { Find } 31 | # key [C+K_g] { make_win_greater } 32 | key [C+K_h] { BlockUnmark } # joe: help 33 | # key [C+K_i] { show_all_windows / show_one_window } 34 | # key [C+K_j] { fmtblk } 35 | key [C+K_k] { BlockEnd } 36 | key [C+K_C+K] { BlockEnd } 37 | key [C+K_l] { MoveToLine } 38 | key [C+K_m] { BlockCut; BlockPaste } 39 | key [C+K_C+M] { BlockCut; BlockPaste } 40 | key [C+K_n] { WinNext } 41 | # key [C+K_o] { Splitwindow } 42 | key [C+K_p] { WinPrev } 43 | key [C+K_r] { BlockRead } 44 | key [C+K_s] { FileSave } 45 | # key [C+K_t] { make_win_tinyer } 46 | key [C+K_u] { MoveFileStart } 47 | key [C+K_v] { MoveFileEnd } 48 | key [C+K_w] { BlockWrite } 49 | key [C+K_x] { FileCloseAll; } # Should not ask to save... 50 | key [C+K_y] { BlockKill } # or KillBlock ? 51 | key [C+L] { FindRepeat } 52 | key [C+Q_a] { FindReplace } 53 | key [C+Q_f] { Find } 54 | } 55 | -------------------------------------------------------------------------------- /config/ui_ne.fte: -------------------------------------------------------------------------------- 1 | # NE 2 | 3 | include 'ui_m_ne.fte'; 4 | include 'ui_k_ne.fte'; 5 | 6 | include 'menu/m_c.fte'; 7 | include 'menu/m_html.fte'; 8 | 9 | include 'kbd/k_c.fte'; 10 | include 'kbd/k_java.fte'; 11 | include 'kbd/k_perl.fte'; 12 | include 'kbd/k_rexx.fte'; 13 | include 'kbd/k_fte.fte'; 14 | include 'kbd/k_html.fte'; 15 | -------------------------------------------------------------------------------- /config/ui_ws.fte: -------------------------------------------------------------------------------- 1 | # FTE 2 | 3 | include 'ui_m_ws.fte'; 4 | include 'ui_k_ws.fte'; 5 | 6 | include 'menu/m_c.fte'; 7 | include 'menu/m_html.fte'; 8 | 9 | include 'kbd/k_c.fte'; 10 | include 'kbd/k_java.fte'; 11 | include 'kbd/k_perl.fte'; 12 | include 'kbd/k_rexx.fte'; 13 | include 'kbd/k_fte.fte'; 14 | include 'kbd/k_html.fte'; 15 | -------------------------------------------------------------------------------- /config/uicstyle.fte: -------------------------------------------------------------------------------- 1 | # C indentation style menu 2 | 3 | menu MChangeCIndentStyle { 4 | item "&Default" { 5 | ChangeTabSize 8; 6 | SetIndentWithTabs 0 7 | SetCIndentStyle 4 0 -1 0 4 0 4 -4 0 1 -1 4 4 8 | } 9 | item "&Linux kernel" { 10 | ChangeTabSize 8; 11 | SetIndentWithTabs 1 12 | SetCIndentStyle 8 0 -1 0 8 0 8 -8 0 1 -1 8 8 13 | } 14 | item "&GNU" { 15 | ChangeTabSize 8; 16 | SetIndentWithTabs 1 17 | SetCIndentStyle 2 2 -1 0 2 0 2 -2 0 1 -1 2 2 18 | } 19 | # more... 20 | } 21 | -------------------------------------------------------------------------------- /file_id.diz: -------------------------------------------------------------------------------- 1 | Text Mode text editor. Version 1.1 2 | Color syntax highlighting for C/C++, 3 | REXX, HTML, IPF, PERL, Ada, Pascal, TEX 4 | Multiple file/window editing, Column 5 | blocks, configurable menus and keyboard 6 | bindings, mouse support, undo/redo, 7 | regular expression search and replace, 8 | folding, background compiler execution. 9 | -------------------------------------------------------------------------------- /macosx/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/macosx/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /macosx/English.lproj/MainMenu.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {juttu = id; }; 5 | CLASS = Controller; 6 | LANGUAGE = ObjC; 7 | SUPERCLASS = NSObject; 8 | }, 9 | { 10 | ACTIONS = {keyPressPlease = id; teeJotain = id; }; 11 | CLASS = FTETextAreaView; 12 | LANGUAGE = ObjC; 13 | SUPERCLASS = NSView; 14 | }, 15 | { 16 | ACTIONS = {myAction = id; myAction1 = id; }; 17 | CLASS = FirstResponder; 18 | LANGUAGE = ObjC; 19 | SUPERCLASS = NSObject; 20 | }, 21 | {CLASS = NSSegmentedControl; LANGUAGE = ObjC; SUPERCLASS = NSControl; } 22 | ); 23 | IBVersion = 1; 24 | } -------------------------------------------------------------------------------- /macosx/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 91 44 365 245 0 0 1024 746 7 | IBEditorPositions 8 | 9 | 214 10 | 452 345 248 236 0 0 1024 746 11 | 29 12 | 117 287 345 44 0 0 1024 746 13 | 14 | IBFramework Version 15 | 489.0 16 | IBLockedObjects 17 | 18 | 224 19 | 20 | IBOpenObjects 21 | 22 | 21 23 | 29 24 | 25 | IBSystem Version 26 | 8S165 27 | 28 | 29 | -------------------------------------------------------------------------------- /macosx/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/macosx/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /macosx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | efte 11 | CFBundleIdentifier 12 | com.yourcompany.fte 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSMainNibFile 26 | MainMenu 27 | NSPrincipalClass 28 | NSApplication 29 | 30 | 31 | -------------------------------------------------------------------------------- /macosx/efte.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/macosx/efte.icns -------------------------------------------------------------------------------- /packaging/archlinux/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Contributor: Jeremy Cowgar 2 | pkgname=efte 3 | pkgver=1.1 4 | pkgrel=1 5 | pkgdesc="Fast configurable programmers editor" 6 | license=('GPL', 'custom') 7 | url="http://efte.cowgar.com" 8 | source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz) 9 | md5sums=('') 10 | arch=('i686' 'x86_64') 11 | 12 | build() { 13 | cd $startdir/src/$pkgname-$pkgver 14 | cmake -DBUILD_X=ON -DBUILD_CONSOLE=ON -DCMAKE_BUILD_TYPE=Release \ 15 | -DCMAKE_INSTALL_PREFIX=/usr . || return 1 16 | make || return 1 17 | make DESTDIR=$startdir/pkg install || return 1 18 | 19 | install -D -m 644 $startdir/pkg/usr/share/licenses/efte/Artistic \ 20 | $startdir/pkg/usr/share/licenses/efte/Artistic || return 1 21 | } 22 | -------------------------------------------------------------------------------- /packaging/debian/README.debian: -------------------------------------------------------------------------------- 1 | fte for DEBIAN 2 | ---------------------- 3 | * if you are using some non-iso encondings like KOI8-R please 4 | check your Compose file if you are worried about warning message. 5 | This problem is known - if you know how to fix this, please 6 | let me know. 7 | 8 | * usage of vfte on linux console together with iso8859-X fonts might 9 | be better if ISOCONSOLE shell variable is set. 10 | (e.g. for bash export ISOCONSOLE=y ; fte) 11 | 12 | * before reporting bugs about problems with i18n support for xfte 13 | try to make sure, your locales are correct and you use them 14 | properly (e.g. LANG=en_US xfte) 15 | 16 | * try to use sfte instead of vfte 17 | 18 | * vfte requires access to dev/vcsa* 19 | as the of the security problem with write access to this device 20 | this program has to be suid - however only for the opening 21 | this device - than it gives up its root privileges and goes 22 | back to the normal user uid,gid 23 | 24 | * And since vfte uses dev/vcsa directly, you can't use it 25 | on anything else but a virtual console. 26 | 27 | * vfte is not compiled with GPM support, because it's buggy and 28 | I didn't want vfte to be the reason to buy a mouse. 29 | 30 | * fte has still bugs, so use with caution (especially vfte, cuz 31 | it locks the keyboard if it crashes...), and report any 32 | reproducable bugs found. 33 | 34 | * To make your own configurations, make sure you have the package 35 | fte-docs installed on your system and unpack the file 36 | config-example.tar.gz to $HOME/.fte/. 37 | Run the program: cfte $HOME/.fte/main.fte 38 | Report any useful improvements and new Color modes. 39 | 40 | * read the BUGS file. 41 | 42 | Zdenek Kabelac 43 | Riku Voipio 44 | -------------------------------------------------------------------------------- /packaging/debian/builddeb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | dpkg-buildpackage -sgpg -pgpg -rfakeroot 4 | 5 | # debchanges 6 | -------------------------------------------------------------------------------- /packaging/debian/cefte.1: -------------------------------------------------------------------------------- 1 | .TH CEFTE 1 2 | .SH NAME 3 | cefte \- Compiles efte config files 4 | .SH SYNOPSIS 5 | .BI cefte " sourcefile [destfile]" 6 | .SH "DESCRIPTION" 7 | This manual page documents briefly the 8 | .BR "cfte". 9 | 10 | This manual page was written for the Debian GNU/Linux distribution 11 | (but may be used by others), because the original program does not 12 | have a manual page. Instead, it has documentation in html format; see below. 13 | .PP 14 | .B cefte 15 | compiles the 16 | .I .efterc 17 | binary for 18 | .BR "efte"(1) 19 | from human readable sources. Example of these source files can be found at 20 | \fB/usr/share/doc/\fP\fIefte/config-example.tar.gz\fP. 21 | .SH EXAMPLES 22 | .TP 23 | .BI cefte " /usr/share/doc/fte/config/main.fte" 24 | compiles the example config tree to 25 | .IR efte-new.cnf 26 | .TP 27 | .BI cefte " main.fte ~/.efterc" 28 | compiles the main.fte (in current directory) to 29 | .IR ~/.efterc 30 | .SH FILES 31 | .TP 32 | .IR ~/.efterc 33 | Default Configuration file. Includes All keybinding and menus 34 | compiled with 35 | .B cefte 36 | from config files in \fB/usr/share/doc/\fP\fIefte/config/main.fte\fP. 37 | There is a sample \fI.efterc\fP in \fB/etc/\fP\fIefte/system.fterc\fP. 38 | .TP 39 | .I *.fte 40 | Configuration sources. The syntax of these files is explained 41 | in \fB/usr/share/doc/\fP\fIefte/contents.html\fP. 42 | .SH "SEE ALSO" 43 | .BR efte (1), 44 | .BR vefte (1), 45 | .BR nefte (1), 46 | .BI /usr/share/doc/ efte/contents.html 47 | .SH AUTHORS 48 | This manual page was written by Riku Voipio and Zdenek Kabelac 49 | for the Debian GNU/Linux system. 50 | .SH DATE 51 | 28 Sep 1999 52 | -------------------------------------------------------------------------------- /packaging/debian/conffiles: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/packaging/debian/conffiles -------------------------------------------------------------------------------- /packaging/debian/control: -------------------------------------------------------------------------------- 1 | Source: fte 2 | Section: editors 3 | Priority: optional 4 | Maintainer: Zdenek Kabelac 5 | Standards-Version: 3.1.1.1 6 | Build-Depends: debhelper, perl5, xlibs-dev, libgpmg1-dev, libncurses5-dev, slang1-dev, patch, 7 | 8 | Package: fte 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, fte-xwindow | fte-terminal | fte-console 11 | Conflicts: fte-console (<< 0.49.13-3), fte-cfgdocs (<< 0.49.13-3) 12 | Suggests: fte-docs, exuberant-ctags 13 | Description: Text editor for programmers - base package 14 | Package contains files necessary to build configuration file 15 | and some elementary documentation. 16 | There is no editor in this package. 17 | Please select some from the list of suggested binary packages. 18 | 19 | Package: fte-docs 20 | Architecture: any 21 | Depends: fte (= ${Source-Version}) 22 | Replaces: fte-cfgdocs (<< 0.49.13-3) 23 | Description: HTML documentation and example of configuration. 24 | Package constains documentation files for editor. 25 | 26 | Package: fte-xwindow 27 | Architecture: any 28 | Depends: ${shlibs:Depends}, fte (= ${Source-Version}) 29 | Replaces: fte (<< 0.49.2-1) 30 | Description: Text editor for X Window System with I18N support. (for programmers) 31 | Color syntax highlighting for many more languages. 32 | Smart indentation for C, C++, Java, Perl. 33 | Multiple file/window editing, Column blocks, configurable menus and 34 | keyboard bindings, mouse support, undo/redo, regular expression search 35 | and replace, folding, background compiler execution. 36 | X Window System edition. 37 | 38 | Package: fte-console 39 | Architecture: any 40 | Depends: ${shlibs:Depends}, fte (= ${Source-Version}) 41 | Conflicts: suidmanager (<< 0.50) 42 | Description: Text editor for console (no I18N support). (for programmers) 43 | Color syntax highlighting for many more languages. 44 | Smart indentation for C, C++, Java, Perl. 45 | Multiple file/window editing, Column blocks, configurable menus and 46 | keyboard bindings, mouse support, undo/redo, regular expression search 47 | and replace, folding, background compiler execution. 48 | Linux console edition. 49 | 50 | Package: fte-terminal 51 | Architecture: any 52 | Depends: ${shlibs:Depends}, fte (= ${Source-Version}) 53 | Description: Text editor for terminals. (for programmers) 54 | Color syntax highlighting for many more languages. 55 | Smart indentation for C, C++, Java, Perl. 56 | Multiple file/window editing, Column blocks, configurable menus and 57 | keyboard bindings, mouse support, undo/redo, regular expression search 58 | and replace, folding, background compiler execution. 59 | Terminal (e.g.: xterm, vt100) edition. 60 | -------------------------------------------------------------------------------- /packaging/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Riku Voipio 2 | on Wed, 14 Oct 1998 17:00:34 +0200. 3 | Currently it's maintained by Zdenek Kabelac 4 | 5 | Sources for actual fte package have been downloaded from CVS archive 6 | URL: http://sourceforge.net/projects/fte/ 7 | 8 | Previous packages have been using archive files from this place: 9 | URL: http://www.kiss.uni-lj.si/~k4fr0235/fte fte-%ver.src.tar.gz 10 | This was the official home page for this editor. 11 | 12 | Copyright: GPL (see /usr/share/common-licenses/GPL) or Artistic (see README) 13 | -------------------------------------------------------------------------------- /packaging/debian/fte-console.dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/share/man/man1 3 | usr/share/lintian/overrides 4 | -------------------------------------------------------------------------------- /packaging/debian/fte-console.lintian: -------------------------------------------------------------------------------- 1 | fte-console: setuid-binary usr/bin/vfte 4755 root/root 2 | -------------------------------------------------------------------------------- /packaging/debian/fte-console.menu: -------------------------------------------------------------------------------- 1 | ?package(fte-console):needs="vc" section="Apps/Editors"\ 2 | title="VFte" longtitle="VFte, a console text editor" command="vfte" 3 | -------------------------------------------------------------------------------- /packaging/debian/fte-console.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | echo " \`vfte' - editor for linux console /dev/vcsaXX - has SUID bit set!" 4 | echo " however this is used only for opening console device... " 5 | 6 | #DEBHELPER# 7 | -------------------------------------------------------------------------------- /packaging/debian/fte-console.suid: -------------------------------------------------------------------------------- 1 | usr/bin/vfte 2 | -------------------------------------------------------------------------------- /packaging/debian/fte-docs.dirs: -------------------------------------------------------------------------------- 1 | usr/share/doc/fte 2 | -------------------------------------------------------------------------------- /packaging/debian/fte-docs.menu: -------------------------------------------------------------------------------- 1 | ?package(fte-docs):needs="dwww" section="Apps/Editors"\ 2 | title="Fte Manual" longtitle="Fte Users Manual"\ 3 | command="/usr/share/doc/fte/contents.html" 4 | ?package(fte-docs):needs="dwww" section="Apps/Editors"\ 5 | title="Fte detailed reference"\ 6 | longtitle="Detailed reference card for default Fte user interface"\ 7 | command="/usr/share/doc/fte/command.html" 8 | -------------------------------------------------------------------------------- /packaging/debian/fte-terminal.dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/share/man/man1 3 | -------------------------------------------------------------------------------- /packaging/debian/fte-xwindow.dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/share/man/man1 3 | -------------------------------------------------------------------------------- /packaging/debian/fte-xwindow.menu: -------------------------------------------------------------------------------- 1 | ?package(fte-xwindow):needs="x11" section="Apps/Editors" icon="mini-edit.xpm"\ 2 | title="Fte" longtitle="FTE, a powerful text editor"\ 3 | command="/usr/bin/xfte" 4 | #?package(fte-xwindow):needs="dwww" section="Apps/Editors" title="Fte Homepage"\ 5 | # command="http://www.ixtas.fri.uni-lj.si/~markom/fte"\ 6 | # longtitle="Fte Homepage"\ 7 | # description="This is the homepage of the fte creator" 8 | 9 | -------------------------------------------------------------------------------- /packaging/debian/fte.dirs: -------------------------------------------------------------------------------- 1 | etc/fte 2 | usr/bin 3 | -------------------------------------------------------------------------------- /packaging/debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | update-alternatives --install /usr/bin/editor editor /usr/bin/fte 11\ 4 | --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/fte.1.gz 5 | 6 | #DEBHELPER# 7 | -------------------------------------------------------------------------------- /packaging/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # remove FTECFG entry 4 | FTECFG=/etc/fte 5 | if [ -d $FTECFG ] ; then 6 | if [ `find $FTECFG | wc -l` -eq 1 ]; then 7 | rm -rf $FTECFG 8 | echo "Directory \`/etc/fte' removed" 9 | fi 10 | fi 11 | 12 | #DEBHELPER# 13 | -------------------------------------------------------------------------------- /packaging/debian/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$1" != "upgrade" ] 4 | then 5 | update-alternatives --remove editor /usr/bin/fte 6 | fi 7 | 8 | #DEBHELPER# 9 | -------------------------------------------------------------------------------- /packaging/gentoo/efte-0.95.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2008 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | # $Header: $ 4 | 5 | DESCRIPTION="A fast text editor supporting folding, syntax highlighting, etc." 6 | HOMEPAGE="http://efte.sourceforge.net" 7 | SRC_URI="http://downloads.sourceforge.net/${PN}/${P}.tar.gz" 8 | 9 | LICENSE="GPL-2" 10 | SLOT="0" 11 | KEYWORDS="~amd64 ~x86" 12 | IUSE="gpm X" 13 | 14 | RDEPEND="sys-libs/ncurses 15 | gpm? ( sys-libs/gpm ) 16 | X? ( x11-base/xorg-x11 17 | x11-libs/libXpm )" 18 | DEPEND="${RDEPEND} 19 | dev-util/cmake" 20 | 21 | src_compile() { 22 | cmake \ 23 | -DCMAKE_BUILD_TYPE=Release \ 24 | -DCMAKE_INSTALL_PREFIX=/usr \ 25 | -DBUILD_GPM=$(use gpm && echo ON || echo OFF) \ 26 | -DBUILD_X=$(use X && echo ON || echo OFF) \ 27 | ./ 28 | emake || die "emake failed" 29 | 30 | # Compile a default configuration file. 31 | src/cefte config/mymain.fte system.fterc 32 | } 33 | 34 | src_install() { 35 | emake DESTDIR="${D}" install || die "emake install failed" 36 | insinto /usr/share/efte 37 | doins system.fterc 38 | } -------------------------------------------------------------------------------- /packaging/gentoo/efte-0.96.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2008 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | # $Header: /var/cvsroot/gentoo-x86/app-editors/efte/efte-0.96.ebuild,v 1.1 2008/02/18 00:24:27 omp Exp $ 4 | 5 | DESCRIPTION="A fast text editor supporting folding, syntax highlighting, etc." 6 | HOMEPAGE="http://efte.sourceforge.net" 7 | SRC_URI="http://downloads.sourceforge.net/${PN}/${P}.tar.gz" 8 | 9 | LICENSE="GPL-2" 10 | SLOT="0" 11 | KEYWORDS="~amd64 ~x86" 12 | IUSE="gpm X" 13 | 14 | RDEPEND="sys-libs/ncurses 15 | gpm? ( sys-libs/gpm ) 16 | X? ( x11-base/xorg-x11 17 | x11-libs/libXpm )" 18 | DEPEND="${RDEPEND} 19 | dev-util/cmake" 20 | 21 | src_compile() { 22 | cmake \ 23 | -DCMAKE_BUILD_TYPE=Release \ 24 | -DCMAKE_INSTALL_PREFIX=/usr \ 25 | -DBUILD_GPM=$(use gpm && echo ON || echo OFF) \ 26 | -DBUILD_X=$(use X && echo ON || echo OFF) \ 27 | ./ 28 | emake || die "emake failed" 29 | 30 | # Compile a default configuration file. 31 | src/cefte config/mymain.fte system.fterc 32 | } 33 | 34 | src_install() { 35 | emake DESTDIR="${D}" install || die "emake install failed" 36 | insinto /usr/share/efte 37 | doins system.fterc 38 | } 39 | -------------------------------------------------------------------------------- /packaging/gentoo/efte-0.97.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2008 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | # $Header$ 4 | 5 | DESCRIPTION="A fast text editor supporting folding, syntax highlighting, etc." 6 | HOMEPAGE="http://efte.cowgar.com" 7 | SRC_URI="http://downloads.sourceforge.net/${PN}/${P}.tar.gz" 8 | 9 | LICENSE="GPL-2 Artistic" 10 | SLOT="0" 11 | KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" 12 | IUSE="gpm X" 13 | 14 | RDEPEND="sys-libs/ncurses 15 | gpm? ( sys-libs/gpm ) 16 | X? ( x11-base/xorg-x11 17 | x11-libs/libXpm )" 18 | DEPEND="${RDEPEND} 19 | dev-util/cmake" 20 | 21 | src_compile() { 22 | cmake \ 23 | -DCMAKE_BUILD_TYPE=Release \ 24 | -DCMAKE_INSTALL_PREFIX=/usr \ 25 | -DBUILD_GPM=$(use gpm && echo ON || echo OFF) \ 26 | -DBUILD_X=$(use X && echo ON || echo OFF) \ 27 | ./ 28 | emake || die "emake failed" 29 | } 30 | 31 | src_install() { 32 | emake DESTDIR="${D}" install || die "emake install failed" 33 | } 34 | -------------------------------------------------------------------------------- /packaging/macports/Portfile: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | PortSystem 1.0 3 | 4 | name efte 5 | version 1.1 6 | categories editors 7 | platforms darwin 8 | maintainers jeremy@cowgar.com 9 | description configurable programmers editor 10 | long_description \ 11 | eFTE is a lightweight, extendable, folding text editor \ 12 | geared toward the programmer. eFTE is a fork of FTE with goals of \ 13 | taking FTE to the next step, hence, Enhanced FTE. 14 | 15 | homepage http://efte.cowgar.com 16 | master_sites http://downloads.sourceforge.net/sourceforge/efte/ 17 | checksums efte-${version}.tar.gz md5 20c5ca30ed1990f473581e6cafda6a4b 18 | 19 | depends_build bin:cmake:cmake 20 | 21 | configure.args -DCMAKE_BUIL_TYPE=Release \ 22 | -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ 23 | -DUSE_GPM=OFF -DBUILD_CONSOLE=ON -DBUILD_X=OFF 24 | 25 | configure { 26 | system "cd ${worksrcpath} && ${configure.env} cmake ${configure.args} ${worksrcpath}" 27 | } 28 | 29 | variant x11 { 30 | depends_build-append lib:libX11:XFree86 31 | configure.args-delete "-DBUILD_X=OFF" 32 | configure.args-append "-DBUILD_X=ON" 33 | } 34 | -------------------------------------------------------------------------------- /packaging/rpm/efte.spec: -------------------------------------------------------------------------------- 1 | Summary: eFTE Text Editor 2 | Name: efte 3 | Version: 1.1 4 | Release: 1 5 | License: GPLv2+, Artistic 6 | Group: Applications/Editors 7 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root 8 | Source: http://downloads.sourceforge.net/efte/%{name}-%{version}.tar.gz 9 | Requires: gpm 10 | Requires: ncurses 11 | Requires: libX11 12 | Requires: libXpm 13 | Requires: xorg-x11-fonts-misc 14 | BuildRequires: gcc-c++ 15 | BuildRequires: gpm-devel 16 | BuildRequires: ncurses-devel 17 | BuildRequires: libX11-devel 18 | BuildRequires: libXpm-devel 19 | 20 | 21 | %description 22 | eFTE Text Editor 23 | 24 | Folding. 25 | Color syntax highlighting for many languages. 26 | Smart indentation for C,C++,Java,Perl. 27 | Fast. No mouse required :) 28 | File/line size limited by virtual memory. 29 | 30 | %prep 31 | rm -rf $RPM_BUILD_ROOT 32 | 33 | %setup -q 34 | 35 | %build 36 | cd src && make PREFIX=/usr 37 | 38 | %install 39 | install -d $RPM_BUILD_ROOT/etc/efte 40 | cd src && make install PREFIX=/usr DESTDIR=$RPM_BUILD_ROOT 41 | 42 | %clean 43 | rm -rf $RPM_BUILD_ROOT 44 | 45 | 46 | %files 47 | %defattr(-,root,sys) 48 | 49 | /usr/bin/efte 50 | /usr/bin/nefte 51 | /usr/bin/vefte 52 | /usr/share/doc/efte 53 | /usr/share/efte/config 54 | -------------------------------------------------------------------------------- /packaging/shared/efte.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=eFTE 3 | Version=1.1 4 | GenericName=Text Editor 5 | GenericName[cz]=Textový editor 6 | GenericName[de]=Texteditor 7 | GenericName[en_US@piglatin]=Extay Editoray 8 | GenericName[eo]=Tekstredaktilo 9 | GenericName[et]=Tekstiredaktor 10 | GenericName[fi]=Tekstieditori 11 | GenericName[fr]=Editeur de texte 12 | GenericName[it]=Editor di testo 13 | GenericName[ja]=テキストエディタ 14 | GenericName[nl]=Tekst editor 15 | GenericName[pl]=Edytor tekstu 16 | GenericName[sv]=Textredigerare 17 | Comment=Fast, extendable programmers' text editor 18 | Comment[cz]=Rychlý a rozšiřitelný textový editor pro programátory 19 | Comment[de]=Schneller, erweiterbarer Texteditor für Programmierer 20 | Comment[en_US@piglatin]=Astfay extendableay rogrammerspay exttay editoray 21 | Comment[eo]=Rapida, etendabla tekstredaktilo por programado 22 | Comment[et]=Kiire, paindlik programmeerijate tekstiredaktor 23 | Comment[fi]=Nopea, laajennettava ohjelmoijien tekstieditori 24 | Comment[it]=Veloce, espandibile editor di programmi 25 | Comment[ja]=高速で、拡張可能なプログラマー向けテキストエディタ 26 | Comment[fr]=Editeur rapide et extensible, pour les programmeurs 27 | Comment[nl]=Snelle, uitbreidbare tekst editor voor programmeurs 28 | Comment[pl]=Szybki, zaawansowany i elastyczny edytor tekstu dla programistów 29 | Comment[sv]=Snabb, utbyggbar textredigerare för programmerare 30 | MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; 31 | Exec=efte %f 32 | Icon=efte 33 | Type=Application 34 | Terminal=false 35 | Categories=Development;TextEditor; 36 | StartupWMClass=Efte 37 | -------------------------------------------------------------------------------- /packaging/shared/efte16x16.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * efte16x16_xpm[] = { 3 | "16 16 4 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #FFFFFF", 7 | "@ c #FF0000", 8 | " .... ", 9 | " ++++.@@.....++ ", 10 | " ....@ @@@@@ ", 11 | " .@@@.@ .@. ", 12 | " .@.@.@@@.@.@@@ ", 13 | " .@.@.@...@.@.. ", 14 | " .@@..@++.@.@++ ", 15 | " .@ .@ .@.@.. ", 16 | " .@ .@ .@.@@@ ", 17 | " .@@@.@++.@.@++ ", 18 | " .. .@ .@.@ ", 19 | " .@ .@.@ ", 20 | " ++++.@++.@.@++ ", 21 | " .@ .@.@.. ", 22 | " .. .@.@@@ ", 23 | " "}; 24 | -------------------------------------------------------------------------------- /packaging/shared/efte16x16_simple.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * efte16x16_simple_xpm[] = { 3 | "16 16 2 1", 4 | " c None", 5 | ". c #FF0000", 6 | " ", 7 | " .. ", 8 | " . ..... ", 9 | " ... . . ", 10 | " . . ... . ... ", 11 | " . . . . . ", 12 | " .. . . . ", 13 | " . . . . ", 14 | " . . . ... ", 15 | " ... . . . ", 16 | " . . . ", 17 | " . . . ", 18 | " . . . ", 19 | " . . . ", 20 | " . ... ", 21 | " "}; 22 | -------------------------------------------------------------------------------- /packaging/shared/efte20x20_simple.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * efte20x20_simple_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #FF0000", 6 | " ", 7 | " ... ", 8 | " . ..... ", 9 | " . . ", 10 | " .... . . ", 11 | " . . .... . .... ", 12 | " . . . . . ", 13 | " ... . . . ", 14 | " . . . . ", 15 | " . . . . ", 16 | " . . . .... ", 17 | " ... . . . ", 18 | " . . . ", 19 | " . . . ", 20 | " . . . ", 21 | " . . . ", 22 | " . . . ", 23 | " . . ", 24 | " . .... ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /packaging/shared/efte32x32.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * efte32x32_xpm[] = { 3 | "32 32 4 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #FF0000", 7 | "@ c #FFFFFF", 8 | " ", 9 | " ....... ", 10 | " .+++++. ", 11 | " @@@@@@@@@.+++++..........@@@ ", 12 | " .++...+++++++++. ", 13 | " ..... .++. .+++++++++. ", 14 | " @..++++.@.++.@....+++....@@@ ", 15 | " .++++++..++. .+++. ", 16 | " .++..++..++......+++........ ", 17 | " .++..++..++++++..+++.++++++. ", 18 | " @.++..++..++++++..+++.++++++. ", 19 | " .++..++..++......+++.++..... ", 20 | " .++++++..++. .+++.++. ", 21 | " @.+++++...++.@@@@.+++.++.@@@ ", 22 | " .++... .++. .+++.++. ", 23 | " .++. .++. .+++.++..... ", 24 | " @.++.@@@@.++.@@@@.+++.++++++. ", 25 | " .++. .++. .+++.++++++. ", 26 | " .++......++. .+++.++..... ", 27 | " @.++++++..++.@@@@.+++.++.@@@ ", 28 | " .++++. .++. .+++.++. ", 29 | " .... .++. .+++.++. ", 30 | " @@@@@@@@@.++.@@@@.+++.++.@@@ ", 31 | " .++. .+++.++. ", 32 | " .++. .+++.++. ", 33 | " @@@@@@@@@.++.@@@@.+++.++.@@@ ", 34 | " .++. .+++.++. ", 35 | " .++. .+++.++..... ", 36 | " @@@@@@@@@.++.@@@@.+++.++++++. ", 37 | " .... .+++.++++++. ", 38 | " ............ ", 39 | " "}; 40 | -------------------------------------------------------------------------------- /packaging/shared/efte40x40.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * efte40x40_xpm[] = { 3 | "40 40 4 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #FF0000", 7 | "@ c #FFFFFF", 8 | " ", 9 | " ........ ", 10 | " .++++++. ", 11 | " .++++++. ", 12 | " @@@@@@@@@@@@.++++++.............@@@ ", 13 | " .++....+++++++++++.. ", 14 | " ...... .++.. .+++++++++++.. ", 15 | " ..+++++. .++.. .....+++...... ", 16 | " @@..+++++.@@.++..@.....+++......@@@ ", 17 | " .+++++++...++.. .+++.. ", 18 | " .++...++...++........+++........... ", 19 | " .++...++...+++++++...+++..+++++++.. ", 20 | " @@.++...++...+++++++...+++..+++++++.. ", 21 | " .++...++...+++++++...+++..+++++++.. ", 22 | " .++...++...++........+++..++....... ", 23 | " .+++++++...++.. .+++..++.. ", 24 | " @@.++++++....++..@@@@@.+++..++..@@@ ", 25 | " .++.... .++.. .+++..++.. ", 26 | " .++.... .++.. .+++..++.. ", 27 | " .++.. .++.. .+++..++....... ", 28 | " @@.++..@@@@@.++..@@@@@.+++..+++++++.. ", 29 | " .++.. .++.. .+++..+++++++.. ", 30 | " .++... .++.. .+++..++....... ", 31 | " .++...... .++.. .+++..++....... ", 32 | " @@.+++++++.@.++..@@@@@.+++..++..@@@ ", 33 | " .+++++. .++.. .+++..++.. ", 34 | " ..... .++.. .+++..++.. ", 35 | " @@@@@@@@@@@@.++..@@@@@.+++..++..@@@ ", 36 | " .++.. .+++..++.. ", 37 | " .++.. .+++..++.. ", 38 | " .++.. .+++..++.. ", 39 | " @@@@@@@@@@@@.++..@@@@@.+++..++..@@@ ", 40 | " .++.. .+++..++.. ", 41 | " .++.. .+++..++.. ", 42 | " .++.. .+++..++....... ", 43 | " @@@@@@@@@@@@.++..@@@@@.+++..+++++++.. ", 44 | " ..... .+++..+++++++.. ", 45 | " ............... ", 46 | " ............... ", 47 | " "}; 48 | -------------------------------------------------------------------------------- /packaging/shared/eftewin32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/packaging/shared/eftewin32.ico -------------------------------------------------------------------------------- /packaging/source/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | NAME=efte 4 | 5 | VERSIONFILE="../../src/ftever.h" 6 | DEFAULTVERSION="$(sed -n 's/^\#define VERSION *\"//p' $VERSIONFILE |sed 's/\".*$//')" 7 | VERSION=${1:-$DEFAULTVERSION} # use DEFAULT version if not specified on command line 8 | [[ -z $VERSION ]] && exit 1 # no version, so exit if none specified and none found 9 | 10 | BASEPACKNAME=${NAME}-${VERSION} 11 | 12 | if [[ -d ${BASEPACKNAME} ]] ; then 13 | echo "Destination already exists. Previous packages with the same version number" 14 | echo "will be removed and existing destination will be renamed." 15 | echo "CTRL-C to abort, ENTER to continue..." 16 | read 17 | mv "$BASEPACKNAME" "${BASEPACKNAME}.$(date +%s)" 18 | rm -f "$BASEPACKNAME.tar.gz" "$BASEPACKNAME.tar.bz2" "$BASEPACKNAME.zip" 19 | fi 20 | 21 | svn co http://$NAME.svn.sourceforge.net/svnroot/$NAME/tags/${BASEPACKNAME} ${BASEPACKNAME} && 22 | find "$BASEPACKNAME" -type d -name .svn | while read DIR ; do rm -r "$DIR" ; done 23 | 24 | tar czf ${BASEPACKNAME}.tar.gz ${BASEPACKNAME} 25 | tar cjf ${BASEPACKNAME}.tar.bz2 ${BASEPACKNAME} 26 | zip -r ${BASEPACKNAME}.zip ${BASEPACKNAME} 27 | 28 | echo "" 29 | echo "Upload to SourceForge? CTRL-C to abort, ENTER to continue..." 30 | read 31 | ncftpput upload.sourceforge.net /incoming \ 32 | ${BASEPACKNAME}.tar.bz2 ${BASEPACKNAME}.tar.gz ${BASEPACKNAME}.zip 33 | -------------------------------------------------------------------------------- /packaging/windows/x86.iss: -------------------------------------------------------------------------------- 1 | ; Script generated by the Inno Setup Script Wizard. 2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 3 | 4 | [Setup] 5 | AppName=eFTE 6 | AppVerName=eFTE 1.1 7 | AppPublisher=eFTE SF Group 8 | AppPublisherURL=http://efte.cowgar.com 9 | AppSupportURL=http://efte.cowgar.com 10 | AppUpdatesURL=http://efte.cowgar.com 11 | DefaultDirName={pf}\eFTE 12 | DefaultGroupName=eFTE 13 | LicenseFile=C:\efte\COPYING 14 | OutputDir=C:\efte\packaging\windows\x86 15 | OutputBaseFilename=efte-1.1 16 | Compression=lzma 17 | SolidCompression=yes 18 | 19 | [Languages] 20 | Name: "english"; MessagesFile: "compiler:Default.isl" 21 | 22 | [Tasks] 23 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked 24 | Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked 25 | 26 | [Files] 27 | Source: "C:\efte\build\src\efte.exe"; DestDir: "{app}"; Flags: ignoreversion 28 | Source: "C:\efte\config\*"; DestDir: "{app}\config"; Flags: ignoreversion recursesubdirs createallsubdirs 29 | Source: "C:\efte\AUTHORS"; DestDir: "{app}"; Flags: ignoreversion 30 | Source: "C:\efte\Artistic"; DestDir: "{app}"; Flags: ignoreversion 31 | Source: "C:\efte\COPYING"; DestDir: "{app}"; Flags: ignoreversion 32 | Source: "C:\efte\HISTORY"; DestDir: "{app}"; Flags: ignoreversion 33 | Source: "C:\efte\README"; DestDir: "{app}"; Flags: ignoreversion 34 | Source: "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.dll"; DestDir: "{app}" 35 | 36 | [Icons] 37 | Name: "{group}\eFTE"; Filename: "{app}\efte.exe" 38 | Name: "{group}\{cm:ProgramOnTheWeb,eFTE}"; Filename: "http://efte.cowgar.com" 39 | Name: "{group}\{cm:UninstallProgram,eFTE}"; Filename: "{uninstallexe}" 40 | Name: "{commondesktop}\eFTE"; Filename: "{app}\efte.exe"; Tasks: desktopicon 41 | Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\eFTE"; Filename: "{app}\efte.exe"; Tasks: quicklaunchicon 42 | 43 | [Run] 44 | Filename: "{app}\efte.exe"; Description: "{cm:LaunchProgram,eFTE}"; Flags: nowait postinstall skipifsilent 45 | 46 | -------------------------------------------------------------------------------- /src/AppController.h: -------------------------------------------------------------------------------- 1 | /* AppController.h 2 | * 3 | * Copyright (c) 2010, eFTE SF Group (see AUTHORS file) 4 | * 5 | * You may distribute under the terms of either the GNU General Public 6 | * License or the Artistic License, as specified in the README file. 7 | * 8 | */ 9 | 10 | #import 11 | 12 | 13 | @interface AppController : NSObject { 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /src/AppController.m: -------------------------------------------------------------------------------- 1 | /* AppController.m 2 | * 3 | * Copyright (c) 2010, eFTE SF Group (see AUTHORS file) 4 | * 5 | * You may distribute under the terms of either the GNU General Public 6 | * License or the Artistic License, as specified in the README file. 7 | * 8 | */ 9 | 10 | #import "AppController.h" 11 | 12 | 13 | @implementation AppController 14 | 15 | - (void) timerFired: (id) blah 16 | { 17 | MyDispatchEvent(); 18 | } 19 | 20 | - (id) init { 21 | if ((self = [super init])) { 22 | /* class-specific initialization goes here */ 23 | NSTimer *timer = [NSTimer timerWithTimeInterval: 0.0f 24 | target: self 25 | selector: @selector( timerFired: ) 26 | userInfo: nil 27 | repeats: YES]; 28 | 29 | [[NSRunLoop currentRunLoop] addTimer: timer 30 | forMode: NSDefaultRunLoopMode]; 31 | } 32 | return self; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /src/FTETextAreaView.h: -------------------------------------------------------------------------------- 1 | /* FTETextAreaView.m 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * 5 | * You may distribute under the terms of either the GNU General Public 6 | * License or the Artistic License, as specified in the README file. 7 | * 8 | */ 9 | 10 | #import 11 | 12 | @interface FTETextAreaView : NSView 13 | { 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /src/bin2c.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * bin2c - binary to C header compiler 3 | * 4 | */ 5 | 6 | #include "sysdep.h" 7 | 8 | #define BUFLEN (64 * 1024) 9 | 10 | unsigned char buf[BUFLEN]; 11 | 12 | int main(int argc, char **argv) { 13 | int fd; 14 | int i, n = 1, len; 15 | 16 | if (argc != 2) { 17 | fprintf(stderr, "Usage: %s filename\n", argv[0]); 18 | exit(1); 19 | } 20 | 21 | if ((fd = open(argv[1], O_RDONLY | O_BINARY)) == -1) { 22 | fprintf(stderr, "Open: %s, error=%d\n", argv[1], errno); 23 | exit(1); 24 | } 25 | printf("/* do not edit */\nunsigned char DefaultConfig[] = {\n"); 26 | while ((len = read(fd, buf, BUFLEN)) > 0) { 27 | for (i = 0; i < len; i++) { 28 | printf("0x%02.02X", buf[i]); 29 | if (n++ % 10) { 30 | printf(", "); 31 | } else { 32 | printf(",\n"); 33 | } 34 | } 35 | } 36 | close(fd); 37 | printf("\n};\n"); 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /src/bmps/close.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/close.bmp -------------------------------------------------------------------------------- /src/bmps/copy.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/copy.bmp -------------------------------------------------------------------------------- /src/bmps/cut.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/cut.bmp -------------------------------------------------------------------------------- /src/bmps/errnext.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/errnext.bmp -------------------------------------------------------------------------------- /src/bmps/errprev.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/errprev.bmp -------------------------------------------------------------------------------- /src/bmps/exit.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/exit.bmp -------------------------------------------------------------------------------- /src/bmps/last.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/last.bmp -------------------------------------------------------------------------------- /src/bmps/next.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/next.bmp -------------------------------------------------------------------------------- /src/bmps/open.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/open.bmp -------------------------------------------------------------------------------- /src/bmps/paste.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/paste.bmp -------------------------------------------------------------------------------- /src/bmps/pastecol.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/pastecol.bmp -------------------------------------------------------------------------------- /src/bmps/prev.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/prev.bmp -------------------------------------------------------------------------------- /src/bmps/redo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/redo.bmp -------------------------------------------------------------------------------- /src/bmps/save.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/save.bmp -------------------------------------------------------------------------------- /src/bmps/tagfind.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/tagfind.bmp -------------------------------------------------------------------------------- /src/bmps/tagnext.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/tagnext.bmp -------------------------------------------------------------------------------- /src/bmps/tagpop.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/tagpop.bmp -------------------------------------------------------------------------------- /src/bmps/tagprev.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/tagprev.bmp -------------------------------------------------------------------------------- /src/bmps/undo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/bmps/undo.bmp -------------------------------------------------------------------------------- /src/c_color.h: -------------------------------------------------------------------------------- 1 | /* c_color.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef COLOR_H_ 12 | #define COLOR_H_ 13 | 14 | #include "c_mode.h" 15 | 16 | extern ChColor hcStatus_Normal; 17 | extern ChColor hcStatus_Active; 18 | 19 | extern ChColor hcPlain_Normal; 20 | extern ChColor hcPlain_Background; 21 | extern ChColor hcPlain_Selected; 22 | extern ChColor hcPlain_Markers; 23 | extern ChColor hcPlain_Found; 24 | extern ChColor hcPlain_Keyword; 25 | extern ChColor hcPlain_Folds[5]; 26 | extern ChColor hcPlain_HilitWord; 27 | extern ChColor hcPlain_Bookmark; 28 | 29 | extern ChColor hcEntry_Field; 30 | extern ChColor hcEntry_Prompt; 31 | extern ChColor hcEntry_Selection; 32 | 33 | //extern ChColor hcList_Border; 34 | extern ChColor hcList_Status; 35 | extern ChColor hcList_Normal; 36 | extern ChColor hcList_Selected; 37 | extern ChColor hcList_Hilited; 38 | extern ChColor hcList_HilitSelect; 39 | extern ChColor hcList_Marked; 40 | extern ChColor hcList_MarkSelect; 41 | extern ChColor hcList_MarkHilit; 42 | extern ChColor hcList_MarkHilitSel; 43 | 44 | extern ChColor hcScrollBar_Arrows; 45 | extern ChColor hcScrollBar_Back; 46 | extern ChColor hcScrollBar_Fore; 47 | 48 | extern ChColor hcAsciiChars; 49 | 50 | extern ChColor hcMenu_Background; 51 | extern ChColor hcMenu_ActiveItem; 52 | extern ChColor hcMenu_ActiveChar; 53 | extern ChColor hcMenu_NormalItem; 54 | extern ChColor hcMenu_NormalChar; 55 | 56 | extern ChColor hcChoice_Title; 57 | extern ChColor hcChoice_Param; 58 | extern ChColor hcChoice_Background; 59 | extern ChColor hcChoice_ActiveItem; 60 | extern ChColor hcChoice_ActiveChar; 61 | extern ChColor hcChoice_NormalItem; 62 | extern ChColor hcChoice_NormalChar; 63 | 64 | extern ChColor MsgColor[3]; 65 | 66 | int SetColor(const char *ColorV, const char *Value); 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /src/c_config.h: -------------------------------------------------------------------------------- 1 | /* c_config.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef CCONFIG_H_ 12 | #define CCONFIG_H_ 13 | 14 | #include "sysdep.h" 15 | 16 | typedef struct _CurPos { 17 | unsigned int sz; 18 | char *a; 19 | char *c; 20 | char *z; 21 | int line; 22 | const char *name; // filename 23 | } CurPos; 24 | 25 | extern int CFteMain(); 26 | 27 | typedef struct { 28 | unsigned char tag; 29 | unsigned short len; 30 | void *obj; 31 | } CachedObject; 32 | 33 | // Cached objects 34 | #define CACHE_SIZE 512000 35 | extern CachedObject cache[CACHE_SIZE]; 36 | extern unsigned int cpos; 37 | extern int verbosity; 38 | 39 | extern int ScreenSizeX; 40 | extern int ScreenSizeY; 41 | extern bool CursorBlink; 42 | extern bool CursorWithinEOL; 43 | extern int CursorInsertMask; 44 | extern int CursorOverMask; 45 | extern int SystemClipboard; 46 | extern int OpenAfterClose; 47 | extern int ShowMenuBar; 48 | extern int ShowToolBar; 49 | extern int SelectPathname; 50 | extern char DefaultModeName[32]; 51 | extern int WSStyleSearch; 52 | extern char PrintDevice[MAXPATH]; 53 | extern char CompileCommand[256]; 54 | extern int KeepHistory; 55 | extern int LoadDesktopOnEntry; 56 | extern int SaveDesktopOnExit; 57 | extern int KeepMessages; 58 | extern int ScrollBorderX; 59 | extern int ScrollBorderY; 60 | extern int ScrollJumpX; 61 | extern int ScrollJumpY; 62 | extern int GUIDialogs; 63 | extern int SevenBit; 64 | extern int WeirdScroll; 65 | extern int LoadDesktopMode; 66 | extern char HelpCommand[128]; 67 | extern char *ConfigSourcePath; 68 | extern char ConfigFileName[MAXPATH]; 69 | extern int IgnoreBufferList; 70 | extern char CvsCommand[256]; 71 | extern char CvsLogMode[32]; 72 | extern char SvnCommand[256]; 73 | extern char SvnLogMode[32]; 74 | extern int ReassignModelIds; 75 | extern int RecheckReadOnly; 76 | extern char XShellCommand[256]; 77 | extern char BackupDirectory[MAXPATH]; 78 | 79 | const char *GetGUICharacters(const char *which, const char *defChars); 80 | int LoadConfig(int argc, char **argv, const char *CfgFileName); 81 | int LoadDefaultConfig(); 82 | int GetIndentMode(const char *Str); 83 | int GetHilitMode(const char *Str); 84 | int UseDefaultConfig(); 85 | int AddCRegexp(int file, int line, int msg, const char *regexp); 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /src/c_desktop.h: -------------------------------------------------------------------------------- 1 | /* c_desktop.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef DESKTOP_H_ 12 | #define DESKTOP_H_ 13 | 14 | #ifdef UNIX 15 | # define DESKTOP_NAME ".efte-desktop" 16 | #else 17 | # define DESKTOP_NAME "efte.dsk" 18 | #endif 19 | 20 | extern char DesktopFileName[256]; 21 | 22 | int SaveDesktop(char *FileName); 23 | int LoadDesktop(char *FileName); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/c_fconfig.h: -------------------------------------------------------------------------------- 1 | /* c_fconfig.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef FCONFIG_H_ 12 | #define FCONFIG_H_ 13 | 14 | #define CF_STRING 1 15 | #define CF_INT 2 16 | #define CF_REGEXP 3 17 | 18 | #define CF_END 100 19 | #define CF_SUB 101 20 | #define CF_MENU 102 21 | #define CF_OBJECT 103 22 | #define CF_COMMAND 104 23 | #define CF_ITEM 105 24 | #define CF_SUBMENU 106 25 | #define CF_MENUSUB 107 26 | #define CF_MODE 108 27 | #define CF_PARENT 109 28 | #define CF_KEYSUB 110 29 | #define CF_KEY 111 30 | #define CF_COLOR 112 31 | #define CF_KEYWORD 113 32 | #define CF_SETVAR 114 33 | #define CF_COMPRX 115 34 | #define CF_EVENTMAP 116 35 | #define CF_COLORIZE 117 36 | #define CF_ABBREV 118 37 | #define CF_HSTATE 119 38 | #define CF_HTRANS 120 39 | #define CF_HWORDS 121 40 | #define CF_SUBMENUCOND 122 41 | #define CF_HWTYPE 123 42 | #define CF_VARIABLE 124 43 | #define CF_CONCAT 125 44 | #define CF_CVSIGNRX 126 45 | #define CF_SVNIGNRX 127 46 | 47 | #define CF_EOF 254 48 | 49 | #define CONFIG_ID 0x1A1D70E1 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/c_history.h: -------------------------------------------------------------------------------- 1 | /* c_history.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef FPOSHIST_H_ 12 | #define FPOSHIST_H_ 13 | 14 | #ifdef UNIX 15 | #define HISTORY_NAME ".efte-history" 16 | #else 17 | #define HISTORY_NAME "efte.his" 18 | #endif 19 | 20 | typedef struct { 21 | char *Name; 22 | int Row, Col; 23 | } HBookmark; 24 | 25 | typedef struct { 26 | char *FileName; 27 | int Row, Col; 28 | HBookmark **Books; 29 | int BookCount; 30 | } FPosHistory; 31 | 32 | #define MAX_INPUT_HIST 128 33 | 34 | typedef struct { 35 | int Count; 36 | char **Line; 37 | int *Id; 38 | } InputHistory; 39 | 40 | extern char HistoryFileName[256]; 41 | 42 | void ClearHistory(); 43 | int SaveHistory(const char *FileName); 44 | int LoadHistory(const char *FileName); 45 | 46 | int UpdateFPos(const char *FileName, int Row, int Col); 47 | int RetrieveFPos(const char *FileName, int &Row, int &Col); 48 | 49 | int AddInputHistory(int Id, const char *String); 50 | int CountInputHistory(int Id); 51 | int GetInputHistory(int Id, char *String, int maxlen, int Nth); 52 | 53 | // some platforms don't know about EBuffer yet 54 | class EBuffer; 55 | /* 56 | * Get bookmarks for given Buffer (file) from history. 57 | */ 58 | int RetrieveBookmarks(EBuffer *buf); 59 | /* 60 | * Store given Buffer's bookmarks to history. 61 | */ 62 | int StoreBookmarks(EBuffer *buf); 63 | 64 | /* history values */ 65 | #define HIST_DEFAULT 0 66 | #define HIST_PATH 1 67 | #define HIST_SEARCH 2 68 | #define HIST_POSITION 3 69 | #define HIST_SETUP 4 70 | #define HIST_SHELL 5 71 | #define HIST_COMPILE 6 72 | #define HIST_SEARCHOPT 7 73 | #define HIST_BOOKMARK 8 74 | #define HIST_REGEXP 9 75 | #define HIST_TRANS 10 76 | #define HIST_TAGFILES 11 77 | #define HIST_CVS 12 78 | #define HIST_CVSDIFF 13 79 | #define HIST_CVSCOMMIT 14 80 | #define HIST_SVN 15 81 | #define HIST_SVNDIFF 16 82 | #define HIST_SVNCOMMIT 17 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /src/clip.h: -------------------------------------------------------------------------------- 1 | /* clip.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef CLIPLIB_H_ 12 | #define CLIPLIB_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | typedef struct { 19 | unsigned long fLen; 20 | char *fChar; 21 | } ClipData; 22 | 23 | int GetClipText(ClipData *cd); 24 | int PutClipText(ClipData *cd); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /src/clip_gpm.cpp: -------------------------------------------------------------------------------- 1 | /* clip_gpm.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | int GetPMClip(int clipboard) { 14 | return 0; 15 | } 16 | 17 | int PutPMClip(int clipboard) { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/clip_no.cpp: -------------------------------------------------------------------------------- 1 | /* clip_no.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | int GetPMClip(int clipboard) { 14 | return 0; 15 | } 16 | 17 | int PutPMClip(int clipboard) { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/clip_os2.cpp: -------------------------------------------------------------------------------- 1 | /* clip_os2.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | #include "clip.h" 13 | 14 | int GetPMClip(int clipboard) { 15 | ClipData cd; 16 | unsigned int i, j, l, dx; 17 | EPoint P; 18 | 19 | if (clipboard != 0) { 20 | // only one clipboard supported 21 | return 0; 22 | } 23 | if (GetClipText(&cd) == 0) { 24 | SSBuffer->Clear(); 25 | j = 0; 26 | l = 0; 27 | 28 | for (i = 0; i < cd.fLen; i++) { 29 | if (cd.fChar[i] == 0x0A) { 30 | SSBuffer->AssertLine(l); 31 | P.Col = 0; 32 | P.Row = l++; 33 | dx = 0; 34 | if ((i > 0) && (cd.fChar[i-1] == 0x0D)) dx++; 35 | SSBuffer->InsertLine(P, i - j - dx, cd.fChar + j); 36 | j = i + 1; 37 | } 38 | } 39 | if (j < cd.fLen) { // remainder 40 | i = cd.fLen; 41 | SSBuffer->AssertLine(l); 42 | P.Col = 0; 43 | P.Row = l++; 44 | dx = 0; 45 | if ((i > 0) && (cd.fChar[i-1] == 0x0D)) dx++; 46 | SSBuffer->InsText(P.Row, P.Col, i - j - dx, cd.fChar + j); 47 | j = i + 1; 48 | } 49 | 50 | // now that we don't need cd.fChar anymore, free it 51 | free(cd.fChar); 52 | } 53 | return 0; 54 | } 55 | 56 | int PutPMClip(int clipboard) { 57 | char *p = 0; 58 | int l = 0; 59 | PELine L; 60 | int Len; 61 | ClipData cd; 62 | int rc; 63 | 64 | if (clipboard != 0) { 65 | // only one clipboard supported 66 | return 0; 67 | } 68 | for (int i = 0; i < SSBuffer->RCount; i++) { 69 | L = SSBuffer->RLine(i); 70 | p = (char *)realloc(p, l + (Len = L->Count) + 2); 71 | memcpy(p + l, L->Chars, L->Count); 72 | l += Len; 73 | if (i < SSBuffer->RCount - 1) { 74 | p[l++] = 13; 75 | p[l++] = 10; 76 | } 77 | } 78 | p = (char *)realloc(p, l + 1); 79 | p[l++] = 0; 80 | cd.fChar = p; 81 | cd.fLen = l; 82 | rc = (PutClipText(&cd) == 0); 83 | free(p); 84 | return rc ? 1 : 0; 85 | } 86 | -------------------------------------------------------------------------------- /src/clip_pm.cpp: -------------------------------------------------------------------------------- 1 | /* clip_pm.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | #include "clip.h" 13 | 14 | #define INCL_WIN 15 | #include 16 | #include 17 | #include 18 | 19 | extern HAB hab; 20 | 21 | int GetClipText(ClipData *cd) { 22 | char *text; 23 | 24 | cd->fLen = 0; 25 | cd->fChar = 0; 26 | if ((WinOpenClipbrd(hab) == TRUE) && 27 | ((text = (char *) WinQueryClipbrdData(hab, CF_TEXT)) != 0)) { 28 | cd->fLen = strlen(text); 29 | cd->fChar = strdup(text); 30 | } 31 | WinCloseClipbrd(hab); 32 | return 0; 33 | } 34 | 35 | int PutClipText(ClipData *cd) { 36 | ULONG len; 37 | void *text; 38 | 39 | if (WinOpenClipbrd(hab) == TRUE) { 40 | WinEmptyClipbrd(hab); 41 | len = cd->fLen; 42 | 43 | if (len) { 44 | DosAllocSharedMem((void **)&text, 45 | 0, 46 | len + 1, 47 | PAG_READ | PAG_WRITE | PAG_COMMIT | OBJ_GIVEABLE); 48 | strncpy((char *)text, cd->fChar, len + 1); 49 | if (!WinSetClipbrdData(hab, (ULONG) text, CF_TEXT, CFI_POINTER)) 50 | DosBeep(100, 1500); 51 | 52 | } 53 | WinCloseClipbrd(hab); 54 | } 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /src/clip_x11.cpp: -------------------------------------------------------------------------------- 1 | /* clip_x11.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | int GetXSelection(int *len, char **data, int clipboard); 14 | int SetXSelection(int len, char *data, int clipboard); 15 | 16 | int GetPMClip(int clipboard) { 17 | char *data; 18 | int len; 19 | int i, j, l, dx; 20 | EPoint P; 21 | 22 | if (GetXSelection(&len, &data, clipboard) == 0) { 23 | SSBuffer->Clear(); 24 | j = 0; 25 | l = 0; 26 | 27 | for (i = 0; i < len; i++) { 28 | if (data[i] == '\n') { 29 | SSBuffer->AssertLine(l); 30 | P.Col = 0; 31 | P.Row = l++; 32 | dx = 0; 33 | if ((i > 0) && (data[i-1] == '\r')) dx++; 34 | SSBuffer->InsertLine(P, i - j - dx, data + j); 35 | j = i + 1; 36 | } 37 | } 38 | if (j < len) { // remainder 39 | i = len; 40 | SSBuffer->AssertLine(l); 41 | P.Col = 0; 42 | P.Row = l++; 43 | dx = 0; 44 | if ((i > 0) && (data[i-1] == '\r')) dx++; 45 | SSBuffer->InsText(P.Row, P.Col, i - j - dx, data + j); 46 | j = i + 1; 47 | } 48 | free(data); 49 | return 1; 50 | } 51 | return 0; 52 | } 53 | 54 | int PutPMClip(int clipboard) { 55 | PELine L; 56 | char *p = NULL; 57 | int rc = 0; 58 | int l = 0; 59 | 60 | for (int i = 0; i < SSBuffer->RCount; i++) { 61 | L = SSBuffer->RLine(i); 62 | char *n = (char *)realloc(p, l + L->Count + 1); 63 | if (n != NULL) { 64 | for (int j = 0; j < L->Count; j++) { 65 | if ((j < (L->Count - 1)) && (L->Chars[j + 1] == '\b')) 66 | j++; 67 | else 68 | n[l++] = L->Chars[j]; 69 | } 70 | if (i < SSBuffer->RCount - 1) 71 | n[l++] = '\n'; 72 | else 73 | n[l] = 0; 74 | } else 75 | break; 76 | p = n; // if p already contains some address it will be freed 77 | } 78 | 79 | if (p != NULL) { 80 | // remove some 'UNWANTED' characters - sequence XX 0x08 YY -> YY 81 | // this makes usable cut&paste from manpages 82 | rc = (SetXSelection(l, p, clipboard) == 0); 83 | free(p); 84 | } 85 | return (rc) ? 1 : 0; 86 | } 87 | -------------------------------------------------------------------------------- /src/clipprog.cpp: -------------------------------------------------------------------------------- 1 | /* clipprog.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | 12 | #define INCL_DOS 13 | #define INCL_PM 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #define SEM_PREFIX "\\SEM32\\PMCLIPS\\" 21 | #define MEM_PREFIX "\\SHAREMEM\\PMCLIPS\\" 22 | 23 | #define CMD_GET 1 24 | #define CMD_PUT 2 25 | 26 | HAB hab; 27 | HMQ hmq; 28 | QMSG qmsg; 29 | HMTX hmtxSyn; 30 | HEV hevGet; 31 | HEV hevPut; 32 | HEV hevEnd; 33 | HMUX hmuxWait; 34 | 35 | void clipsrv(void *foo) { 36 | HAB hab; 37 | HMQ hmq; 38 | ULONG Cmd; 39 | ULONG len; 40 | char *text; 41 | void *shmem = "the text"; 42 | 43 | hab = NULLHANDLE; 44 | 45 | if ((WinOpenClipbrd(hab) == TRUE) && 46 | ((text = (char *) WinQueryClipbrdData(hab, CF_TEXT)) != 0)) { 47 | DosGetSharedMem(text, PAG_READ); 48 | len = strlen(text); 49 | puts(text); 50 | } 51 | WinCloseClipbrd(hab); 52 | 53 | len = strlen(shmem); 54 | if (len) { 55 | DosAllocSharedMem((void **)&text, 56 | 0, 57 | len + 1, 58 | PAG_WRITE | PAG_COMMIT | OBJ_GIVEABLE | OBJ_GETTABLE); 59 | strcpy(text, shmem); 60 | } 61 | 62 | if (WinOpenClipbrd(hab) == TRUE) { 63 | if (!WinSetClipbrdData(hab, (ULONG) text, CF_TEXT, CFI_POINTER)) 64 | DosBeep(100, 1500); 65 | WinCloseClipbrd(hab); 66 | } 67 | } 68 | 69 | int main() { 70 | clipsrv(NULL); 71 | return 0; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /src/clipserv.def: -------------------------------------------------------------------------------- 1 | NAME clipserv WINDOWAPI 2 | DESCRIPTION 'FTE Clipboard access server for VIO' 3 | STACKSIZE 49152 4 | -------------------------------------------------------------------------------- /src/cliputil.cpp: -------------------------------------------------------------------------------- 1 | /* cliputil.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "clip.h" 12 | #include 13 | #include 14 | #include 15 | 16 | #define MAXCLIPTEXT 256 * 1024 /* just for demo */ 17 | 18 | char buffer[MAXCLIPTEXT]; 19 | 20 | int main(int argc, char **argv) { 21 | ClipData cd; 22 | 23 | if ((argc == 2) && (strcmp(argv[1], "-s") == 0)) { 24 | cd.fLen = fread(buffer, 1, MAXCLIPTEXT, stdin); 25 | cd.fChar = buffer; 26 | if (PutClipText(&cd) == -1) { 27 | fprintf(stderr, "Coult not set clipboard text\n"); 28 | return 1; 29 | } 30 | } else if (argc == 1) { 31 | if (GetClipText(&cd) == 0) { 32 | if ((cd.fLen != 0) && cd.fChar) { 33 | printf("%s", cd.fChar); 34 | } 35 | } else { 36 | fprintf(stderr, "Could not get clipboard text\n"); 37 | return 1; 38 | } 39 | } else { 40 | fprintf(stderr, 41 | "Usage: %s {-s}\n" 42 | "\n" 43 | "Examples:\n" 44 | " cliputil | more\n" 45 | " dir | cliputil -s\n", 46 | argv[0]); 47 | return 1; 48 | } 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /src/cliputil.def: -------------------------------------------------------------------------------- 1 | NAME ClipUtil WINDOWCOMPAT 2 | DESCRIPTION 'Clipboard Utility - get/put clipboard text from command line' 3 | STACKSIZE 49152 4 | -------------------------------------------------------------------------------- /src/cocoa.h: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // fte 4 | // 5 | // Created by Lauri Nurmi on 5.1.2008. 6 | // Copyright __MyCompanyName__ 2008. All rights reserved. 7 | // 8 | 9 | int cacao(); 10 | -------------------------------------------------------------------------------- /src/cocoa.mm: -------------------------------------------------------------------------------- 1 | /* cocoa.mm 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * 5 | * You may distribute under the terms of either the GNU General Public 6 | * License or the Artistic License, as specified in the README file. 7 | * 8 | */ 9 | 10 | #import 11 | #import "AppController.h" 12 | 13 | int cacao() { 14 | int argc = 1; 15 | char *myarg = ""; 16 | char **argv = &myarg; 17 | 18 | AppController *delegate = [[AppController alloc] init]; 19 | [NSApp setDelegate: delegate]; 20 | 21 | return NSApplicationMain(argc, (const char **) argv); 22 | } 23 | -------------------------------------------------------------------------------- /src/commands.cpp: -------------------------------------------------------------------------------- 1 | /* commands.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | int GetDefaultDirectory(EModel *M, char *Path, int MaxLen) { 14 | if (M) 15 | M->GetPath(Path, MaxLen); 16 | if (!M || Path[0] == 0) 17 | if (ExpandPath(".", Path, MaxLen) == -1) 18 | return 0; 19 | SlashDir(Path); 20 | return 1; 21 | } 22 | 23 | int SetDefaultDirectory(EModel *M) { 24 | char Path[MAXPATH]; 25 | 26 | if (GetDefaultDirectory(M, Path, sizeof(Path)) == 0) 27 | return 0; 28 | if (ChangeDir(Path) == -1) 29 | return 0; 30 | return 1; 31 | } 32 | -------------------------------------------------------------------------------- /src/con_i18n.h: -------------------------------------------------------------------------------- 1 | /* 2 | * con_i18n.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef CONI18N_H_ 12 | #define CONI18N_H_ 13 | 14 | #include 15 | #include 16 | 17 | /* 18 | * For now the only supported input style is root !!! 19 | * in future this should be read from resources 20 | */ 21 | #define XIM_INPUT_STYLE "Root" 22 | 23 | struct remapKey { 24 | KeySym key_english; 25 | KeySym key_remap; 26 | }; 27 | 28 | struct keyboardRec { 29 | struct remapKey *tab; 30 | KeySym deadkey; 31 | short next; 32 | }; 33 | 34 | typedef struct { 35 | XIC xic; 36 | #if XlibSpecificationRelease >= 6 37 | XIM xim; 38 | XIMStyles* xim_styles; 39 | XIMStyle input_style; 40 | #endif 41 | } i18n_context_t; 42 | 43 | /* 44 | * prototypes for I18N functions 45 | */ 46 | void i18n_focus_out(i18n_context_t*); 47 | void i18n_focus_in(i18n_context_t*); 48 | int i18n_lookup_sym(XKeyEvent *, char *, int, KeySym *, XIC); 49 | i18n_context_t* i18n_open(Display *, Window, unsigned long *); 50 | void i18n_destroy(i18n_context_t**); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/con_ikcz.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/con_ikcz.h -------------------------------------------------------------------------------- /src/config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_H__ 2 | #define __CONFIG_H__ 3 | 4 | /* config.h. Generated by cmake from config.h.in */ 5 | 6 | #define EFTE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/dialog.h: -------------------------------------------------------------------------------- 1 | /* dialog.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef DIALOG_H_ 12 | #define DIALOG_H_ 13 | 14 | #define askYes 0 15 | #define askNo 1 16 | #define askCancel 2 17 | #define askOK 3 18 | 19 | int AskString(char *Prompt, char *String, int MaxLen); 20 | int AskYesNo(char *Prompt); 21 | int AskYesNoCancel(char *Prompt); 22 | int AskOKCancel(char *Prompt); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/e_cvslog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * e_cvslog.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | * Contributed by Martin Frydl 10 | * 11 | * Subclass of EBuffer for writing log for CVS commit. Creates temporary file 12 | * used for commit which is deleted when view is closed. Asks for commit or 13 | * discard on view close. 14 | */ 15 | 16 | #ifndef _CVSLOG_H_ 17 | #define _CVSLOG_H_ 18 | 19 | #include "e_buffer.h" 20 | 21 | class ECvsLog: public EBuffer { 22 | public: 23 | ECvsLog(int createFlags, EModel **ARoot, const char *Directory, const char *OnFiles); 24 | ~ECvsLog(); 25 | 26 | // List files into buffer 27 | // p - line where to print 28 | // fCount - number of files which will be printed 29 | // title - title 30 | // cnt - total number of files 31 | // position - positions of files in list 32 | // len - length of files 33 | // status - status of files 34 | // list - list of filenames 35 | // incexc - status of files to print/not to print 36 | // exc - incexc is exclusion 37 | void ListFiles(int &p, const int fCount, const char *title, const int cnt, const int *position, const int *len, const char *status, const char *list, const char *excinc, const int exc = 0); 38 | 39 | virtual int CanQuit() const; 40 | virtual int ConfQuit(GxView *V, int multiFile = 0); 41 | virtual EViewPort *CreateViewPort(EView *V); 42 | 43 | virtual void GetName(char *AName, int MaxLen) const; 44 | virtual void GetInfo(char *AInfo, int MaxLen) const; 45 | virtual void GetTitle(char *ATitle, int MaxLen, char *ASTitle, int SMaxLen) const; 46 | }; 47 | 48 | extern ECvsLog *CvsLogView; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/e_mark.h: -------------------------------------------------------------------------------- 1 | /* 2 | * e_mark.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | #ifndef EMARK_H_ 11 | #define EMARK_H_ 12 | 13 | #include "e_buffer.h" 14 | 15 | #include // FILE 16 | 17 | class EMark { 18 | public: 19 | EMark(const char *aName, const char *aFileName, EPoint aPoint, EBuffer *aBuffer = 0); 20 | ~EMark(); 21 | 22 | int SetBuffer(EBuffer *aBuffer); 23 | int RemoveBuffer(EBuffer *aBuffer); 24 | 25 | char *GetName() { 26 | return Name; 27 | } 28 | char *GetFileName() { 29 | return FileName; 30 | } 31 | EPoint &GetPoint(); 32 | EBuffer *GetBuffer() { 33 | return Buffer; 34 | } 35 | private: 36 | /* bookmark */ 37 | char *Name; 38 | EPoint Point; 39 | char *FileName; 40 | 41 | /* bookmark in file */ 42 | EBuffer *Buffer; 43 | }; 44 | 45 | class EMarkIndex { 46 | public: 47 | EMarkIndex(); 48 | ~EMarkIndex(); 49 | 50 | EMark *Insert(const char *aName, const char *aFileName, EPoint aPoint, EBuffer *aBuffer = 0); 51 | EMark *Insert(const char *aName, EBuffer *aBuffer, EPoint aPoint); 52 | EMark *Locate(const char *aName); 53 | int Remove(const char *aName); 54 | int View(EView *aView, const char *aName); 55 | 56 | // int MarkPush(EBuffer *B, EPoint P); 57 | // int MarkPop(EView *V); 58 | // int MarkSwap(EView *V, EBuffer *B, EPoint P); 59 | // int MarkNext(EView *V); 60 | // int MarkPrev(EView *V); 61 | EMark *PushMark(EBuffer *aBuffer, EPoint P); 62 | int PopMark(EView *aView); 63 | 64 | int RetrieveForBuffer(EBuffer *aBuffer); 65 | int StoreForBuffer(EBuffer *aBuffer); 66 | 67 | int SaveToDesktop(FILE *fp); 68 | 69 | private: 70 | int markCount; 71 | EMark **marks; 72 | }; 73 | 74 | extern EMarkIndex markIndex; 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /src/e_os2.cpp: -------------------------------------------------------------------------------- 1 | /* e_os2.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1997, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | // Win32 (NT) specific routines 12 | 13 | #include "fte.h" 14 | 15 | int EView::SysShowHelp(ExState &State, const char *word) { 16 | char file[MAXPATH] = ""; 17 | char cmd[1024]; 18 | 19 | if (State.GetStrParam(this, file, sizeof(file) - 1) == 0) 20 | if (MView->Win->GetStr("Help file", 21 | sizeof(file) - 1, file, HIST_DEFAULT) == 0) 22 | return 0; 23 | 24 | char wordAsk[64] = ""; 25 | if (word == 0) { 26 | if (State.GetStrParam(this, wordAsk, sizeof(wordAsk) - 1) == 0) 27 | if (MView->Win->GetStr("Keyword", 28 | sizeof(wordAsk) - 1, wordAsk, HIST_DEFAULT) == 0) 29 | return 0; 30 | word = wordAsk; 31 | } 32 | 33 | sprintf(cmd, "%s %s %s", HelpCommand, file, word); 34 | 35 | if (system(cmd) != 0) { 36 | Msg(S_ERROR, "Failed to start view.exe!"); 37 | return 0; 38 | } 39 | return 1; 40 | } 41 | -------------------------------------------------------------------------------- /src/e_svnlog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * e_svnlog.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | * S.Pinigin copy o_cvslog.h and replace cvs/Cvs/CVS to svn/Svn/SVN. 10 | * 11 | * Subclass of EBuffer for writing log for SVN commit. Creates temporary file 12 | * used for commit which is deleted when view is closed. Asks for commit or 13 | * discard on view close. 14 | */ 15 | 16 | #ifndef _SVNLOG_H_ 17 | #define _SVNLOG_H_ 18 | 19 | #include "e_buffer.h" 20 | 21 | class ESvnLog: public EBuffer { 22 | public: 23 | ESvnLog(int createFlags, EModel **ARoot, const char *Directory, const char *OnFiles); 24 | ~ESvnLog(); 25 | 26 | // List files into buffer 27 | // p - line where to print 28 | // fCount - number of files which will be printed 29 | // title - title 30 | // cnt - total number of files 31 | // position - positions of files in list 32 | // len - length of files 33 | // status - status of files 34 | // list - list of filenames 35 | // incexc - status of files to print/not to print 36 | // exc - incexc is exclusion 37 | void ListFiles(int &p, const int fCount, const char *title, const int cnt, const int *position, const int *len, const char *status, const char *list, const char *excinc, const int exc = 0); 38 | 39 | virtual int CanQuit() const; 40 | virtual int ConfQuit(GxView *V, int multiFile = 0); 41 | virtual EViewPort *CreateViewPort(EView *V); 42 | 43 | virtual void GetName(char *AName, int MaxLen) const; 44 | virtual void GetInfo(char *AInfo, int MaxLen) const; 45 | virtual void GetTitle(char *ATitle, int MaxLen, char *ASTitle, int SMaxLen) const; 46 | }; 47 | 48 | extern ESvnLog *SvnLogView; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/e_tags.h: -------------------------------------------------------------------------------- 1 | /* 2 | * e_tags.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * Copyright (c) 1994-1996, Marko Macek 6 | * 7 | * You may distribute under the terms of either the GNU General Public 8 | * License or the Artistic License, as specified in the README file. 9 | * 10 | */ 11 | 12 | #ifndef TAGS_H_ 13 | #define TAGS_H_ 14 | 15 | #include // FILE 16 | 17 | class EView; 18 | class EBuffer; 19 | 20 | int TagsAdd(const char *FileName); 21 | int TagsSave(FILE *fp); 22 | int TagsLoad(int id); 23 | 24 | int TagLoad(const char *FileName); 25 | void TagClear(); 26 | int TagGoto(EView *V, char *Tag); 27 | int TagDefined(const char *Tag); 28 | int TagFind(EBuffer *B, EView *V, const char *Tag); 29 | int TagComplete(char **Words, int *WordsPos, int WordsMax, const char *Tag); 30 | int TagNext(EView *V); 31 | int TagPrev(EView *V); 32 | int TagPop(EView *V); 33 | 34 | #endif // __TAGS_H 35 | -------------------------------------------------------------------------------- /src/e_undo.h: -------------------------------------------------------------------------------- 1 | /* e_undo.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef UNDO_H_ 12 | #define UNDO_H_ 13 | 14 | /* 15 | * only core operations can be directly undone 16 | * - Insert # of Lines 17 | * - Delete # of Lines 18 | * - Insert # Line 19 | * - Delete Line Text 20 | * - Insert Line Text 21 | * - Positioning 22 | * - Block marking 23 | */ 24 | 25 | #define ucInsLine 1 26 | #define ucDelLine 2 27 | #define ucInsChars 3 28 | #define ucDelChars 4 29 | 30 | #define ucJoinLine 5 31 | #define ucSplitLine 6 32 | 33 | #define ucPosition 7 34 | #define ucBlock 8 35 | #define ucModified 9 36 | 37 | #define ucFoldCreate 11 38 | #define ucFoldDestroy 12 39 | #define ucFoldPromote 13 40 | #define ucFoldDemote 14 41 | #define ucFoldOpen 15 42 | #define ucFoldClose 16 43 | 44 | #define ucPlaceUserBookmark 17 45 | #define ucRemoveUserBookmark 18 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/e_win32.cpp: -------------------------------------------------------------------------------- 1 | /* e_win32.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1997, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | // Win32 (NT) specific routines 12 | 13 | #include "fte.h" 14 | 15 | // Silence warnings about redefinition, we don't need this here anyway. 16 | #undef SEARCH_ALL 17 | 18 | #include 19 | 20 | int EView::SysShowHelp(ExState &State, const char *word) { 21 | char file[MAXPATH] = ""; 22 | 23 | if (State.GetStrParam(this, file, sizeof(file) - 1) == 0) 24 | if (MView->Win->GetStr("Help file", 25 | sizeof(file) - 1, file, HIST_DEFAULT) == 0) 26 | return 0; 27 | 28 | char wordAsk[64] = ""; 29 | if (word == 0) { 30 | if (State.GetStrParam(this, wordAsk, sizeof(wordAsk) - 1) == 0) 31 | if (MView->Win->GetStr("Keyword", 32 | sizeof(wordAsk) - 1, wordAsk, HIST_DEFAULT) == 0) 33 | return 0; 34 | word = wordAsk; 35 | } 36 | 37 | //** Start WinHelp, 38 | if (!WinHelp(0, file, HELP_KEY, (DWORD)word)) { 39 | Msg(S_ERROR, "Failed to start WinHelp!"); 40 | return 0; 41 | } 42 | return 1; 43 | } 44 | -------------------------------------------------------------------------------- /src/fte-bcc2.mak: -------------------------------------------------------------------------------- 1 | # 2 | # fte-bcc2.mak 3 | # 4 | # Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | # 6 | # You may distribute under the terms of either the GNU General Public 7 | # License or the Artistic License, as specified in the README file. 8 | # 9 | 10 | LIBDIR = \BCOS2\LIB 11 | INCDIR = \BCOS2\INCLUDE 12 | 13 | .AUTODEPEND 14 | 15 | DEFINES=-DOS2 -DBCPP -DHEAPWALK -DINCL_32 16 | 17 | DEBUG = 18 | #DEBUG=-v 19 | 20 | INIT = $(LIBDIR)\c02.obj 21 | 22 | CC = bcc 23 | LD = tlink 24 | CCFLAGS = $(DEFINES) -L$(LIBDIR) -I$(INCDIR) -H=fte.CSM \ 25 | -k- -sm -K -w -w-par -Ot -RT- -xd- -x- -vi- -d -a -y $(DEBUG) 26 | 27 | LDFLAGS = -L$(LIBDIR) $(DEBUG) -s -Toe -Oc -B:0x10000 28 | OEXT=obj 29 | 30 | !include objs.inc 31 | 32 | .cpp.$(OEXT): 33 | $(CC) $(CCFLAGS) -c {$< } 34 | 35 | .c.$(OEXT): 36 | $(CC) $(CCFLAGS) -c {$< } 37 | 38 | all: cefte.exe efte.exe eftepm.exe clipserv.exe cliputil.exe 39 | 40 | defcfg.cnf: defcfg.fte cefte.exe 41 | cfte defcfg.fte defcfg.cnf 42 | 43 | defcfg.h: defcfg.cnf bin2c.exe 44 | bin2c defcfg.cnf >defcfg.h 45 | 46 | c_config.obj: defcfg.h 47 | 48 | bin2c.exe: bin2c.cpp 49 | $(CC) $(CCFLAGS) bin2c.cpp 50 | 51 | cefte.exe: $(CFTE_OBJS) 52 | $(LD) @&&| 53 | $(LDFLAGS) $(INIT) $**,cefte.exe,cfte.map,os2 c2mt,cfte.def 54 | | 55 | 56 | efte.exe: $(OBJS) $(VIOOBJS) 57 | $(LD) @&&| 58 | $(LDFLAGS) $(INIT) $**,efte.exe,fte.map,os2 c2mt,fte.def 59 | | 60 | 61 | eftepm.exe:: $(OBJS) $(PMOBJS) 62 | $(LD) @&&| 63 | $(LDFLAGS) $(INIT) $**,eftepm.exe,ftepm.map,c2mt os2,ftepm.def 64 | | 65 | rc -i $(INCDIR) ftepm.rc eftepm.exe 66 | 67 | clipserv.exe: clipserv.obj 68 | $(LD) @&&| 69 | $(LDFLAGS) $(INIT) $**,clipserv.exe,clipserv.map,c2mt os2,clipserv.def 70 | | 71 | 72 | cliputil.exe: cliputil.obj clip_vio.obj 73 | $(LD) @&&| 74 | $(LDFLAGS) $(INIT) $**,cliputil.exe,cliputil.map,c2mt os2,cliputil.def 75 | | 76 | 77 | eftepm.exe:: ftepm.res 78 | rc ftepm.res eftepm.exe 79 | 80 | ftepm.res: ftepm.rc pmdlg.rc 81 | rc -i $(INCDIR) -r ftepm.rc 82 | -------------------------------------------------------------------------------- /src/fte-emx.mak: -------------------------------------------------------------------------------- 1 | # 2 | # fte-emx.mak 3 | # 4 | # Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | # 6 | # 7 | # You may distribute under the terms of either the GNU General Public 8 | # License or the Artistic License, as specified in the README file. 9 | # 10 | # 11 | 12 | INCDIR = 13 | LIBDIR = 14 | 15 | #OPTIMIZE = -g 16 | OPTIMIZE = -O -s 17 | #OPTIMIZE = -O2 -s 18 | 19 | MT = -Zmt 20 | 21 | CC = gcc 22 | LD = gcc 23 | 24 | #XTYPE = -Zomf 25 | #XLTYPE = -Zsys -Zlinker /map -Zlinker /runfromvdm # -Zomf 26 | #OEXT=obj 27 | OEXT=o 28 | 29 | #DEFS = -DDEBUG_EDITOR -DCHECKHEAP 30 | #LIBS = -lmalloc1 31 | #DEFS = -DDEBUG_EDITOR -DDBMALLOC -I/src/dbmalloc 32 | #LIBS = -L/src/dbmalloc -ldbmalloc 33 | LIBS = -lstdcpp 34 | 35 | DEFS=-DINCL_32 #-DUSE_OS2_TOOLKIT_HEADERS 36 | 37 | CCFLAGS = $(OPTIMIZE) $(MT) $(XTYPE) -x c++ -Wall -DOS2 $(DEFS) $(INCDIR) -pipe 38 | LDFLAGS = $(OPTIMIZE) $(MT) -Zmap $(XLTYPE) $(LIBDIR) 39 | 40 | .SUFFIXES: .cpp .$(OEXT) 41 | 42 | include objs.inc 43 | 44 | .cpp.$(OEXT): 45 | $(CC) $(CCFLAGS) -c $< 46 | 47 | .c.$(OEXT): 48 | $(CC) $(CCFLAGS) -c $< 49 | 50 | all: cefte.exe efte.exe eftepm.exe clipserv.exe cliputil.exe 51 | 52 | clipserv.exe: clipserv.$(OEXT) clipserv.def 53 | $(LD) $(LDFLAGS) clipserv.$(OEXT) clipserv.def -o clipserv.exe $(LIBS) 54 | 55 | cliputil.exe: cliputil.$(OEXT) clip_vio.$(OEXT) cliputil.def 56 | $(LD) $(LDFLAGS) cliputil.$(OEXT) clip_vio.$(OEXT) cliputil.def -o cliputil.exe $(LIBS) 57 | 58 | cefte.exe: $(CFTE_OBJS) cfte.def 59 | $(LD) $(LDFLAGS) $(CFTE_OBJS) cfte.def -o cefte.exe $(LIBS) 60 | 61 | defcfg.cnf: defcfg.fte cefte.exe 62 | cefte defcfg.fte defcfg.cnf 63 | 64 | defcfg.h: defcfg.cnf bin2c.exe 65 | bin2c defcfg.cnf >defcfg.h 66 | 67 | bin2c.exe: bin2c.cpp 68 | $(CC) $(CCFLAGS) bin2c.cpp -o bin2c.exe 69 | 70 | c_config.$(OEXT): defcfg.h 71 | 72 | efte.exe: $(OBJS) $(VIOOBJS) fte.def 73 | $(LD) $(LDFLAGS) $(OBJS) $(VIOOBJS) fte.def -o efte.exe $(LIBS) 74 | 75 | ftepm.res: ftepm.rc pmdlg.rc bmps/*.bmp 76 | rc -r -i \emx\include ftepm.rc ftepm.res 77 | 78 | eftepm.exe: $(OBJS) $(PMOBJS) ftepm.def ftepm.res 79 | $(LD) $(LDFLAGS) $(OBJS) $(PMOBJS) ftepm.def ftepm.res -o eftepm.exe $(LIBS) 80 | 81 | efte.cnf: cefte.exe 82 | cefte ..\config\main.fte efte.cnf 83 | 84 | #rc -i \emx\include ftepm.rc ftepm.exe 85 | 86 | #ftepm.exe:: ftepm.res 87 | # rc ftepm.res ftepm.exe 88 | 89 | distro: eftepm.exe efte.exe efte.cnf cefte.exe clipserv.exe cliputil.exe 90 | zip ../efte-os2.zip eftepm.exe efte.exe efte.cnf cefte.exe clipserv.exe cliputil.exe 91 | (cd .. && zip -r efte-config.zip Artistic doc config) 92 | -------------------------------------------------------------------------------- /src/fte-owos2.mak: -------------------------------------------------------------------------------- 1 | # 2 | # fte-owos2.mak 3 | # 4 | # Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | # 6 | # You may distribute under the terms of either the GNU General Public 7 | # License or the Artistic License, as specified in the README file. 8 | # 9 | # 10 | #---------------------------------------------------------------------------- 11 | # 12 | # Makefile for ECS-OS2 version of eFTE using OpenWatcom 1.4 13 | # 14 | # Notes: 15 | # 16 | # 1. clipserv and cliputil are not required for current versions of OS/2. I 17 | # do not use an older version so I do not include them in this makefile. 18 | # 19 | # 2. OpenWatcom uses & rather than \ as line continuation if objs.mif is not 20 | # in the src directory wmake -f owconvert.mak will compile watconvert.exe. 21 | # When run objs.mif will be created from objs.inc. 22 | # 23 | #---------------------------------------------------------------------------- 24 | .SILENT 25 | 26 | CC = wpp386 27 | LD = wlink 28 | RC = wrc 29 | 30 | # Machine type -5r Pent -6r Pent Pro 31 | MACHINE= -3r 32 | 33 | #Optimization None -od - Fastest possible -otexan 34 | OPT= -ot 35 | 36 | INCLUDE = $(%watcom)\h;$(%watcom)\h\os2;.\ 37 | 38 | # suppress warnings 555 and 013 39 | MISC = -wcd555 -wcd013 -wcd726 40 | 41 | DEFS = -dOS2 -dOS2OW -dINCL_32 -dWATCOM -dUSE_LOCALE 42 | CFLAGS = -i=$(INCLUDE) $(MISC) $(DEFS) -d3 -db -w4 -e25 -zq $(OPT) $(MACHINE) -bm -bt=OS2 -mf -xs 43 | LDFLAGS = op m op maxe=25 op q op symf op el op stack=128k 44 | OEXT = obj 45 | 46 | .EXTENSIONS:.rc .res 47 | 48 | !include objs.mif 49 | 50 | .cpp.obj: *.cpp 51 | $(CC) $(CFLAGS) $< 52 | 53 | all: efte.exe eftepm.exe 54 | 55 | #cefte.exe: $(CFTE_OBJS) fte.def 56 | # $(LD) NAME cefte SYS os2v2 $(LDFLAGS) FILE {$(CFTE_OBJS)} 57 | 58 | defcfg.h: bin2c.exe simple.fte 59 | bin2c simple.fte >defcfg.h 60 | 61 | bin2c.exe: bin2c.obj 62 | $(LD) NAME bin2c SYS os2v2 $(LDFLAGS) FILE {bin2c.obj} 63 | 64 | c_config.obj: c_config.cpp defcfg.h 65 | 66 | efte.exe: $(OBJS) $(VIOOBJS) fte.def 67 | $(LD) NAME efte SYS os2v2 $(LDFLAGS) FILE {$(OBJS) $(VIOOBJS)} 68 | 69 | eftepm.res: ftepm.rc pmdlg.rc 70 | $(RC) -r ftepm.rc eftepm.res 71 | 72 | eftepm.exe: $(OBJS) $(PMOBJS) eftepm.res 73 | $(LD) NAME eftepm SYS os2v2_pm $(LDFLAGS) FILE {$(OBJS) $(PMOBJS)} 74 | $(RC) eftepm.res eftepm.exe 75 | 76 | clean : .SYMBOLIC 77 | -@rm *.obj 78 | -@rm *.exe 79 | -@rm *.err 80 | -@rm *.lst 81 | -@rm *.map 82 | 83 | cleanall : .SYMBOLIC 84 | -@rm *.obj 85 | -@rm *.exe 86 | -@rm *.err 87 | -@rm *.lst 88 | -@rm *.map 89 | -@rm def*.h 90 | -@rm *.cnf 91 | -@rm *.mif 92 | -------------------------------------------------------------------------------- /src/fte.def: -------------------------------------------------------------------------------- 1 | NAME efte WINDOWCOMPAT 2 | DESCRIPTION 'eFTE' 3 | STACKSIZE 49152 4 | -------------------------------------------------------------------------------- /src/fte.h: -------------------------------------------------------------------------------- 1 | /* fte.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef FTE_H_ 12 | #define FTE_H_ 13 | 14 | #include "ftever.h" 15 | #include "sysdep.h" 16 | 17 | #ifdef NEED_LOG_H 18 | #include "log.h" 19 | #endif // NEED_LOG_H 20 | #include "console.h" 21 | #include "gui.h" 22 | #include "c_desktop.h" 23 | #include "e_regex.h" 24 | #include "c_mode.h" 25 | #include "c_hilit.h" 26 | #include "c_bind.h" 27 | #include "e_undo.h" 28 | #include "c_color.h" 29 | #include "s_files.h" 30 | #include "s_direct.h" 31 | #include "c_config.h" 32 | #include "c_fconfig.h" 33 | #include "i_oview.h" 34 | #include "i_input.h" 35 | #include "i_key.h" 36 | #include "i_choice.h" 37 | #include "i_ascii.h" 38 | #include "i_view.h" 39 | #include "i_modelview.h" 40 | #include "egui.h" 41 | #include "o_model.h" 42 | #include "e_buffer.h" 43 | #include "e_mark.h" 44 | #include "o_list.h" 45 | #include "e_tags.h" 46 | #include "s_util.h" 47 | #include "s_string.h" 48 | #include "i_search.h" 49 | #include "i_complete.h" 50 | #include "o_directory.h" 51 | #include "o_messages.h" 52 | #include "o_buflist.h" 53 | #include "o_routine.h" 54 | #include "o_modemap.h" 55 | #include "e_cvslog.h" 56 | #include "o_cvsbase.h" 57 | #include "o_cvs.h" 58 | #include "o_cvsdiff.h" 59 | #include "e_svnlog.h" 60 | #include "o_svnbase.h" 61 | #include "o_svn.h" 62 | #include "o_svndiff.h" 63 | #include "c_commands.h" 64 | #include "c_history.h" 65 | #include "h_c.h" 66 | 67 | #if defined(_DEBUG) && defined(MSVC) && defined(MSVCDEBUG) 68 | #include 69 | 70 | #define new new( _CLIENT_BLOCK, __FILE__, __LINE__) 71 | 72 | #endif //_DEBUG && MSVC && MSVCDEBUG 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /src/ftepm.def: -------------------------------------------------------------------------------- 1 | NAME ftepm WINDOWAPI 2 | DESCRIPTION 'FTE Text Editor - Presentation Manager GUI' 3 | STACKSIZE 49152 4 | -------------------------------------------------------------------------------- /src/ftepm.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | ICON 1 icons\ftepm.ico 4 | 5 | BITMAP 101 bmps\exit.bmp 6 | BITMAP 102 bmps\open.bmp 7 | BITMAP 103 bmps\save.bmp 8 | BITMAP 104 bmps\close.bmp 9 | BITMAP 105 bmps\prev.bmp 10 | BITMAP 106 bmps\last.bmp 11 | BITMAP 107 bmps\next.bmp 12 | BITMAP 108 bmps\undo.bmp 13 | BITMAP 109 bmps\redo.bmp 14 | BITMAP 110 bmps\cut.bmp 15 | BITMAP 111 bmps\copy.bmp 16 | BITMAP 112 bmps\paste.bmp 17 | BITMAP 113 bmps\pastecol.bmp 18 | BITMAP 114 bmps\errprev.bmp 19 | BITMAP 115 bmps\errnext.bmp 20 | BITMAP 116 bmps\tagfind.bmp 21 | BITMAP 117 bmps\tagnext.bmp 22 | BITMAP 118 bmps\tagprev.bmp 23 | BITMAP 119 bmps\tagpop.bmp 24 | 25 | MENU 1 26 | BEGIN 27 | MENUITEM "Quit", 100 28 | END 29 | 30 | rcinclude pmdlg.rc 31 | -------------------------------------------------------------------------------- /src/ftever.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ftever.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef FTEVER_H_ 12 | #define FTEVER_H_ 13 | 14 | #define MAKE_VERSION(major,minor,release) ((major<<24L) | (minor << 16L) | release) 15 | 16 | #define PROG_FTE "efte" 17 | #define PROG_CFTE "cefte" 18 | #define PROGRAM PROG_FTE 19 | #define EXTRA_VERSION "" 20 | #define VERSION "1.1" EXTRA_VERSION 21 | #define VERNUM MAKE_VERSION(0x00, 0x62, 0x00) 22 | #define COPYRIGHT "Copyright (c) 2008-2016 eFTE Group\n" \ 23 | "Copyright (c) 2000-2006 Others\n" \ 24 | "Copyright (c) 1994-1998 Marko Macek" 25 | 26 | #endif // __FTEVER_H 27 | -------------------------------------------------------------------------------- /src/ftewin32.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | FTE ICON "..\\packaging\\shared\\eftewin32.ico" 4 | -------------------------------------------------------------------------------- /src/g_menu.cpp: -------------------------------------------------------------------------------- 1 | /* g_menu.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #if defined(MSVC) 18 | #include 19 | #endif 20 | #include "console.h" 21 | #include "gui.h" 22 | 23 | int MenuCount = 0; 24 | mMenu *Menus = 0; 25 | 26 | int NewMenu(const char *Name) { 27 | int n; 28 | 29 | Menus = (mMenu *) realloc((void *) Menus, 30 | sizeof(mMenu) * (MenuCount + 1)); 31 | n = MenuCount; 32 | 33 | Menus[n].Name = strdup(Name); 34 | Menus[n].Count = 0; 35 | Menus[n].Items = 0; 36 | 37 | MenuCount++; 38 | return n; 39 | } 40 | 41 | int NewItem(int menu, const char *Name) { 42 | int n; 43 | 44 | assert(menu < MenuCount); 45 | 46 | Menus[menu].Items = (mItem *) realloc(Menus[menu].Items, 47 | sizeof(mItem) * (Menus[menu].Count + 1)); 48 | n = Menus[menu].Count; 49 | 50 | Menus[menu].Items[n].SubMenu = -1; 51 | Menus[menu].Items[n].Name = Name ? strdup(Name) : 0; 52 | Menus[menu].Items[n].Arg = 0; 53 | Menus[menu].Items[n].Cmd = -1; 54 | 55 | Menus[menu].Count++; 56 | return n; 57 | } 58 | 59 | int NewSubMenu(int menu, const char *Name, int submenu, int Type) { 60 | int n; 61 | 62 | assert(menu < MenuCount); 63 | 64 | Menus[menu].Items = (mItem *) realloc(Menus[menu].Items, 65 | sizeof(mItem) * (Menus[menu].Count + 1)); 66 | n = Menus[menu].Count; 67 | 68 | Menus[menu].Items[n].SubMenu = submenu; 69 | Menus[menu].Items[n].Name = Name ? strdup(Name) : 0; 70 | Menus[menu].Items[n].Arg = 0; 71 | Menus[menu].Items[n].Cmd = Type; 72 | 73 | Menus[menu].Count++; 74 | return n; 75 | } 76 | 77 | int GetMenuId(const char *Name) { 78 | if (Name) 79 | for (int i = 0; i < MenuCount; i++) 80 | if (strcmp(Name, Menus[i].Name) == 0) 81 | return i; 82 | return -1; 83 | } 84 | 85 | -------------------------------------------------------------------------------- /src/g_nodlg.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * g_nodlg.cpp 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | // used in text mode versions, should never be called (just for linking) 12 | 13 | #include 14 | #include 15 | #include "console.h" 16 | #include "gui.h" 17 | 18 | int DLGGetFile(GView * /*v*/, const char * /*Prompt*/, unsigned int /*BufLen*/, char * /*FileName*/, int /*Flags*/) { 19 | assert(1 == 0); 20 | return 0; 21 | } 22 | 23 | int DLGPickChoice(GView * /*v*/, const char * /*ATitle*/, int /*NSel*/, va_list /*ap*/, int /*Flags*/) { 24 | assert(1 == 0); 25 | return 0; 26 | } 27 | 28 | int DLGGetFind(GView * /*View*/, SearchReplaceOptions &/*sr*/) { 29 | assert(1 == 0); 30 | return 0; 31 | } 32 | 33 | int DLGGetFindReplace(GView * /*View*/, SearchReplaceOptions &/*sr*/) { 34 | assert(1 == 0); 35 | return 0; 36 | } 37 | 38 | int DLGGetStr(GView * /*View*/, const char * /*Prompt*/, unsigned int /*BufLen*/, char * /*Str*/, int /*HistId*/, int /*Flags*/) { 39 | assert(1 == 0); 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /src/gui.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * gui.cpp 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "console.h" 18 | #include "gui.h" 19 | 20 | int GFrame::IsLastFrame() const { 21 | if (this == Next && frames == this) 22 | return 1; 23 | else 24 | return 0; 25 | } 26 | 27 | void GUI::DeleteFrame(GFrame *frame) { 28 | if (frame->IsLastFrame()) { 29 | delete frame; 30 | frames = 0; 31 | } else { 32 | //frame->Prev->Next = frame->Next; 33 | //frame->Next->Prev = frame->Prev; 34 | //if (frames == frame) 35 | // frames = frame->Next; 36 | 37 | //frames->Activate(); 38 | delete frame; 39 | } 40 | } 41 | 42 | int GUI::Start(int &/*argc*/, char ** /*argv*/) { 43 | return 0; 44 | } 45 | 46 | void GUI::Stop() { 47 | } 48 | 49 | void GUI::StopLoop() { 50 | doLoop = 0; 51 | } 52 | -------------------------------------------------------------------------------- /src/h_c.h: -------------------------------------------------------------------------------- 1 | // so that we can reuse these numbers for other modes that re-use the C 2 | // indent functions. 3 | 4 | #define hsC_Normal 0 5 | #define hsC_Comment 1 6 | #define hsC_CommentL 2 7 | #define hsC_Keyword 4 8 | #define hsC_String1 10 9 | #define hsC_String2 11 10 | #define hsC_CPP 12 11 | #define hsC_CPP_Comm 13 12 | #define hsC_CPP_String1 14 13 | #define hsC_CPP_String2 15 14 | #define hsC_CPP_ABrace 16 15 | -------------------------------------------------------------------------------- /src/h_catbs.cpp: -------------------------------------------------------------------------------- 1 | /* h_catbs.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | #define hsBS_Normal 1 14 | 15 | // this is for viewing only, do not try to edit or anything. 16 | 17 | int Hilit_CATBS(EBuffer *BF, int /*LN*/, PCell B, int Pos, int Width, ELine *Line, hlState &State, hsState *StateMap, int *ECol) { 18 | HILIT_VARS(BF->Mode->fColorize->Colors, Line); 19 | int CL = 0; //(LN == BF->VToR(BF->CP.Row)) ? 1 : 0; 20 | 21 | for (i = 0; i < Line->Count;) { 22 | IF_TAB() else { 23 | switch (State) { 24 | default: 25 | case hsBS_Normal: 26 | Color = CLR_Normal; 27 | while (!CL && len >= 2 && p[1] == '\b') { 28 | if (len > 2 && p[0] == p[2]) { // bold 29 | Color = CLR_Keyword; 30 | NextChar(); 31 | NextChar(); 32 | C -= 2; 33 | } else if (p[0] == '_') { // underline 34 | Color = CLR_Symbol; 35 | NextChar(); 36 | NextChar(); 37 | C -= 2; 38 | break; 39 | } else 40 | break; 41 | } 42 | ColorNext(); 43 | continue; 44 | } 45 | } 46 | } 47 | *ECol = C; 48 | return 0; 49 | } 50 | -------------------------------------------------------------------------------- /src/h_cont.cpp: -------------------------------------------------------------------------------- 1 | /* h_cont.cpp 2 | * 3 | * Copyright (c) 2008, 2010 eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | int Indent_Continue(EBuffer *B, int Line, int /*PosCursor*/) { 14 | // Find the previous non-blank line 15 | for (int i = Line - 1; i >= 0; i--) { 16 | if (B->RLine(i)->Count > 0) { 17 | int I = B->LineIndented(i); 18 | B->SetPosR(I, Line); 19 | return 1; 20 | } 21 | } 22 | 23 | B->SetPosR(0, Line); 24 | 25 | return 1; 26 | } 27 | -------------------------------------------------------------------------------- /src/h_make.cpp: -------------------------------------------------------------------------------- 1 | /* h_make.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | #define hsMAKE_Normal 0 14 | #define hsMAKE_Comment 1 15 | #define hsMAKE_DotCmd 2 16 | #define hsMAKE_Command 3 17 | 18 | int Hilit_MAKE(EBuffer *BF, int /*LN*/, PCell B, int Pos, int Width, ELine *Line, hlState &State, hsState *StateMap, int *ECol) { 19 | HILIT_VARS(BF->Mode->fColorize->Colors, Line); 20 | int len1 = len; 21 | char *last = p + len1 - 1; 22 | 23 | for (i = 0; i < Line->Count;) { 24 | if (i == 0 && *p == 9) { 25 | State = hsMAKE_Command; 26 | Color = CLR_Command; 27 | } 28 | IF_TAB() else { 29 | if (i == 0) { 30 | if (*p == '.') { 31 | State = hsMAKE_DotCmd; 32 | Color = CLR_Directive; 33 | goto hilit; 34 | } else if (*p == '#') { 35 | State = hsMAKE_Comment; 36 | Color = CLR_Comment; 37 | goto hilit; 38 | } 39 | } 40 | switch (State) { 41 | case hsMAKE_Comment: 42 | Color = CLR_Comment; 43 | goto hilit; 44 | 45 | case hsMAKE_DotCmd: 46 | Color = CLR_Directive; 47 | goto hilit; 48 | 49 | case hsMAKE_Command: 50 | Color = CLR_Command; 51 | goto hilit; 52 | 53 | default: 54 | State = hsMAKE_Normal; 55 | Color = CLR_Normal; 56 | hilit: 57 | ColorNext(); 58 | continue; 59 | } 60 | } 61 | } 62 | if ((len1 == 0) || (*last != '\\')) { 63 | if (State == hsMAKE_Comment || State == hsMAKE_DotCmd || State == hsMAKE_Command) 64 | State = hsMAKE_Normal; 65 | } 66 | *ECol = C; 67 | return 0; 68 | } 69 | -------------------------------------------------------------------------------- /src/i_ascii.h: -------------------------------------------------------------------------------- 1 | /* i_ascii.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef EXASCII_H_ 12 | #define EXASCII_H_ 13 | 14 | class ExASCII: public ExView { 15 | public: 16 | int Pos, LPos; 17 | 18 | ExASCII(); 19 | virtual ~ExASCII(); 20 | virtual void Activate(int gotfocus); 21 | 22 | virtual ExView* GetViewContext(); 23 | virtual int BeginMacro(); 24 | virtual void HandleEvent(TEvent &Event); 25 | virtual void UpdateView(); 26 | virtual void RepaintView(); 27 | virtual void UpdateStatus(); 28 | virtual void RepaintStatus(); 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/i_choice.h: -------------------------------------------------------------------------------- 1 | /* i_choice.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef EXCHOICE_H_ 12 | #define EXCHOICE_H_ 13 | 14 | class ExChoice: public ExView { 15 | public: 16 | char *Title; 17 | char Prompt[160]; 18 | int NOpt; 19 | char *SOpt[10]; 20 | int Cur; 21 | int lTitle; 22 | int lChoice; 23 | int MouseCaptured; 24 | 25 | ExChoice(const char *ATitle, int NSel, va_list ap /* choices, format, args */); 26 | virtual ~ExChoice(); 27 | virtual void Activate(int gotfocus); 28 | 29 | virtual ExView* GetViewContext(); 30 | virtual int BeginMacro(); 31 | int FindChoiceByPoint(int x, int y); 32 | virtual void HandleEvent(TEvent &Event); 33 | virtual void UpdateView(); 34 | virtual void RepaintView(); 35 | virtual void UpdateStatus(); 36 | virtual void RepaintStatus(); 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/i_complete.h: -------------------------------------------------------------------------------- 1 | /* i_ascii.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef EXCOMPLETE_H_ 12 | #define EXCOMPLETE_H_ 13 | 14 | #include 15 | 16 | // maximum words which will be presented to the user 17 | #define MAXCOMPLETEWORDS 300 18 | 19 | class ExComplete: public ExView { 20 | EPoint Orig; 21 | EBuffer *Buffer; 22 | int WordsLast; 23 | char **Words; 24 | char *WordBegin; 25 | char *WordContinue; 26 | int WordPos; 27 | size_t WordFixed; 28 | size_t WordFixedCount; 29 | 30 | int RefreshComplete(); 31 | int CheckASCII(int c); 32 | void FixedUpdate(int add); 33 | 34 | public: 35 | 36 | ExComplete(EBuffer *B); 37 | virtual ~ExComplete(); 38 | virtual void Activate(int gotfocus); 39 | virtual ExView* GetViewContext(); 40 | virtual int BeginMacro(); 41 | virtual void HandleEvent(TEvent &Event); 42 | virtual void UpdateView(); 43 | virtual void RepaintView(); 44 | virtual void UpdateStatus(); 45 | virtual void RepaintStatus(); 46 | 47 | virtual bool IsSimpleCase(); 48 | virtual int DoCompleteWord(); 49 | }; 50 | #endif 51 | -------------------------------------------------------------------------------- /src/i_input.h: -------------------------------------------------------------------------------- 1 | /* i_input.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef EXINPUT_H_ 12 | #define EXINPUT_H_ 13 | 14 | typedef int (*Completer)(const char *Name, char *Completed, int Num); 15 | 16 | class ExInput: public ExView { 17 | public: 18 | char *Prompt; 19 | char *Line; 20 | char *MatchStr; 21 | char *CurStr; 22 | unsigned int Pos; 23 | unsigned int LPos; 24 | unsigned int MaxLen; 25 | Completer Comp; 26 | int TabCount; 27 | int HistId; 28 | int CurItem; 29 | unsigned int SelStart; 30 | unsigned int SelEnd; 31 | 32 | ExInput(const char *APrompt, char *ALine, unsigned int AMaxLen, Completer AComp, int Select, int AHistId); 33 | virtual ~ExInput(); 34 | virtual void Activate(int gotfocus); 35 | 36 | virtual ExView *GetViewContext(); 37 | virtual int BeginMacro(); 38 | virtual void HandleEvent(TEvent &Event); 39 | virtual void UpdateView(); 40 | virtual void RepaintView(); 41 | virtual void UpdateStatus(); 42 | virtual void RepaintStatus(); 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/i_key.cpp: -------------------------------------------------------------------------------- 1 | /* i_key.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | ExKey::ExKey(const char *APrompt): ExView() { 14 | if (APrompt) 15 | Prompt = strdup(APrompt); 16 | else 17 | Prompt = 0; 18 | } 19 | 20 | ExKey::~ExKey() { 21 | free(Prompt); 22 | } 23 | 24 | void ExKey::Activate(int gotfocus) { 25 | ExView::Activate(gotfocus); 26 | } 27 | 28 | ExView* ExKey::GetViewContext() { 29 | return Next; 30 | } 31 | 32 | int ExKey::BeginMacro() { 33 | return 1; 34 | } 35 | 36 | void ExKey::HandleEvent(TEvent &Event) { 37 | switch (Event.What) { 38 | case evKeyDown: 39 | Key = Event.Key.Code; 40 | if (!(Key & kfModifier)) // not ctrl,alt,shift, .... 41 | EndExec(1); 42 | Event.What = evNone; 43 | break; 44 | } 45 | } 46 | 47 | void ExKey::UpdateView() { 48 | if (Next) { 49 | Next->UpdateView(); 50 | } 51 | } 52 | 53 | void ExKey::RepaintView() { 54 | if (Next) { 55 | Next->RepaintView(); 56 | } 57 | } 58 | 59 | void ExKey::UpdateStatus() { 60 | RepaintStatus(); 61 | } 62 | 63 | void ExKey::RepaintStatus() { 64 | TDrawBuffer B; 65 | int W, H; 66 | 67 | ConQuerySize(&W, &H); 68 | 69 | MoveCh(B, ' ', 0x17, W); 70 | ConPutBox(0, H - 1, W, 1, B); 71 | } 72 | -------------------------------------------------------------------------------- /src/i_key.h: -------------------------------------------------------------------------------- 1 | /* i_key.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef EXKEY_H_ 12 | #define EXKEY_H_ 13 | 14 | class ExKey: public ExView { 15 | public: 16 | char *Prompt; 17 | TKeyCode Key; 18 | char ch; 19 | 20 | ExKey(const char *APrompt); 21 | virtual ~ExKey(); 22 | virtual void Activate(int gotfocus); 23 | 24 | virtual ExView* GetViewContext(); 25 | virtual int BeginMacro(); 26 | virtual void HandleEvent(TEvent &Event); 27 | virtual void UpdateView(); 28 | virtual void RepaintView(); 29 | virtual void UpdateStatus(); 30 | virtual void RepaintStatus(); 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/i_modelview.cpp: -------------------------------------------------------------------------------- 1 | /* i_modelview.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | ExModelView::ExModelView(EView *AView): ExView() { 14 | View = AView; 15 | View->MView = this; 16 | MouseCaptured = 0; 17 | MouseMoved = 0; 18 | } 19 | 20 | ExModelView::~ExModelView() { 21 | if (View) { // close it 22 | delete View; 23 | View = 0; 24 | } 25 | } 26 | 27 | int ExModelView::GetContext() const { 28 | return View->GetContext(); 29 | } 30 | 31 | void ExModelView::Activate(int gotfocus) { 32 | ExView::Activate(gotfocus); 33 | View->Activate(gotfocus); 34 | } 35 | 36 | EEventMap *ExModelView::GetEventMap() { 37 | return View->GetEventMap(); 38 | } 39 | 40 | int ExModelView::ExecCommand(int Command, ExState &State) { 41 | return View->ExecCommand(Command, State); 42 | } 43 | 44 | int ExModelView::BeginMacro() { 45 | return View->BeginMacro(); 46 | } 47 | 48 | void ExModelView::HandleEvent(TEvent &Event) { 49 | ExView::HandleEvent(Event); 50 | View->HandleEvent(Event); 51 | } 52 | 53 | void ExModelView::UpdateView() { 54 | View->UpdateView(); 55 | } 56 | 57 | void ExModelView::RepaintView() { 58 | View->RepaintView(); 59 | } 60 | 61 | void ExModelView::RepaintStatus() { 62 | View->RepaintStatus(); 63 | } 64 | 65 | void ExModelView::UpdateStatus() { 66 | View->UpdateStatus(); 67 | } 68 | 69 | void ExModelView::Resize(int width, int height) { 70 | View->Resize(width, height); 71 | } 72 | 73 | void ExModelView::WnSwitchBuffer(EModel *B) { 74 | if (View) 75 | View->SwitchToModel(B); 76 | } 77 | 78 | int ExModelView::IsModelView() const { 79 | return 1; 80 | } 81 | -------------------------------------------------------------------------------- /src/i_modelview.h: -------------------------------------------------------------------------------- 1 | /* i_modelview.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef EXEDIT_H_ 12 | #define EXEDIT_H_ 13 | 14 | class EView; 15 | 16 | class ExModelView: public ExView { 17 | public: 18 | EView *View; 19 | int MouseCaptured; 20 | int MouseMoved; 21 | 22 | ExModelView(EView *AView); 23 | virtual ~ExModelView(); 24 | virtual void Activate(int gotfocus); 25 | 26 | virtual EEventMap *GetEventMap(); 27 | virtual int ExecCommand(int Command, ExState &State); 28 | 29 | virtual int GetContext() const; 30 | virtual int BeginMacro(); 31 | virtual void HandleEvent(TEvent &Event); 32 | virtual void UpdateView(); 33 | virtual void RepaintView(); 34 | virtual void UpdateStatus(); 35 | virtual void RepaintStatus(); 36 | virtual void Resize(int width, int height); 37 | virtual void WnSwitchBuffer(EModel *M); 38 | virtual int IsModelView() const; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/i_oview.h: -------------------------------------------------------------------------------- 1 | /* i_oview.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef IOVIEW_H_ 12 | #define IOVIEW_H_ 13 | 14 | class GxView; 15 | class EBuffer; 16 | class EWindow; 17 | 18 | class ExView { 19 | public: 20 | GxView *Win; 21 | ExView *Next; 22 | 23 | ExView(); 24 | virtual ~ExView(); 25 | 26 | virtual EEventMap *GetEventMap(); 27 | virtual int ExecCommand(int Command, ExState &State); 28 | 29 | virtual void Activate(int gotfocus); 30 | virtual int GetContext() const; 31 | virtual ExView *GetViewContext() { 32 | return this; 33 | } 34 | virtual ExView *GetStatusContext() { 35 | return this; 36 | } 37 | virtual int BeginMacro(); 38 | virtual void HandleEvent(TEvent &Event); 39 | virtual void UpdateView(); 40 | virtual void UpdateStatus(); 41 | virtual void RepaintView(); 42 | virtual void RepaintStatus(); 43 | virtual void Resize(int width, int height); 44 | virtual void EndExec(int NewResult); 45 | int IsActive() const; 46 | 47 | void Repaint() { 48 | RepaintStatus(); 49 | RepaintView(); 50 | } 51 | void Update() { 52 | UpdateStatus(); 53 | UpdateView(); 54 | } 55 | 56 | int ConPutBox(int X, int Y, int W, int H, PCell Cell); 57 | int ConScroll(int Way, int X, int Y, int W, int H, TAttr Fill, int Count); 58 | int ConQuerySize(int *X, int *Y); 59 | int ConSetCursorPos(int X, int Y); 60 | int ConShowCursor(); 61 | int ConHideCursor(); 62 | void ConSetInsertState(bool insert); 63 | 64 | virtual int IsModelView() const; 65 | virtual void WnSwitchBuffer(EModel *M); 66 | }; 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /src/i_search.h: -------------------------------------------------------------------------------- 1 | /* i_search.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef ISEARCH_H_ 12 | #define ISEARCH_H_ 13 | 14 | #define MAXISEARCH 256 15 | 16 | class ExISearch: public ExView { 17 | public: 18 | typedef enum { IOk, INoMatch, INoPrev, INoNext } IState; 19 | 20 | char ISearchStr[MAXISEARCH + 1]; 21 | EPoint Orig; 22 | EPoint stack[MAXISEARCH]; 23 | int len; 24 | int stacklen; 25 | EBuffer *Buffer; 26 | IState state; 27 | int Direction; 28 | 29 | ExISearch(EBuffer *B); 30 | virtual ~ExISearch(); 31 | virtual void Activate(int gotfocus); 32 | 33 | virtual ExView *GetViewContext(); 34 | virtual int BeginMacro(); 35 | virtual void HandleEvent(TEvent &Event); 36 | virtual void UpdateView(); 37 | virtual void RepaintView(); 38 | virtual void UpdateStatus(); 39 | virtual void RepaintStatus(); 40 | 41 | void SetState(IState state); 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/i_view.h: -------------------------------------------------------------------------------- 1 | /* i_view.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef I_VIEW_H_ 12 | #define I_VIEW_H_ 13 | 14 | class EView; 15 | 16 | class GxView: public GView { 17 | public: 18 | ExView *Top; 19 | ExView *Bottom; 20 | int MouseCaptured; 21 | 22 | GxView(GFrame *Parent); 23 | virtual ~GxView(); 24 | 25 | void PushView(ExView *view); 26 | ExView *PopView(); 27 | void NewView(ExView *view); 28 | 29 | EEventMap *GetEventMap(); 30 | int ExecCommand(int Command, ExState &State); 31 | 32 | virtual int GetContext() const; 33 | virtual ExView* GetStatusContext() { 34 | if (Top) return Top->GetStatusContext(); 35 | else return 0; 36 | } 37 | virtual ExView* GetViewContext() { 38 | if (Top) return Top->GetViewContext(); 39 | else return 0; 40 | } 41 | virtual int BeginMacro(); 42 | virtual void HandleEvent(TEvent &Event); 43 | virtual void Update(); 44 | virtual void Repaint(); 45 | virtual void Activate(int gotfocus); 46 | virtual void Resize(int width, int height); 47 | 48 | void UpdateTitle(const char *Title, char *STitle); 49 | 50 | int ReadStr(const char *Prompt, unsigned int BufLen, char *Str, Completer Comp, int Select, int HistId); 51 | int Choice(unsigned long Flags, const char *Title, int NSel, ... /* choices, format, args */); 52 | TKeyCode GetChar(const char *Prompt); 53 | int IncrementalSearch(EView *V); 54 | int PickASCII(); 55 | int ICompleteWord(EView *View); 56 | 57 | int GetStr(const char *Prompt, unsigned int BufLen, char *Str, int HistId); 58 | int GetFile(const char *Prompt, unsigned int BufLen, char *Str, int HistId, int Flags); 59 | 60 | int IsModelView() const; 61 | }; 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /src/icons/error.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/icons/error.ico -------------------------------------------------------------------------------- /src/icons/ftepm.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/icons/ftepm.ico -------------------------------------------------------------------------------- /src/icons/ftewin32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanurmi/efte/b55b46df61f26f2ece2947a6b6a78dee714909ed/src/icons/ftewin32.ico -------------------------------------------------------------------------------- /src/indent.cpp: -------------------------------------------------------------------------------- 1 | /* indent.cpp 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | 13 | /* place holder */ 14 | 15 | int Indent_SIMPLE(EBuffer *B, int Line, int /*PosCursor*/) { 16 | int Pos, Old; 17 | 18 | if (Line == 0) { 19 | Pos = 0; 20 | } else { 21 | if (B->RLine(Line - 1)->StateE == 0) { 22 | Pos = B->LineIndented(Line - 1); 23 | } else { // for comments, strings, etc, use same as prev line. 24 | Pos = B->LineIndented(Line - 1); 25 | } 26 | } 27 | 28 | Old = B->LineIndented(Line); 29 | if (Pos < 0) 30 | Pos = 0; 31 | if (Pos != Old) 32 | if (B->IndentLine(Line, Pos) == 0) 33 | return 0;; 34 | return 1; 35 | } 36 | -------------------------------------------------------------------------------- /src/memicmp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * memicmp.cpp 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | // Contributed by Markus F.X.J. Oberhumer 12 | 13 | #include 14 | #include 15 | 16 | #if defined(UNIX) 17 | 18 | #ifdef __cplusplus 19 | extern "C" 20 | #endif 21 | int memicmp(const void *s1, const void *s2, size_t n) { 22 | if (n != 0) { 23 | const unsigned char *p1 = (const unsigned char *) s1; 24 | const unsigned char *p2 = (const unsigned char *) s2; 25 | 26 | do { 27 | if (*p1 != *p2) { 28 | int c = toupper(*p1) - toupper(*p2); 29 | if (c) 30 | return c; 31 | } 32 | p1++; 33 | p2++; 34 | } while (--n != 0); 35 | } 36 | return 0; 37 | } 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /src/namemaps.h: -------------------------------------------------------------------------------- 1 | /* 2 | * namemaps.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | /* M$VC++ !!! */ 12 | #ifndef NAMEMAPS_H_ 13 | #define NAMEMAPS_H_ 14 | 15 | #define access _access 16 | #define chmod _chmod 17 | #define chsize _chsize 18 | #define close _close 19 | #define creat _creat 20 | #define dup _dup 21 | #define dup2 _dup2 22 | #define eof _eof 23 | #define filelength _filelength 24 | #define isatty _isatty 25 | #define locking _locking 26 | #define lseek _lseek 27 | #define mktemp _mktemp 28 | #define open _open 29 | #define read _read 30 | #define setmode _setmode 31 | #define sopen _sopen 32 | #define tell _tell 33 | #define umask _umask 34 | #define unlink _unlink 35 | #define write _write 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/o_buflist.h: -------------------------------------------------------------------------------- 1 | /* o_buflist.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef BUFLIST_H_ 12 | #define BUFLIST_H_ 13 | 14 | class BufferView: public EList { 15 | public: 16 | char **BList; 17 | int BCount; 18 | int SearchLen; 19 | char SearchString[MAXISEARCH]; 20 | int SearchPos[MAXISEARCH]; 21 | 22 | BufferView(int createFlags, EModel **ARoot); 23 | virtual ~BufferView(); 24 | virtual EEventMap *GetEventMap(); 25 | virtual int GetContext() const; 26 | virtual void DrawLine(PCell B, int Line, int Col, ChColor color, int Width); 27 | virtual char* FormatLine(int Line) const; 28 | virtual void UpdateList(); 29 | EModel *GetBufferById(int No); 30 | virtual int ExecCommand(int Command, ExState &State); 31 | virtual void HandleEvent(TEvent &Event); 32 | int GetMatchingLine(int start, int direction) const; 33 | virtual int Activate(int No); 34 | void CancelSearch(); 35 | virtual void GetInfo(char *AInfo, int MaxLen) const; 36 | virtual void GetTitle(char *ATitle, int MaxLen, char *ASTitle, int SMaxLen) const; 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/o_cvs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * o_cvs.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | * Contributed by Martin Frydl 10 | * 11 | * Class providing access to most of CVS commands. 12 | */ 13 | 14 | #ifndef CVS_H_ 15 | #define CVS_H_ 16 | 17 | class ECvs: public ECvsBase { 18 | public: 19 | char *LogFile; 20 | int Commiting; 21 | 22 | ECvs(int createFlags, EModel **ARoot, const char *Dir, const char *ACommand, const char *AOnFiles); 23 | ECvs(int createFlags, EModel **ARoot); 24 | ~ECvs(); 25 | 26 | void RemoveLogFile(); 27 | // Return marked files in allocated space separated list 28 | char *MarkedAsList(); 29 | // Return CVS status char of file or 0 if unknown 30 | // (if char is lowercase, state was guessed from last command invoked upon file) 31 | char GetFileStatus(const char *file); 32 | 33 | virtual void ParseLine(const char *line, int len); 34 | // Returns 0 if OK 35 | virtual int RunPipe(const char *Dir, const char *Command, const char *OnFiles); 36 | virtual void ClosePipe(); 37 | // Start commit process (opens message buffer), returns 0 if OK 38 | int RunCommit(const char *Dir, const char *Command, const char *OnFiles); 39 | // Finish commit process (called on message buffer close), returns 0 if OK 40 | int DoneCommit(int commit); 41 | 42 | virtual int CanQuit() const; 43 | virtual int ConfQuit(GxView *V, int multiFile); 44 | 45 | virtual int GetContext() const; 46 | virtual EEventMap *GetEventMap(); 47 | }; 48 | 49 | extern ECvs *CvsView; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/o_cvsdiff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * o_cvsdiff.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | * Contributed by Martin Frydl 10 | * 11 | * Class showing output from CVS diff command. Allows copying of lines 12 | * to clipboard and allows to jump to lines in real sources. 13 | */ 14 | 15 | #ifndef CVSDIFF_H_ 16 | #define CVSDIFF_H_ 17 | 18 | class ECvsDiff: public ECvsBase { 19 | public: 20 | int CurrLine, ToLine, InToFile; 21 | char *CurrFile; 22 | 23 | ECvsDiff(int createFlags, EModel **ARoot, const char *Dir, const char *ACommand, const char *AOnFiles); 24 | ~ECvsDiff(); 25 | 26 | void ParseFromTo(const char *line, int len); 27 | virtual void ParseLine(const char *line, int len); 28 | // Returns 0 if OK 29 | virtual int RunPipe(const char *Dir, const char *Command, const char *OnFiles); 30 | 31 | virtual int ExecCommand(int Command, ExState &State); 32 | int BlockCopy(int Append); 33 | 34 | virtual int GetContext() const; 35 | virtual EEventMap *GetEventMap(); 36 | }; 37 | 38 | extern ECvsDiff *CvsDiffView; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/o_directory.h: -------------------------------------------------------------------------------- 1 | /* o_directory.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef ODIRECTORY_H_ 12 | #define ODIRECTORY_H_ 13 | 14 | class EDirectory: public EList { 15 | public: 16 | char *Path; 17 | FileInfo **Files; 18 | int FCount; 19 | int SearchLen; 20 | char SearchName[MAXISEARCH]; 21 | int SearchPos[MAXISEARCH]; 22 | 23 | EDirectory(int createFlags, EModel **ARoot, const char *aPath); 24 | virtual ~EDirectory(); 25 | 26 | virtual int GetContext() const; 27 | virtual int GetMatchForward(int start=0) const; 28 | virtual int GetMatchBackward(int start=0) const; 29 | virtual EEventMap *GetEventMap(); 30 | virtual int ExecCommand(int Command, ExState &State); 31 | virtual void HandleEvent(TEvent &Event); 32 | 33 | virtual void DrawLine(PCell B, int Line, int Col, ChColor color, int Width); 34 | virtual char *FormatLine(int Line) const; 35 | virtual int IsHilited(int Line) const; 36 | 37 | virtual void RescanList(); 38 | // virtual void UpdateList(); 39 | virtual void FreeList(); 40 | virtual int CanActivate(int Line) const; 41 | virtual int Activate(int No); 42 | 43 | virtual void GetName(char *AName, int MaxLen) const; 44 | virtual void GetPath(char *APath, int MaxLen) const; 45 | virtual void GetInfo(char *AInfo, int MaxLen) const; 46 | virtual void GetTitle(char *ATitle, int MaxLen, char *ASTitle, int SMaxLen) const; 47 | 48 | int IsDir(int No) const; 49 | int FmChDir(const char* Name); 50 | int FmLoad(const char* Name, EView *View); 51 | int FmMvFile(const char* Name); 52 | int FmRmFile(const char* Name); 53 | int FmMkDir(); 54 | int ChangeDir(ExState &State); 55 | int RescanDir(); 56 | }; 57 | #endif 58 | -------------------------------------------------------------------------------- /src/o_modemap.h: -------------------------------------------------------------------------------- 1 | /* o_modemap.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef MAPVIEW_H_ 12 | #define MAPVIEW_H_ 13 | 14 | class EventMapView: public EList { 15 | public: 16 | char **BList; 17 | int BCount; 18 | EEventMap *EMap; 19 | 20 | void AddLine(const char *Line); 21 | void DumpKey(const char *aPrefix, EKey *Key); 22 | void DumpMap(const char *aPrefix, EKeyMap *aKeyMap); 23 | void DumpEventMap(EEventMap *aEventMap); 24 | 25 | EventMapView(int createFlags, EModel **ARoot, EEventMap *Map); 26 | virtual ~EventMapView(); 27 | 28 | void FreeView(); 29 | void ViewMap(EEventMap *Map); 30 | 31 | virtual int ExecCommand(int Command, ExState &State); 32 | virtual EEventMap *GetEventMap(); 33 | virtual int GetContext() const; 34 | 35 | virtual void DrawLine(PCell B, int Line, int Col, ChColor color, int Width); 36 | virtual char* FormatLine(int Line) const; 37 | virtual void UpdateList(); 38 | virtual int CanActivate(int Line) const; 39 | virtual void GetName(char *AName, int MaxLen) const; 40 | virtual void GetInfo(char *AInfo, int MaxLen) const; 41 | virtual void GetTitle(char *ATitle, int MaxLen, char *ASTitle, int SMaxLen) const; 42 | }; 43 | 44 | extern EventMapView *TheEventMapView; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/o_routine.h: -------------------------------------------------------------------------------- 1 | /* o_routine.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef ROUTINE_H_ 12 | #define ROUTINE_H_ 13 | 14 | class RoutineView: public EList { 15 | public: 16 | EBuffer *Buffer; 17 | 18 | int RCount; 19 | int SearchLen; 20 | char SearchString[MAXISEARCH]; 21 | int SearchPos[MAXISEARCH]; 22 | 23 | RoutineView(int createFlags, EModel **ARoot, EBuffer *AB); 24 | virtual ~RoutineView(); 25 | virtual EEventMap *GetEventMap(); 26 | virtual int ExecCommand(int Command, ExState &State); 27 | virtual void HandleEvent(TEvent &Event); 28 | virtual int GetMatchingLine(int start, int direction) const; 29 | virtual void DrawLine(PCell B, int Line, int Col, ChColor color, int Width); 30 | virtual char* FormatLine(int Line) const; 31 | virtual int Activate(int No); 32 | void CancelSearch(); 33 | virtual void RescanList(); 34 | void UpdateList(); 35 | virtual int GetContext() const; 36 | virtual void GetName(char *AName, int MaxLen) const; 37 | virtual void GetInfo(char *AInfo, int MaxLen) const; 38 | virtual void GetTitle(char *ATitle, int MaxLen, char *ASTitle, int SMaxLen) const; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/o_svn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * o_svn.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | * 10 | * S.Pinigin copy o_cvs.h and replace cvs/Cvs/CVS to svn/Svn/SVN. 11 | * 12 | * Class providing access to most of SVN commands. 13 | */ 14 | 15 | #ifndef SVN_H_ 16 | #define SVN_H_ 17 | 18 | class ESvn: public ESvnBase { 19 | public: 20 | char *LogFile; 21 | int Commiting; 22 | 23 | ESvn(int createFlags, EModel **ARoot, const char *Dir, const char *ACommand, const char *AOnFiles); 24 | ESvn(int createFlags, EModel **ARoot); 25 | ~ESvn(); 26 | 27 | void RemoveLogFile(); 28 | // Return marked files in allocated space separated list 29 | char *MarkedAsList(); 30 | // Return SVN status char of file or 0 if unknown 31 | // (if char is lowercase, state was guessed from last command invoked upon file) 32 | char GetFileStatus(const char *file); 33 | 34 | virtual void ParseLine(const char *line, int len); 35 | // Returns 0 if OK 36 | virtual int RunPipe(const char *Dir, const char *Command, const char *OnFiles); 37 | virtual void ClosePipe(); 38 | // Start commit process (opens message buffer), returns 0 if OK 39 | int RunCommit(const char *Dir, const char *Command, const char *OnFiles); 40 | // Finish commit process (called on message buffer close), returns 0 if OK 41 | int DoneCommit(int commit); 42 | 43 | virtual int CanQuit() const; 44 | virtual int ConfQuit(GxView *V, int multiFile); 45 | 46 | virtual int GetContext() const; 47 | virtual EEventMap *GetEventMap(); 48 | }; 49 | 50 | extern ESvn *SvnView; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/o_svndiff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * o_svndiff.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | * S.Pinigin copy o_cvsdiff.h and replace cvs/Cvs/CVS to svn/Svn/SVN. 10 | * 11 | * Class showing output from SVN diff command. Allows copying of lines 12 | * to clipboard and allows to jump to lines in real sources. 13 | */ 14 | 15 | #ifndef SVNDIFF_H_ 16 | #define SVNDIFF_H_ 17 | 18 | class ESvnDiff: public ESvnBase { 19 | public: 20 | int CurrLine, ToLine, InToFile; 21 | char *CurrFile; 22 | 23 | ESvnDiff(int createFlags, EModel **ARoot, const char *Dir, const char *ACommand, char *AOnFiles); 24 | ~ESvnDiff(); 25 | 26 | void ParseFromTo(const char *line, int len); 27 | virtual void ParseLine(const char *line, int len); 28 | // Returns 0 if OK 29 | virtual int RunPipe(const char *Dir, const char *Command, const char *OnFiles); 30 | 31 | virtual int ExecCommand(int Command, ExState &State); 32 | int BlockCopy(int Append); 33 | 34 | virtual int GetContext() const; 35 | virtual EEventMap *GetEventMap(); 36 | }; 37 | 38 | extern ESvnDiff *SvnDiffView; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/owconvert.mak: -------------------------------------------------------------------------------- 1 | # 2 | # owconvert.mak 3 | # 4 | # Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | # 6 | # You may distribute under the terms of either the GNU General Public 7 | # License or the Artistic License, as specified in the README file. 8 | # 9 | # 10 | #---------------------------------------------------------------------------- 11 | # 12 | # Makefile for NT/ECS-OS2 convert objs.inc using OpenWatcom 1.4 wmake 13 | # 14 | # watconvert reads in objs.inc, converts '\' character to '&', and saves 15 | # as objs.mif. objs.mif will be included by the OW14 NT and ECS-OS2 makefiles 16 | # 17 | #---------------------------------------------------------------------------- 18 | 19 | 20 | CC = wpp386 21 | LD = wlink 22 | 23 | # Machine type -5r Pent -6r Pent Pro 24 | MACHINE= -6r 25 | 26 | !ifdef __OS2__ 27 | SYSTEM=os2 28 | LDSYSTEM=os2v2 29 | !endif 30 | 31 | !ifdef __NT__ 32 | SYSTEM=nt 33 | LDSYSTEM=nt 34 | !endif 35 | 36 | #Optimization None: -od Time opt: -ot Fastest possible: -otexan 37 | #OPT= -otexan 38 | OPT=-od 39 | 40 | INCLUDE = $(%watcom)\h;$(%watcom)\h\nt;.\ 41 | 42 | CFLAGS = -i=$(INCLUDE) -d0 -w4 -e25 -zq $(OPT) $(MACHINE) -bm -bt=$(SYSTEM) -mf -xs -xr 43 | LDFLAGS = op m op maxe=25 op q op symf op el 44 | OEXT = obj 45 | 46 | .cpp.obj: 47 | $(CC) $(CFLAGS) $< 48 | 49 | all: watconvert.exe 50 | 51 | watconvert.exe: watconvert.obj 52 | $(LD) NAME watconvert SYS $(LDSYSTEM) $(LDFLAGS) FILE {watconvert.obj} 53 | watconvert 54 | 55 | -------------------------------------------------------------------------------- /src/pm_tool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * pm_tool.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef TOOLBAR_H_ 12 | #define TOOLBAR_H_ 13 | 14 | #define tiBITMAP 1 15 | #define tiSEPARATOR 2 16 | 17 | #define tfDISABLED 1 18 | #define tfDEPRESSED 0x8000 19 | 20 | #define WC_MTOOLBAR "MToolBar" 21 | 22 | typedef struct { 23 | ULONG ulType; 24 | ULONG ulId; 25 | ULONG ulCommand; 26 | ULONG ulFlags; 27 | HBITMAP hBitmap; 28 | } ToolBarItem; 29 | 30 | typedef struct { 31 | USHORT cb; 32 | LONG ulCount; 33 | ToolBarItem *pItems; 34 | LONG ulDepressed; 35 | } ToolBarData; 36 | 37 | MRESULT EXPENTRY ToolBarProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); 38 | void RegisterToolBarClass(HAB hab); 39 | HWND CreateToolBar(HWND parent, 40 | HWND owner, 41 | ULONG id, 42 | ULONG count, 43 | ToolBarItem *items); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/pmdlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * pmdlg.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #define IDD_ABOUT 400 12 | #define ID_RESOURCE 401 13 | #define IDD_ICON1 402 14 | #define IDD_ICON2 403 15 | 16 | #define IDD_INFO 100 17 | #define INFO_TITLE 101 18 | #define INFO_TEXT 102 19 | #define IDD_ERROR 103 20 | #define INFO_ETITLE 104 21 | #define INFO_ETEXT 105 22 | 23 | #define IDD_PROMPT 300 24 | #define IDS_PROMPT 301 25 | #define IDE_FIELD 302 26 | 27 | #define IDD_FINDREPLACE 201 28 | #define IDD_FIND 202 29 | 30 | #define IDL_FIND 211 31 | #define IDL_REPLACE 212 32 | 33 | #define IDE_FIND 221 34 | #define IDE_REPLACE 222 35 | 36 | #define IDC_IGNORECASE 231 37 | #define IDC_REGEXPS 232 38 | #define IDC_WORDS 233 39 | #define IDC_BLOCK 234 40 | #define IDC_GLOBAL 235 41 | #define IDC_REVERSE 236 42 | #define IDC_ALLOCCURENCES 237 43 | #define IDC_NOPROMPTING 238 44 | #define IDC_JOINLINE 239 45 | #define IDC_DELETELINE 240 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/s_direct.h: -------------------------------------------------------------------------------- 1 | /* s_direct.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef SDIRECT_H_ 12 | #define SDIRECT_H_ 13 | 14 | // error handling needs some work 15 | 16 | #define fiUNKNOWN 0 17 | #define fiFILE 1 18 | #define fiDIRECTORY 2 19 | 20 | class FileInfo { 21 | char *name; // minimum set of file information 22 | char *symlinkTarget; 23 | off_t size; 24 | time_t mtime; 25 | int type; 26 | 27 | public: 28 | FileInfo(const char *Name, int type, off_t Size, time_t MTime, 29 | const char *SymlinkTargetName = 0); 30 | ~FileInfo(); 31 | 32 | const char *Name() const; 33 | const char *SymlinkTargetName() const; 34 | off_t Size() const; 35 | int Type() const; 36 | time_t MTime() const; 37 | }; 38 | 39 | #define ffFAST 1 // optimization for UNIX (return name only, NO TYPE CHECK), ignored on OS/2 and NT 40 | #define ffFULLPATH 2 // return full path to files 41 | #define ffDIRECTORY 4 // return directories beside files (see ffFAST) 42 | #define ffHIDDEN 8 // return hidden files (dot-files for UNIX) 43 | #define ffLINK 16 // diagnose location of symbolic link, not link itself 44 | 45 | class FileFind { 46 | char *Directory; 47 | char *Pattern; 48 | int Flags; 49 | 50 | #if defined(USE_DIRENT) 51 | DIR *dir; 52 | #elif defined(OS2) && !defined(USE_DIRENT) 53 | unsigned long dir; // should be HDIR, but we don't #include huge os2.h globally 54 | #elif defined(NT) && !defined(USE_DIRENT) 55 | unsigned long dir; // should be HANDLE 56 | #endif 57 | 58 | public: 59 | FileFind(const char *aDirectory, const char *aPattern, int aFlags); 60 | ~FileFind(); 61 | 62 | int FindFirst(FileInfo **fi); 63 | int FindNext(FileInfo **fi); 64 | }; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /src/s_files.h: -------------------------------------------------------------------------------- 1 | /* s_files.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef FILESYS_H_ 12 | #define FILESYS_H_ 13 | 14 | #define SDOT "." 15 | 16 | #ifdef UNIX 17 | #define SLASH '/' 18 | #define SSLASH "/" 19 | 20 | #define ISSLASH(c) ((c) == SLASH) 21 | #define ISSEP(c) ((c) == SLASH) 22 | #endif // UNIX 23 | 24 | #if defined(OS2) || defined(NT) 25 | #define SLASH '\\' 26 | #define SSLASH "\\" 27 | 28 | #define ISSLASH(c) (((c) == '/') || ((c) == '\\')) 29 | #define ISSEP(c) (((c) == ':') || ISSLASH(c)) 30 | #endif // OS2 || NT 31 | 32 | char *Slash(char *Path, int Add); 33 | char *SlashDir(char *Path); 34 | int ExpandPath(const char *Path, char *Expanded, int ExpandSize); 35 | int CompletePath(const char *Path, char *Completed, int Num); 36 | int IsSameFile(const char *Path1, const char *Path2); 37 | int JustDirectory(const char *Path, char *Dir, int DirSize); 38 | int JustFileName(const char *Path, char *Name, int NameSize); 39 | int JustLastDirectory(const char *Path, char *Dir, int DirSize); 40 | int JustRoot(const char *Path, char *Root, int RootSize); 41 | int FileExists(const char *Path); 42 | int IsFullPath(const char *Path); 43 | int IsDirectory(const char *Path); 44 | const char *ShortFName(const char *Path, int len); 45 | int ChangeDir(char *Dir); 46 | int JoinDirFile(char *Dest, const char *Dir, const char *Name); 47 | char *SepRChr(char *Dir); 48 | int RelativePathName(const char *Dir, const char *Path, char *RelPath); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/s_string.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * s_string.cpp 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #include "fte.h" 12 | #include 13 | 14 | int UnTabStr(char *dest, int maxlen, const char *source, int slen) { 15 | char *p = dest; 16 | int i; 17 | int pos = 0; 18 | 19 | maxlen--; 20 | for (i = 0; i < slen; i++) { 21 | if (maxlen > 0) { 22 | if (source[i] == '\t') { 23 | do { 24 | if (maxlen > 0) { 25 | *p++ = ' '; 26 | maxlen--; 27 | } 28 | pos++; 29 | } while (pos & 0x7); 30 | } else { 31 | *p++ = source[i]; 32 | pos++; 33 | maxlen--; 34 | } 35 | } else 36 | break; 37 | } 38 | 39 | //dest[pos] = 0; 40 | *p = '\0'; 41 | return pos; 42 | } 43 | 44 | #if !defined(HAVE_STRLCPY) 45 | size_t strlcpy(char *dst, const char *src, size_t size) { 46 | size_t ret = strlen(src); 47 | 48 | if (size) { 49 | size_t len = (ret >= size) ? size - 1 : ret; 50 | memcpy(dst, src, len); 51 | dst[len] = '\0'; 52 | } 53 | 54 | return ret; 55 | } 56 | #endif // !HAVE_STRLCPY 57 | 58 | #if !defined(HAVE_STRLCAT) 59 | size_t strlcat(char *dst, const char *src, size_t size) { 60 | size_t dst_len = strlen(dst); 61 | size_t src_len = strlen(src); 62 | 63 | if (size) { 64 | size_t len = (src_len >= size - dst_len) ? (size - dst_len - 1) : src_len; 65 | memcpy(&dst[dst_len], src, len); 66 | dst[dst_len + len] = '\0'; 67 | } 68 | 69 | return dst_len + src_len; 70 | } 71 | #endif // !HAVE_STRLCAT 72 | 73 | #if !defined(HAVE_STRICMP) 74 | int stricmp(const char *a, const char *b) { 75 | if (a != NULL && b == NULL) return 1; 76 | if (a == NULL && b != NULL) return -1; 77 | if (a == NULL && b == NULL) return 0; 78 | 79 | int aLen = strlen(a); 80 | int bLen = strlen(b); 81 | 82 | int minLen = aLen < bLen ? aLen : bLen; 83 | 84 | for (int idx=0; idx < minLen; idx++) { 85 | char aC = toupper(a[idx]); 86 | char bC = toupper(b[idx]); 87 | 88 | if (aC > bC) return 1; 89 | else if (aC < bC) return -1; 90 | } 91 | 92 | if (aLen < bLen) return -1; 93 | else if (aLen > bLen) return 1; 94 | else return 0; 95 | } 96 | #endif // !HAVE_STRICMP 97 | -------------------------------------------------------------------------------- /src/s_string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * string.h 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef S_STRING_H_ 12 | #define S_STRING_H_ 13 | 14 | int UnTabStr(char *dest, int maxlen, const char *source, int slen); 15 | 16 | #if !defined(HAVE_STRLCPY) 17 | size_t strlcpy(char *dst, const char *src, size_t size); 18 | #endif // !HAVE_STRLCPY 19 | 20 | #if !defined(HAVE_STRLCAT) 21 | size_t strlcat(char *dst, const char *src, size_t size); 22 | #endif // !HAVE_STRLCAT 23 | 24 | #if !defined(HAVE_STRICMP) 25 | int stricmp(const char *a, const char *b); 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/s_util.h: -------------------------------------------------------------------------------- 1 | /* s_util.h 2 | * 3 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 4 | * Copyright (c) 1994-1996, Marko Macek 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | */ 10 | 11 | #ifndef S_UTIL_H_ 12 | #define S_UTIL_H_ 13 | 14 | #define USE_CtrlEnter 1 15 | 16 | #define S_BUSY 0 17 | #define S_INFO 1 18 | #define S_BOLD 2 19 | #define S_ERROR 3 20 | 21 | class EView; 22 | class EBuffer; 23 | class EModel; 24 | 25 | char* MakeBackup(const char *FileName, char *NewName); 26 | 27 | int GetPMClip(int clipboard); 28 | int PutPMClip(int clipboard); 29 | 30 | int FileLoad(int createFlags, const char *FileName, const char *Mode, EView *View); 31 | int MultiFileLoad(int createFlags, const char *FileName, const char *Mode, EView *View); 32 | int SetDefaultDirectory(EModel *M); 33 | int GetDefaultDirectory(EModel *M, char *Path, int MaxLen); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/watconvert.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * watconvert.cpp 3 | * 4 | * Copyright (c) 2008, eFTE SF Group (see AUTHORS file) 5 | * 6 | * You may distribute under the terms of either the GNU General Public 7 | * License or the Artistic License, as specified in the README file. 8 | * 9 | * wmake uses '&' as a line continuation however objs.inc 10 | * uses '\' so this executable will read in objs.inc, convert 11 | * the file, and save as objs.mif for use by wmake 12 | * 13 | */ 14 | 15 | #include 16 | #include 17 | 18 | int main() { 19 | int i; 20 | 21 | char buffer[30]; 22 | 23 | FILE *input; 24 | FILE *output; 25 | 26 | input = fopen("objs.inc", "r"); 27 | if (input == NULL) { 28 | printf("objs.inc file not found\n"); 29 | return EXIT_FAILURE; 30 | } 31 | 32 | output = fopen("objs.mif", "w"); 33 | if (output == NULL) { 34 | fclose(input); 35 | printf("objs.mif not writable\n"); 36 | return EXIT_FAILURE; 37 | } 38 | 39 | while (fgets(buffer, 30, input) != NULL) { 40 | for (i = 0; i < 30; i++) if (buffer[i] == '\\') buffer[i] = '&'; 41 | fputs(buffer, output); 42 | } 43 | 44 | fclose(input); 45 | fclose(output); 46 | return EXIT_SUCCESS; 47 | } 48 | --------------------------------------------------------------------------------