├── VERSION ├── subprojects ├── .gitignore ├── packagefiles │ ├── tree-sitter-go │ │ └── meson.build │ └── tree-sitter-json │ │ └── meson.build ├── tree-sitter-go.wrap ├── tree-sitter-json.wrap └── tree-sitter.wrap ├── kmaps ├── ligatures ├── fonts ├── helv8.fbf ├── fixed10.fbf ├── fixed12.fbf ├── fixed13.fbf ├── fixed14.fbf ├── helv10.fbf ├── helv12.fbf ├── helv14.fbf ├── helv18.fbf ├── helv24.fbf ├── times10.fbf ├── times12.fbf ├── times14.fbf ├── times18.fbf ├── times24.fbf ├── times8.fbf └── unifont.fbf ├── kmap ├── VNtelex.kmap ├── Chinese-CJ.kmap ├── GreekBible.kmap ├── Lithuanian.kmap ├── Hungarian.kmap ├── Georgian.kmap ├── Polish.kmap ├── HebrewP.kmap ├── Hangul2.kmap ├── Esperanto.kmap ├── Russian.kmap ├── Hangul3.kmap ├── Spanish.kmap ├── Israeli.kmap ├── Unicode2.kmap ├── README ├── DE-RU.kmap ├── ArmenianEast.kmap ├── ArmenianWest.kmap ├── Guarani.kmap ├── DanishAlternate.kmap ├── Hebrew.kmap ├── HebrewR.kmap ├── French.kmap ├── Hangul.kmap ├── German.kmap ├── Czech.kmap ├── Arabic.kmap ├── Greek.kmap ├── Dutch.kmap ├── HebrewIsraeli.kmap ├── Thai.kmap ├── Danish.kmap ├── Welsh.kmap ├── KOI8_R.kmap ├── XKB_iso8859-4.kmap └── Yiddish.kmap ├── tests ├── NonBMP1.utf8 ├── TestPage.ucs2be.txt ├── TestPage.ucs2le.txt ├── TestPage.ucs4be.txt ├── TestPage.ucs4le.txt ├── lattrs.txt ├── test-hebrew ├── scocols.txt ├── test-capital-rtl ├── vt100.txt ├── utf8.txt ├── test-capital-rtl.ref ├── TestPage.txt ├── testbidi.html ├── HELLO.txt └── colours.txt ├── libqhtml ├── .cvsignore ├── cssid.h ├── Makefile └── csstoqe.c ├── meson_options.txt ├── .gitignore ├── .cvsignore ├── config.h.in ├── plugins ├── my_plugin.c └── Makefile ├── .travis.yml ├── .github └── workflows │ └── workflow.yml ├── qeend.c ├── qe.tcc ├── config.eg ├── README.md ├── cfb.h ├── docbook.c ├── haiku-pe2qe.sh ├── qt.h ├── qe.1 ├── qemacs.spec ├── fbfrender.h ├── meson.build ├── variables.h ├── fbftoqe.c ├── list.c ├── qfribidi.h ├── qestyles.h ├── input.c ├── cutils.h ├── script.c ├── indic.c ├── lisp.c ├── Changelog ├── libfbf.h ├── cp ├── README └── koi8_u.cp ├── mpeg.c └── cutils.c /VERSION: -------------------------------------------------------------------------------- 1 | 0.4.0dev 2 | -------------------------------------------------------------------------------- /subprojects/.gitignore: -------------------------------------------------------------------------------- 1 | tree-sitter-* 2 | -------------------------------------------------------------------------------- /kmaps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/kmaps -------------------------------------------------------------------------------- /ligatures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/ligatures -------------------------------------------------------------------------------- /fonts/helv8.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/helv8.fbf -------------------------------------------------------------------------------- /fonts/fixed10.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/fixed10.fbf -------------------------------------------------------------------------------- /fonts/fixed12.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/fixed12.fbf -------------------------------------------------------------------------------- /fonts/fixed13.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/fixed13.fbf -------------------------------------------------------------------------------- /fonts/fixed14.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/fixed14.fbf -------------------------------------------------------------------------------- /fonts/helv10.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/helv10.fbf -------------------------------------------------------------------------------- /fonts/helv12.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/helv12.fbf -------------------------------------------------------------------------------- /fonts/helv14.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/helv14.fbf -------------------------------------------------------------------------------- /fonts/helv18.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/helv18.fbf -------------------------------------------------------------------------------- /fonts/helv24.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/helv24.fbf -------------------------------------------------------------------------------- /fonts/times10.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/times10.fbf -------------------------------------------------------------------------------- /fonts/times12.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/times12.fbf -------------------------------------------------------------------------------- /fonts/times14.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/times14.fbf -------------------------------------------------------------------------------- /fonts/times18.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/times18.fbf -------------------------------------------------------------------------------- /fonts/times24.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/times24.fbf -------------------------------------------------------------------------------- /fonts/times8.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/times8.fbf -------------------------------------------------------------------------------- /fonts/unifont.fbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/fonts/unifont.fbf -------------------------------------------------------------------------------- /kmap/VNtelex.kmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/kmap/VNtelex.kmap -------------------------------------------------------------------------------- /tests/NonBMP1.utf8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/tests/NonBMP1.utf8 -------------------------------------------------------------------------------- /kmap/Chinese-CJ.kmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/kmap/Chinese-CJ.kmap -------------------------------------------------------------------------------- /kmap/GreekBible.kmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/kmap/GreekBible.kmap -------------------------------------------------------------------------------- /libqhtml/.cvsignore: -------------------------------------------------------------------------------- 1 | docbook_style.c 2 | html_style.c 3 | *.exe 4 | *.dSYM 5 | csstoqe 6 | -------------------------------------------------------------------------------- /tests/TestPage.ucs2be.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/tests/TestPage.ucs2be.txt -------------------------------------------------------------------------------- /tests/TestPage.ucs2le.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/tests/TestPage.ucs2le.txt -------------------------------------------------------------------------------- /tests/TestPage.ucs4be.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/tests/TestPage.ucs4be.txt -------------------------------------------------------------------------------- /tests/TestPage.ucs4le.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dmacvicar/qemacs/HEAD/tests/TestPage.ucs4le.txt -------------------------------------------------------------------------------- /subprojects/packagefiles/tree-sitter-go/meson.build: -------------------------------------------------------------------------------- 1 | project('tree-sitter-go') 2 | tree_sitter_go_dep = declare_dependency(sources: 'src/parser.c') 3 | -------------------------------------------------------------------------------- /subprojects/packagefiles/tree-sitter-json/meson.build: -------------------------------------------------------------------------------- 1 | project('tree-sitter-json') 2 | tree_sitter_json_dep = declare_dependency(sources: 'src/parser.c') 3 | -------------------------------------------------------------------------------- /tests/lattrs.txt: -------------------------------------------------------------------------------- 1 | Test of line attributes: 2 | 3 | #3Double-height top 4 | #4Double-height bottom 5 | #5Normal text (#5) 6 | #6Double-width only 7 | -------------------------------------------------------------------------------- /subprojects/tree-sitter-go.wrap: -------------------------------------------------------------------------------- 1 | [wrap-git] 2 | url = https://github.com/tree-sitter/tree-sitter-go.git 3 | revision = master 4 | depth = 1 5 | patch_directory = tree-sitter-go 6 | -------------------------------------------------------------------------------- /subprojects/tree-sitter-json.wrap: -------------------------------------------------------------------------------- 1 | [wrap-git] 2 | url = https://github.com/tree-sitter/tree-sitter-json.git 3 | revision = master 4 | depth = 1 5 | patch_directory = tree-sitter-json 6 | -------------------------------------------------------------------------------- /subprojects/tree-sitter.wrap: -------------------------------------------------------------------------------- 1 | [wrap-git] 2 | url = https://github.com/tree-sitter/tree-sitter.git 3 | revision = head 4 | depth = 1 5 | 6 | 7 | [provide] 8 | tree-sitter = treesitter_dep -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('tiny', type : 'feature', value : 'disabled') 2 | option('treesitter', type : 'feature', value : 'enabled') 3 | option('gtk', type : 'feature', value : 'enabled') 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | STATS 2 | config.h 3 | config.mak 4 | *.moc.cpp 5 | exec 6 | .tobjs 7 | .objs 8 | tqe 9 | tqe_g 10 | qe 11 | qe_g 12 | libqhtml/csstoqe 13 | libqhtml/docbook_style.c 14 | libqhtml/html_style.c 15 | libqhtml/libqhtml.a 16 | fbffonts.c 17 | fbftoqe 18 | html2png 19 | qe-doc.html 20 | build -------------------------------------------------------------------------------- /.cvsignore: -------------------------------------------------------------------------------- 1 | config.mak 2 | config.h 3 | .objs 4 | .tobjs 5 | *.exe 6 | *.dSYM 7 | qe 8 | qe_g 9 | tqe 10 | tqe_g 11 | fbftoqe 12 | fbffonts.c 13 | html2png 14 | cptoqe 15 | kmaptoqe 16 | ligtoqe 17 | jistoqe 18 | allmodules.txt 19 | basemodules.txt 20 | STATS 21 | .tags 22 | patches 23 | cur 24 | old 25 | nnn 26 | msg 27 | doc 28 | junk 29 | .qerc 30 | -------------------------------------------------------------------------------- /tests/test-hebrew: -------------------------------------------------------------------------------- 1 | שלום abc 2 | abc שלום 3 | abc שלום cde 4 | he said: "זה לא נכון!" 5 | he said: "זה לא נכון!‏" 6 | (שלום) abc 7 | abc (שלום) 8 | #@$ שלום 9 |

שלום

10 | שלום 23 שלום abc 11 | שלום ~~~23%%% שלום abc 12 | שלום abc ~~~23%%% שלום abc 13 | שלום abc@23@cde שלום 14 | שלום abc 23 cde שלום 15 | שלום abc 23 שלום abc 16 | <שלום>Shalom 17 | שa 2 ש 18 | -------------------------------------------------------------------------------- /config.h.in: -------------------------------------------------------------------------------- 1 | #mesondefine QE_VERSION 2 | #mesondefine CONFIG_NETWORK 3 | #mesondefine CONFIG_QT 4 | #mesondefine CONFIG_X11 5 | #mesondefine CONFIG_XV 6 | #mesondefine CONFIG_HTML 7 | #mesondefine CONFIG_DLL 8 | #mesondefine CONFIG_PNG_OUTPUT 9 | #mesondefine CONFIG_MMAP 10 | #mesondefine CONFIG_ALL_MODES 11 | #mesondefine CONFIG_UNICODE_JOIN 12 | #mesondefine CONFIG_QE_PREFIX 13 | #mesondefine CONFIG_QE_DATADIR 14 | -------------------------------------------------------------------------------- /kmap/Lithuanian.kmap: -------------------------------------------------------------------------------- 1 | // Lithuanian group of Lithuanian keymap for yudit editor. 2 | 3 | "0x31=0x105", 4 | "0x32=0x10d", 5 | "0x33=0x119", 6 | "0x34=0x117", 7 | "0x35=0x12f", 8 | "0x36=0x161", 9 | "0x37=0x173", 10 | "0x38=0x16b", 11 | "0x39=0x201e", 12 | "0x30=0x201c", 13 | "0x3d=0x17e", 14 | 15 | "!=0x104", 16 | "@=0x10c", 17 | "#=0x118", 18 | "$=0x116", 19 | "%=0x12e", 20 | "^=0x160", 21 | "&=0x172", 22 | "*=0x16a", 23 | "+=0x17d", 24 | 25 | -------------------------------------------------------------------------------- /tests/scocols.txt: -------------------------------------------------------------------------------- 1 | Test of (destructive) SCO colour rendering. 2 | SCO fg: [=0F0[=7F [=1F1[=7F [=2F2[=7F [=3F3[=7F [=4F4[=7F [=5F5[=7F [=6F6[=7F [=7F7[=7F [=8F8[=7F [=9F9[=7F [=10F10[=7F [=11F11[=7F [=12F12[=7F [=13F13[=7F [=14F14[=7F [=15F15[=7F 3 | SCO bg: [=0G0[=0G [=1G1[=0G [=2G2[=0G [=3G3[=0G [=4G4[=0G [=5G5[=0G [=6G6[=0G [=7G7[=0G [=8G8[=0G [=9G9[=0G [=10G10[=0G [=11G11[=0G [=12G12[=0G [=13G13[=0G [=14G14[=0G [=15G15[=0G 4 | -------------------------------------------------------------------------------- /tests/test-capital-rtl: -------------------------------------------------------------------------------- 1 | car is THE CAR in arabic 2 | CAR IS the car IN ENGLISH 3 | he said "IT IS 123, 456, OK" 4 | he said "IT IS (123, 456), OK" 5 | he said "IT IS 123,456, OK" 6 | he said "IT IS (123,456), OK" 7 | HE SAID "it is 123, 456, ok" 8 | shalom 9 | SAALAM 10 | HE SAID "it is a car!" AND RAN 11 | HE SAID "it is a car!x" AND RAN 12 | -2 CELSIUS IS COLD 13 | SOLVE 1*5 1-5 1/5 1+5 14 | THE RANGE IS 2.5..5 15 | IOU $10 16 | CHANGE -10% 17 | -10% CHANGE 18 | -------------------------------------------------------------------------------- /plugins/my_plugin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Simple plugin example 3 | */ 4 | #include "qe.h" 5 | 6 | /* insert 'hello' at the current cursor position */ 7 | static void insert_hello(EditState *s) 8 | { 9 | s->offset += eb_insert_str(s->b, s->offset, "Hello world\n"); 10 | } 11 | 12 | static CmdDef my_commands[] = { 13 | CMD2( KEY_CTRLC('h'), KEY_NONE, /* C-c h */ 14 | "insert-hello", insert_hello, ES, "*") 15 | CMD_DEF_END, 16 | }; 17 | 18 | static int my_plugin_init(void) 19 | { 20 | /* commands and default keys */ 21 | qe_register_cmd_table(my_commands, NULL); 22 | 23 | return 0; 24 | } 25 | 26 | qe_module_init(my_plugin_init); 27 | -------------------------------------------------------------------------------- /kmap/Hungarian.kmap: -------------------------------------------------------------------------------- 1 | // Accents for ISO-8859-2Hungarian and German 2 | 3 | "Ss = 0xa7", 4 | "A' = 0xc1", 5 | "A: = 0xc4", 6 | "E' = 0xc9", 7 | "E$ = 0x20AC", 8 | "e$ = 0x20AC", 9 | "Y$ =0xFFE5", 10 | "y$ =0x00A5", 11 | "I' = 0xcd", 12 | "O' = 0xd3", 13 | "O\" = 0x0150", 14 | "O: = 0xd6", 15 | "U' = 0xda", 16 | "U\" = 0x0170", 17 | "U: = 0xdc", 18 | "SS = 0xdf", 19 | "a' = 0xe1", 20 | "a: = 0xe4", 21 | "e' = 0xe9", 22 | "i' = 0xed", 23 | "o' = 0xf3", 24 | "o\" = 0x0151", 25 | "o: = 0xf6", 26 | "-: = 0xf7", 27 | "u' = 0xfa", 28 | "u\" = 0x0171", 29 | "u: = 0xfc", 30 | ":) = 0x263A", 31 | "'' = 0x201D", // ” RIGHT DOUBLE QUOTATION MARK 32 | ",,=0x201E", // „ DOUBLE LOW-9 QUOTATION MARK 33 | "``=0x201C", // “ LEFT DOUBLE QUOTATION MARK 34 | "...=0x2026", // … 35 | "--=0x2013", // – 36 | -------------------------------------------------------------------------------- /tests/vt100.txt: -------------------------------------------------------------------------------- 1 | VT100 line drawing characters, actually using the VT100 escapes 2 | (B)0ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo 3 | 4 | lqqqqqqqqqqpoopqrssrqqqqqqqqqqwqqqqqqqqqqpoopqrssrqqqqqqqqqqk 5 | x x x 6 | x ooh, swirly! x top right corner x 7 | x x x 8 | tqqqqqqqqqqpoopqrssrqqqqqqqqqqnqqqqqqqqqqpoopqrssrqqqqqqqqqqu 9 | x x x 10 | x stuff down here x is quite inane x 11 | x x x 12 | mqqqqqqqqqqpoopqrssrqqqqqqqqqqvqqqqqqqqqqpoopqrssrqqqqqqqqqqj 13 | -------------------------------------------------------------------------------- /plugins/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # QEmacs sample Makefile to develop plugins 3 | # 4 | # QEmacs plugins can contain modes, bindings, or any other qemacs 5 | # dynamically registerable resource. 6 | # 7 | 8 | # modify to get the path of the qemacs sources 9 | QEMACS_PATH=../ 10 | # define the name of your plugin 11 | LIB=my_plugin.so 12 | # define the object files it contains 13 | OBJS=my_plugin.o 14 | 15 | INCLUDES=-I$(QEMACS_PATH) 16 | DEFINES=-DQE_MODULE 17 | DIST_LIB:=$(HOME)/.qe/$(LIB) 18 | CC=gcc 19 | CFLAGS=-O2 -Wall -g -fPIC $(INCLUDES) $(DEFINES) 20 | 21 | # by default, the plugin is copied in ~/.qe/ some that qemacs can load 22 | # it automatically. 23 | all: $(DIST_LIB) 24 | 25 | $(DIST_LIB): $(LIB) 26 | install -s -m 644 $< $@ 27 | 28 | install: $(DIST_LIB) 29 | 30 | $(LIB): $(OBJS) Makefile 31 | $(CC) -shared -o $@ $(OBJS) 32 | 33 | %.o: %.c 34 | $(CC) $(CFLAGS) -c -o $@ $< 35 | 36 | clean: 37 | rm -f *.o *.so *~ 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | env: 3 | - GUI=qt 4 | - GUI=gtk 5 | os: 6 | - linux 7 | - osx 8 | compiler: 9 | - gcc 10 | - clang 11 | matrix: 12 | exclude: 13 | - os: osx 14 | env: GUI=gtk 15 | allow_failures: 16 | - os: osx 17 | 18 | install: 19 | - cmake --version 20 | - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; brew install qt5; fi 21 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update; sudo apt-get install qtbase5-dev qt5-qmake libgtk-3-dev; fi 22 | 23 | script: 24 | - git submodule update --init 25 | - mkdir _build && cd _build 26 | - if [[ "$TRAVIS_OS_NAME" == "osx" && "$GUI" == "qt" ]]; then cmake -DCMAKE_PREFIX_PATH=$(brew --prefix qt5) -DCONFIG_QT=ON -DCONFIG_TINY=ON ..; fi 27 | - if [[ "$TRAVIS_OS_NAME" == "linux" && "$GUI" == "qt" ]]; then cmake -DCONFIG_QT=ON -DCONFIG_TINY=ON .. ; fi 28 | - if [[ "$TRAVIS_OS_NAME" == "linux" && "$GUI" == "gtk" ]]; then cmake -DCONFIG_GTK=ON -DCONFIG_TINY=ON .. ; fi 29 | - make VERBOSE=1 30 | -------------------------------------------------------------------------------- /.github/workflows/workflow.yml: -------------------------------------------------------------------------------- 1 | name: Main workflow 2 | on: [push] 3 | jobs: 4 | test: 5 | name: Test ${{ matrix.gui }} build on ${{ matrix.os }} 6 | runs-on: ${{ matrix.os }} 7 | strategy: 8 | matrix: 9 | os: [ubuntu-latest] 10 | gui: [gtk, qt] 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@master 14 | with: 15 | fetch-depth: 1 16 | - name: Setup Qt on Linux 17 | run: sudo apt-get update; sudo apt-get install qtbase5-dev qt5-qmake 18 | if: matrix.os == 'ubuntu-latest' && matrix.gui == 'qt' 19 | - name: Setup Gtk on Linux 20 | run: sudo apt-get update; sudo apt-get install libgtk-3-dev 21 | if: matrix.os == 'ubuntu-latest' && matrix.gui == 'gtk' 22 | - name: Run cmake Qt 23 | run: mkdir _build && cd _build && cmake -DCONFIG_QT=ON -DCONFIG_TINY=ON .. 24 | if: matrix.gui == 'qt' 25 | - name: Run cmake GTK 26 | run: mkdir _build && cd _build && cmake -DCONFIG_GTK=ON -DCONFIG_TINY=ON .. 27 | if: matrix.gui == 'gtk' 28 | - name: Run make 29 | run: cd _build && make VERBOSE=1 30 | -------------------------------------------------------------------------------- /kmap/Georgian.kmap: -------------------------------------------------------------------------------- 1 | // 2 | // Georgian 3 | // 4 | // Based on a variation of a common Georgian transliteration. 5 | // 1998-11-21 Mark Leisher 6 | // 7 | "a=0x10D0", // ა 8 | "b=0x10D1", // ბ 9 | "g=0x10D2", // გ 10 | "d=0x10D3", // დ 11 | "e=0x10D4", // ე 12 | "v=0x10D5", // ვ 13 | "z=0x10D6", // ზ 14 | "t=0x10D7", // თ 15 | "i=0x10D8", // ი 16 | ".k=0x10D9", // კ 17 | "l=0x10DA", // ლ 18 | "m=0x10DB", // მ 19 | "n=0x10DC", // ნ 20 | "o=0x10DD", // ო 21 | ".p=0x10DE", // პ 22 | "\+z=0x10DF", // ჟ 23 | "r=0x10E0", // რ 24 | "s=0x10E1", // ს 25 | ".t=0x10E2", // ტ 26 | "u=0x10E3", // უ 27 | "p=0x10E4", // ფ 28 | "k=0x10E5", // ქ 29 | ".g=0x10E6", // ღ 30 | "q=0x10E7", // ყ 31 | "\+s=0x10E8", // შ 32 | "\+c=0x10E9", // ჩ 33 | "c=0x10EA", // ც 34 | "j=0x10EB", // ძ 35 | ".c=0x10EC", // წ 36 | ".\+c=0x10ED", // ჭ 37 | "x=0x10EE", // ხ 38 | "\+j=0x10EF", // ჯ 39 | "h=0x10F0", // ჰ 40 | "q1=0x10F4", // ჴ 41 | "e0=0x10F1", // ჱ 42 | "o1=0x10F5", // ჵ 43 | "i1=0x10F2", // ჲ 44 | "w=0x10F3", // ჳ 45 | "f=0x10F6", // ჶ 46 | "y=0xF0F7", //  Letter not in Unicode. 47 | "e1=0xF0F8", //  Letter not in Unicode. 48 | -------------------------------------------------------------------------------- /tests/utf8.txt: -------------------------------------------------------------------------------- 1 | Test of UTF-8 output in a terminal emulator 2 | ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ 3 | 4 | Some basic Unicode: 5 | ∮ E⋅da = Q, n → ∞, ∑ f(i) = ∏ g(i), ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), 6 | ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ, ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (A ⇔ B), 7 | 8 | Combining characters: 9 | STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ 10 | [----------------------------|------------------------] 11 | ๏ แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช พระปกเกศกองบู๊กู้ขึ้นใหม่ 12 | สิบสองกษัตริย์ก่อนหน้าแลถัดไป สององค์ไซร้โง่เขลาเบาปัญญา 13 | 14 | Wide characters with difficult wrapping: 15 | Here we go then: コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ コンニチハ 16 | 17 | Arabic and bidirectional text: 18 | (من مجمع الزوائد ومنبع الفوائد للهيثمي ، ج 1 ، ص 74-84) 19 | عن جرير رضي الله عنه قال قال رسول الله صلى الله عليه 20 | وسلم: بني الاسلام على خمس شهادة ان لا اله الا الله واقام 21 | Mixed LTR and RTL text: جرير رضي back to LTR. 22 | 23 | East Asian Ambiguous characters: ¼½¾¼½¾¼½¾¼½¾¼½¾¼½¾¼½¾¼½¾¼½¾¼½¾ 24 | -------------------------------------------------------------------------------- /qeend.c: -------------------------------------------------------------------------------- 1 | /* 2 | * QEmacs, tiny but powerful multimode editor 3 | * 4 | * Copyright (c) 2000,2001 Fabrice Bellard. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #include 22 | #include "qe.h" 23 | 24 | #ifdef CONFIG_INIT_CALLS 25 | 26 | /* add empty pointers at the end of init and cleanup sections */ 27 | static int (*__initcall_end)(void) __init_call = NULL; 28 | 29 | static void (*__exitcall_end)(void) __exit_call = NULL; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /qe.tcc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # QEmacs can be compiled directly with TinyCC. Launch this script to 4 | # compile and execute qemacs with TinyCC. 5 | # 6 | 7 | # just for benchmarking 8 | tcc_opts="" 9 | libs="-L/usr/X11R6/lib -lXext -lXv -lX11" 10 | #tcc="tcc" 11 | tcc="../tcc/tcc" 12 | if [ "$1" = "-bench" ] ; then 13 | tcc_opts="$tcc_opts -o /tmp/qe -bench" 14 | shift 15 | fi 16 | if [ "$1" = "-gprof" ] ; then 17 | tcc="${tcc}_p" 18 | libs="" 19 | shift 20 | fi 21 | if [ "$1" = "-g" ] ; then 22 | tcc_opts="$tcc_opts -g" 23 | shift 24 | fi 25 | if [ "$1" = "-b" ] ; then 26 | tcc_opts="$tcc_opts -b" 27 | shift 28 | fi 29 | 30 | $tcc $tcc_opts $libs -DHAVE_QE_CONFIG_H -DQE_VERSION=\"0.3tcc\" -Iliburlio -- \ 31 | qe.c charset.c buffer.c input.c unicode_join.c \ 32 | qfribidi.c \ 33 | display.c tty.c util.c hex.c list.c \ 34 | clang.c shell.c \ 35 | css.c cssparse.c xmlparse.c html.c html_style.c \ 36 | x11.c \ 37 | liburlio/cutils.c liburlio/urlmisc.c liburlio/mem.c \ 38 | liburlio/urlio.c liburlio/file.c liburlio/dns.c \ 39 | liburlio/tcp.c liburlio/http.c \ 40 | qeend.c -- $* 41 | -------------------------------------------------------------------------------- /kmap/Polish.kmap: -------------------------------------------------------------------------------- 1 | // Polish.kmap for the Unicode editor Yudit 2 | // 1998-04-17 Roman Czyborra@cs.tu-berlin.de 3 | 4 | // Cześć, Lech Wałęsa [va'wε̃sa] i François Mitterand! 5 | 6 | "A;=0x0104", // Ą = LATIN CAPITAL LETTER A WITH OGONEK 7 | "C'=0x0106", // Ć = LATIN CAPITAL LETTER C WITH ACUTE 8 | "E;=0x0118", // Ę = LATIN CAPITAL LETTER E WITH OGONEK 9 | "L;=0x0141", // Ł = LATIN CAPITAL LETTER L WITH STROKE 10 | "N'=0x0143", // Ń = LATIN CAPITAL LETTER N WITH ACUTE 11 | "O'=0x00d3", // Ó = LATIN CAPITAL LETTER O WITH ACUTE 12 | "S'=0x015a", // Ś = LATIN CAPITAL LETTER S WITH ACUTE 13 | "Z'=0x0179", // Ź = LATIN CAPITAL LETTER Z WITH ACUTE 14 | "Z;=0x017b", // Ż = LATIN CAPITAL LETTER Z WITH DOT ABOVE 15 | "a;=0x0105", // ą = LATIN SMALL LETTER A WITH OGONEK 16 | "c'=0x0107", // ć = LATIN SMALL LETTER C WITH ACUTE 17 | "e;=0x0119", // ę = LATIN SMALL LETTER E WITH OGONEK 18 | "l;=0x0142", // ł = LATIN SMALL LETTER L WITH STROKE 19 | "n'=0x0144", // ń = LATIN SMALL LETTER N WITH ACUTE 20 | "o'=0x00f3", // ó = LATIN SMALL LETTER O WITH ACUTE 21 | "s'=0x015b", // ś = LATIN SMALL LETTER S WITH ACUTE 22 | "z'=0x017a", // ź = LATIN SMALL LETTER Z WITH ACUTE 23 | "z;=0x017c", // ż = LATIN SMALL LETTER Z WITH DOT ABOVE 24 | 25 | -------------------------------------------------------------------------------- /config.eg: -------------------------------------------------------------------------------- 1 | // Sample qemacs config file 2 | // 3 | // copy it in ~/.qe/config 4 | // 5 | // You can call any Qemacs command with a C like syntax. 6 | // 7 | // underscores can be used in command names instead of dash. 8 | // 9 | 10 | // simple key definition 11 | // C-key : Control + key 12 | // M-key : Meta + key 13 | // Read util.c to get all the key names 14 | // CG: should be save-all-buffers? 15 | global_set_key("C-x s", "set-style"); 16 | 17 | // set X11 display size 18 | set_display_size(80, 50); 19 | 20 | // set default input method 21 | //set_input_method("HebrewIsraeli"); 22 | 23 | // set X11 fonts and fall backs 24 | set_system_font("fixed", "fixed,unifont"); 25 | set_system_font("sans", "helvetica,unifont"); 26 | set_system_font("serif", "times,unifont"); 27 | 28 | // simple styles 29 | set_style("mode-line", "background-color", "white"); 30 | set_style("comment", "font-family", "sans"); 31 | set_style("comment", "font-size", "12"); 32 | set_style("comment", "font-style", "italic"); 33 | 34 | set_style("keyword", "font-family", "serif"); 35 | set_style("keyword", "font-size", "18"); 36 | 37 | set_style("function", "font-family", "serif"); 38 | set_style("function", "font-size", "18"); 39 | set_style("function", "font-weight", "bold"); 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # An unamed QEmacs fork 3 | 4 | ![maintained](https://img.shields.io/maintenance/yes/2018.svg) ![Build Status](https://github.com/dmacvicar/qemacs/workflows/Main%20workflow/badge.svg) 5 | 6 | ## About QEmacs 7 | 8 | QEmacs is an Emacs clone created by Fabrice Bellard. 9 | Since 2004, it was maintained by Charlie Gordon until early 2014. 10 | 11 | ## About this fork 12 | 13 | This fork has educational purposes and the following goals in addition 14 | to general refactorings and cleanups: 15 | 16 | - [x] a more modern GUI frontend (Qt, but that may change) 17 | - [x] build with CMake 18 | - [ ] remove unecesary stuff (video and others) 19 | - [ ] add scripting support (lua? js?) 20 | 21 | # Compiling 22 | 23 | ``` 24 | mkdir build 25 | cmake -DCMAKE_BUILD_TYPE=Release -DCONFIG_QT=ON .. 26 | make 27 | ``` 28 | 29 | ## Some caveats 30 | 31 | * The original qe supported x11 and terminal in one binary. The Qt 32 | version uses the Qt event loop and that conflicts with unix.c event 33 | loop used by the terminal one. We need a separate binary like the 34 | real emacs-nox. 35 | 36 | ## Documentation 37 | 38 | Read the file qe-doc.html. 39 | 40 | ## Licensing 41 | 42 | QEmacs is released under the GNU Lesser General Public License (read 43 | the accompagning COPYING file). 44 | -------------------------------------------------------------------------------- /tests/test-capital-rtl.ref: -------------------------------------------------------------------------------- 1 | car is THE CAR in arabic => car is RAC EHT in arabic 2 | CAR IS the car IN ENGLISH => HSILGNE NI the car SI RAC 3 | he said "IT IS 123, 456, OK" => he said "KO ,456 ,123 SI TI" 4 | he said "IT IS (123, 456), OK" => he said "KO ,(456 ,123) SI TI" 5 | he said "IT IS 123,456, OK" => he said "KO ,123,456 SI TI" 6 | he said "IT IS (123,456), OK" => he said "KO ,(123,456) SI TI" 7 | HE SAID "it is 123, 456, ok" => "it is 123, 456, ok" DIAS EH 8 | shalom => <123H/>shalom<123H> 9 | SAALAM => MALAAS 10 | HE SAID "it is a car!" AND RAN => NAR DNA "!it is a car" DIAS EH 11 | HE SAID "it is a car!x" AND RAN => NAR DNA "it is a car!x" DIAS EH 12 | -2 CELSIUS IS COLD => DLOC SI SUISLEC -2 13 | SOLVE 1*5 1-5 1/5 1+5 => 1+5 1/5 1-5 5*1 EVLOS 14 | THE RANGE IS 2.5..5 => 5..2.5 SI EGNAR EHT 15 | IOU $10 => $10 UOI 16 | CHANGE -10% => -10% EGNAHC 17 | -10% CHANGE => EGNAHC -10% 18 | -------------------------------------------------------------------------------- /kmap/HebrewP.kmap: -------------------------------------------------------------------------------- 1 | // Hebrew.kmap for Yudit 2 | // 1998-06-17 Roman Czyborra@cs.tu-berlin.de 3 | 4 | // These are the Hebrew letters from ISO-8859-6 5 | // at hopefully not too surprising ASCII keys: 6 | 7 | "a=0x05D0", // א = HEBREW LETTER ALEF 8 | "b=0x05D1", // ב = HEBREW LETTER BET 9 | "g=0x05D2", // ג = HEBREW LETTER GIMEL 10 | "d=0x05D3", // ד = HEBREW LETTER DALET 11 | "h=0x05D4", // ה = HEBREW LETTER HE 12 | "v=0x05D5", // ו = HEBREW LETTER VAV 13 | "z=0x05D6", // ז = HEBREW LETTER ZAYIN 14 | "x=0x05D7", // ח = HEBREW LETTER HET 15 | "y=0x05D8", // ט = HEBREW LETTER TET 16 | "j=0x05D9", // י = HEBREW LETTER YOD 17 | "k;=0x05DA", // ך = HEBREW LETTER FINAL KAF 18 | "k=0x05DB", // כ = HEBREW LETTER KAF 19 | "l=0x05DC", // ל = HEBREW LETTER LAMED 20 | "m;=0x05DD", // ם = HEBREW LETTER FINAL MEM 21 | "m=0x05DE", // מ = HEBREW LETTER MEM 22 | "n;=0x05DF", // ן = HEBREW LETTER FINAL NUN 23 | "n=0x05E0", // נ = HEBREW LETTER NUN 24 | "s=0x05E1", // ס = HEBREW LETTER SAMEKH 25 | "e=0x05E2", // ע = HEBREW LETTER AYIN 26 | "p;=0x05E3", // ף = HEBREW LETTER FINAL PE 27 | "p=0x05E4", // פ = HEBREW LETTER PE 28 | "c;=0x05E5", // ץ = HEBREW LETTER FINAL TSADI 29 | "c=0x05E6", // צ = HEBREW LETTER TSADI 30 | "q=0x05E7", // ק = HEBREW LETTER QOF 31 | "r=0x05E8", // ר = HEBREW LETTER RESH 32 | "w=0x05E9", // ש = HEBREW LETTER SHIN 33 | "t=0x05EA", // ת = HEBREW LETTER TAV 34 | -------------------------------------------------------------------------------- /cfb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Frame buffer low level functions for QEmacs 3 | * 4 | * Copyright (c) 2001, 2002 Fabrice Bellard. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | typedef struct CFBContext { 22 | unsigned char *base; 23 | int bpp; /* number of bytes per pixel */ 24 | int depth; /* number of color bits per pixel */ 25 | int wrap; 26 | unsigned int (*get_color)(unsigned int); 27 | void (*draw_glyph)(QEditScreen *s1, 28 | int x1, int y1, int w, int h, QEColor color, 29 | unsigned char *glyph, int glyph_wrap); 30 | } CFBContext; 31 | 32 | int cfb_init(QEditScreen *s, 33 | void *base, int wrap, int depth, const char *font_path); 34 | -------------------------------------------------------------------------------- /kmap/Hangul2.kmap: -------------------------------------------------------------------------------- 1 | // 2 | // kmap for type 2 Hangul keyboard 3 | // 4 | "consonant0+vowel+consonant3", 5 | 6 | "begin consonant0", 7 | "r=0xAC00", 8 | "R=0xAE4C", 9 | "s=0xB098", 10 | "e=0xB2E4", 11 | "E=0xB530", 12 | "f=0xB77C", 13 | "a=0xB9C8", 14 | "q=0xBC14", 15 | "Q=0xBE60", 16 | "t=0xC0AC", 17 | "T=0xC2F8", 18 | "d=0xC544", 19 | "w=0xC790", 20 | "W=0xC9DC", 21 | "c=0xCC28", 22 | "z=0xCE74", 23 | "x=0xD0C0", 24 | "v=0xD30C", 25 | "g=0xD558", 26 | "end consonant0", 27 | 28 | "begin vowel", 29 | "k=0x0000", 30 | "o=0x001C", 31 | "i=0x0038", 32 | "O=0x0054", 33 | "j=0x0070", 34 | "p=0x008C", 35 | "u=0x00A8", 36 | "P=0x00C4", 37 | "h=0x00E0", 38 | "hk=0x00FC", 39 | "ho=0x0118", 40 | "hl=0x0134", 41 | "y=0x0150", 42 | "n=0x016C", 43 | "nj=0x0188", 44 | "np=0x01A4", 45 | "nl=0x01C0", 46 | "b=0x01DC", 47 | "m=0x01F8", 48 | "ml=0x0214", 49 | "l=0x0230", 50 | "end vowel", 51 | 52 | "begin consonant3", 53 | // "=0x0000", 54 | "r=0x0001", 55 | "R=0x0002", 56 | "rt=0x0003", 57 | "s=0x0004", 58 | "sw=0x0005", 59 | "sg=0x0006", 60 | "e=0x0007", 61 | "f=0x0008", 62 | "fr=0x0009", 63 | "fa=0x000A", 64 | "fq=0x000B", 65 | "ft=0x000C", 66 | "fv=0x000D", 67 | "fx=0x000E", 68 | "fg=0x000F", 69 | 70 | "a=0x0010", 71 | "q=0x0011", 72 | "qt=0x0012", 73 | "t=0x0013", 74 | "T=0x0014", 75 | "d=0x0015", 76 | "w=0x0016", 77 | "c=0x0017", 78 | "z=0x0018", 79 | "x=0x0019", 80 | "v=0x001A", 81 | "g=0x001B", 82 | "end consonant3" 83 | 84 | -------------------------------------------------------------------------------- /kmap/Esperanto.kmap: -------------------------------------------------------------------------------- 1 | // Esperanto.kmap input method for Yudit, Gaspar Sinai's Unicode 2 | // text editor for the X Window system, created with the help of 3 | // http://www.esperanto.net/veb/faq.txt and the output of 4 | // recode -lfull latin3 - inspired by Yves Bellefeuille 5 | 6 | // 1998-04-20 Roman Czyborra 7 | 8 | // 2001-11-13: Modified by Bertil Wennergren 9 | // to work with all-caps typing 10 | 11 | "Cx=0x0108", // Ĉ = latin capital letter c with circumflex 12 | "CX=0x0108", // Ĉ = latin capital letter c with circumflex 13 | "Gx=0x011C", // Ĝ = latin capital letter g with circumflex 14 | "GX=0x011C", // Ĝ = latin capital letter g with circumflex 15 | "Hx=0x0124", // Ĥ = latin capital letter h with circumflex 16 | "HX=0x0124", // Ĥ = latin capital letter h with circumflex 17 | "Jx=0x0134", // Ĵ = latin capital letter j with circumflex 18 | "JX=0x0134", // Ĵ = latin capital letter j with circumflex 19 | "Sx=0x015C", // Ŝ = latin capital letter s with circumflex 20 | "SX=0x015C", // Ŝ = latin capital letter s with circumflex 21 | "Ux=0x016C", // Ŭ = latin capital letter u with breve 22 | "UX=0x016C", // Ŭ = latin capital letter u with breve 23 | "cx=0x0109", // ĉ = latin small letter c with circumflex 24 | "gx=0x011D", // ĝ = latin small letter g with circumflex 25 | "hx=0x0125", // ĥ = latin small letter h with circumflex 26 | "jx=0x0135", // ĵ = latin small letter j with circumflex 27 | "sx=0x015D", // ŝ = latin small letter s with circumflex 28 | "ux=0x016D", // ŭ = latin small letter u with breve 29 | -------------------------------------------------------------------------------- /kmap/Russian.kmap: -------------------------------------------------------------------------------- 1 | // 2 | //---------------- Capital letters ---------------- 3 | // 4 | "A=0x0410", 5 | "B=0x0411", 6 | "V=0x0412", 7 | "G=0x0413", 8 | "D=0x0414", 9 | "E=0x0415", 10 | "Yo=0x0401", 11 | "YO=0x0401", 12 | "ZH=0x0416", 13 | "Zh=0x0416", 14 | "Z=0x0417", 15 | "ZS=0x0417", 16 | "Zs=0x0417", 17 | "I=0x0418", 18 | "Y=0x0419", 19 | "K=0x041A", 20 | "L=0x041B", 21 | "M=0x041C", 22 | "N=0x041D", 23 | "O=0x041E", 24 | "P=0x041F", 25 | "R=0x0420", 26 | "S=0x0421", 27 | "T=0x0422", 28 | "U=0x0423", 29 | "F=0x0424", 30 | "H=0x0425", 31 | "TS=0x0426", 32 | "Ts=0x0426", 33 | "CH=0x0427", 34 | "Ch=0x0427", 35 | "SH=0x0428", 36 | "Sh=0x0428", 37 | "SHCH=0x0429", 38 | "Shch=0x0429", 39 | "Q=0x042A", // HARD SIGN 40 | "U \033=0x042B", // YERU 41 | "X=0x042B", // YERU 42 | "C=0x042C", // SOFT SIGN 43 | "EE=0x042D", 44 | "Ee=0x042D", 45 | "W=0x042D", 46 | "YU=0x042E", 47 | "Yu=0x042E", 48 | "YA=0x042F", 49 | "Ya=0x042F", 50 | 51 | "a=0x0430", 52 | "b=0x0431", 53 | "v=0X0432", 54 | "g=0x0433", 55 | "d=0x0434", 56 | "e=0x0435", 57 | "yo=0x0451", 58 | "zh=0x0436", 59 | "z=0x0437", 60 | "zs=0x0437", 61 | "i=0x0438", 62 | "y=0x0439", 63 | "k=0x043A", 64 | "l=0x043B", 65 | "m=0x043C", 66 | "n=0x043D", 67 | "o=0x043E", 68 | "p=0x043F", 69 | "r=0x0440", 70 | "s=0x0441", 71 | "t=0x0442", 72 | "u=0x0443", 73 | "f=0x0444", 74 | "h=0x0445", 75 | "ts=0x0446", 76 | "ch=0x0447", 77 | "sh=0x0448", 78 | "shch=0x0449", 79 | "q=0x044A", // HARD SIGN 80 | "u \033=0x044B", // YERU 81 | "x=0x044B", // YERU 82 | "c=0x044C", // SOFT SIGN 83 | "ee=0x044D", 84 | "w=0x044D", 85 | "yu=0x044E", 86 | "ya=0x044F", 87 | -------------------------------------------------------------------------------- /tests/TestPage.txt: -------------------------------------------------------------------------------- 1 | This file uses the utf-8 encoding for unicode 2 | 3 | ************ Hungarian - Magyar **************** 4 | A tanyákon túl a puszta mélyén 5 | Áll magányos, dőlt kéményű csárda; 6 | Látogatják a szomjas betyárok, 7 | Kecskemétre menvén a vásárra. 8 | ************ Russian - Русский ************ 9 | Следователь. Вы догадываетесь, почему вас вызвали? 10 | Свидетель. Да, но лучше будет, если вы скажете. 11 | Следователь. Почему лучше? 12 | Свидетель. В противном случае получается, что вам стыдно сказать. 13 | (Из рассказов о допросе.) 14 | ************ Greek - ΕΛΛΗΝΙΚΑ **************** 15 | Στο στήθος μου η πληγή ανοίγει πάλι 16 | όταν χαμηλώνουν τ' άστρα και συγγενεύουν με το κορμί μου 17 | όταν πέφτει σιγή κάτω από τα πέλματα των ανθρώπων. 18 | Αυτές οι πέτρες που βουλιάζουν μέσα στα χρόνια ως πού θα με παρασύρουν; 19 | Τη θάλασσα τη θάλασσα, ποιός θα μπορέσει να την εξαντλήσει; 20 | **************** Japanese 日本語 **************** 21 | 人妻ゆゑに 我恋ひめやも 紫のにほへる妹を憎くあらば 22 | 大海人皇子 巻一|二十一 23 | 野守は見ずや 君が袖振る あかねさす 紫野行き 標野行き 24 | 額田王 巻一|二十 25 | **************** Chinese 中文 **************** 26 | 古原草     白居易 27 | 离离原上草,一岁一枯荣。 28 | 野火烧不尽,春风吹又生。 29 | 远芳侵古道,晴翠接荒城。 30 | 又送王孙去,萋萋满别情。 31 | ***************** Korean 한국어 ************************ 32 | 별 : 김남주 33 | 밤 들어 세상은/온통 고요한데/그리워 못 잊어 홀로 잠 못 이뤄 34 | 불 밝혀 지새우는 것이 있다./사람들은 그것을 별이라 그런다. 35 | 기약이라 소망이라 그런다./밤 깊어/가장 괴로울 때면 36 | 사람들은 저마다 별이 되어/어머니 어머니라 부른다. 37 | ************ French - Français **************** 38 | Juste un petit exemple pour dire que les français aussi 39 | ont à cœur de pouvoir utiliser tous leurs caractères ! :) 40 | -------------------------------------------------------------------------------- /kmap/Hangul3.kmap: -------------------------------------------------------------------------------- 1 | // 2 | // Hangul kmap for type 3 keyboards. 3 | // 4 | "b+m+e", 5 | "begin b", 6 | "k=0xAC00", 7 | "kk=0xAE4C", 8 | "h=0xB098", 9 | "u=0xB2E4", 10 | "uu=0xB530", 11 | "y=0xB77C", 12 | "i=0xB9C8", 13 | ";=0xBC14", 14 | ";;=0xBE60", 15 | "n=0xC0AC", 16 | "nn=0xC2F8", 17 | "j=0xC544", 18 | "l=0xC790", 19 | "ll=0xC9DC", 20 | "o=0xCC28", 21 | "0x30=0xCE74", 22 | "'=0xD0C0", 23 | "p=0xD30C", 24 | "m=0xD558", 25 | "end b", 26 | 27 | "begin m", 28 | "f=0x0000", 29 | "r=0x001C", 30 | "0x36=0x0038", 31 | "G=0x0054", 32 | "t=0x0070", 33 | "c=0x008C", 34 | "e=0x00A8", 35 | "0x37=0x00C4", 36 | "/=0x00E0", 37 | "v=0x00E0", 38 | "/f=0x00FC", 39 | "vf=0x00FC", 40 | "/r=0x0118", 41 | "vr=0x0118", 42 | "/d=0x0134", 43 | "vd=0x0134", 44 | "0x34=0x0150", 45 | "b=0x016C", 46 | "0x39=0x016C", 47 | "bt=0x0188", 48 | "0x39 t=0x0188", 49 | "bc=0x01A4", 50 | "0x39 c=0x01A4", 51 | "bd=0x01C0", 52 | "0x39 d=0x01C0", 53 | "0x35=0x01DC", 54 | "g=0x01F8", 55 | "0x38=0x0214", 56 | "d=0x0230", 57 | "end m", 58 | 59 | "begin e", 60 | // this should be made legal, sweat here 61 | // "=0x0000", 62 | "x=0x0001", 63 | "!=0x0002", 64 | "V=0x0003", 65 | "s=0x0004", 66 | "E=0x0005", 67 | "S=0x0006", 68 | "A=0x0007", 69 | "w=0x0008", 70 | "@=0x0009", 71 | "F=0x000A", 72 | "D=0x000B", 73 | "T=0x000C", 74 | "%=0x000D", 75 | "$=0x000E", 76 | "R=0x000F", 77 | 78 | "z=0x0010", 79 | "0x33=0x0011", 80 | "X=0x0012", 81 | "q=0x0013", 82 | "0x32=0x0014", 83 | "a=0x0015", 84 | "#=0x0016", 85 | "Z=0x0017", 86 | "C=0x0018", 87 | "W=0x0019", 88 | "Q=0x001A", 89 | "0x31=0x001B", 90 | "end e" 91 | -------------------------------------------------------------------------------- /tests/testbidi.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 |

bidi test

16 | 17 |

standard test

18 | 19 |

car is THE CAR in arabic

20 |

CAR IS the car IN ENGLISH

21 |

he said "IT IS 123, 456, OK"

22 |

he said "IT IS (123, 456), OK"

23 |

he said "IT IS 123,456, OK"

24 |

he said "IT IS (123,456), OK"

25 |

HE SAID "it is 123, 456, ok"

26 |

<H123>shalom</H123>

27 |

<h123>SAALAM</h123>

28 |

HE SAID "it is a car!" AND RAN

29 |

HE SAID "it is a car!x" AND RAN

30 |

-2 CELSIUS IS COLD

31 |

SOLVE 1*5 1-5 1/5 1+5

32 |

THE RANGE IS 2.5..5

33 |

IOU $10

34 |

CHANGE -10%

35 |

-10% CHANGE

36 | 37 |

image test

38 | 39 |

car is TimgHE CAR in arabic

40 | 41 |

override test

42 | 43 |

car is TimgHE CAR in 44 | arabic tralala

46 | 47 |

css2 spec example

48 | 49 | 50 | HEBREW1 HEBREW2 english3 HEBREW4 HEBREW5 51 | HEBREW6 HEBREW7 HEBREW8 52 | 53 | 54 | english9 english10 english11 HEBREW12 HEBREW13 55 | english14 english15 english16 56 | english17 HEBREW18 english19 HEBREW20 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /docbook.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WYSIWYG Docbook mode for QEmacs. 3 | * 4 | * Copyright (c) 2002 Fabrice Bellard. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "qe.h" 22 | #include "css.h" 23 | 24 | static int docbook_mode_probe(ModeDef *mode, ModeProbeData *p1) 25 | { 26 | if (xml_mode.mode_probe(&xml_mode, p1) == 0) 27 | return 0; 28 | 29 | /* well, very crude, but it may work OK */ 30 | if (strstr(cs8(p1->buf), "DocBook")) 31 | return 85; 32 | return 0; 33 | } 34 | 35 | static int docbook_mode_init(EditState *s, ModeSavedData *saved_data) 36 | { 37 | return gxml_mode_init(s, saved_data, XML_IGNORE_CASE | XML_DOCBOOK, 38 | docbook_style); 39 | } 40 | 41 | static ModeDef docbook_mode; 42 | 43 | static int docbook_init(void) 44 | { 45 | /* inherit from html mode */ 46 | memcpy(&docbook_mode, &html_mode, sizeof(ModeDef)); 47 | docbook_mode.name = "docbook"; 48 | docbook_mode.extensions = NULL; 49 | docbook_mode.mode_probe = docbook_mode_probe; 50 | docbook_mode.mode_init = docbook_mode_init; 51 | 52 | qe_register_mode(&docbook_mode); 53 | return 0; 54 | } 55 | 56 | qe_module_init(docbook_init); 57 | -------------------------------------------------------------------------------- /haiku-pe2qe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pesettings=`finddir B_USER_SETTINGS_DIRECTORY`/pe/settings 4 | 5 | fgmap=( 6 | "alt comment:" 7 | "alt error:" 8 | "alt keyword:" 9 | "alt number:" 10 | "alt operator:" 11 | "alt separator:" 12 | "altprocessor:" 13 | "attribute:" 14 | "char constant:html-entity" 15 | "comment:comment html-comment" 16 | "error:" 17 | "highlight:highlight" 18 | "invisibles:" 19 | "keyword:keyword preprocess" 20 | "low:window-border" 21 | "mark:status" 22 | "number:number" 23 | "operator:function" 24 | "preprocessor:" 25 | "selection:selection" 26 | "separator:" 27 | "string:string string-q html-string" 28 | "system identifier:type" 29 | "tag:tag" 30 | "tagstring:html-tag" 31 | "text:default mode-line minibuf" 32 | "user identifier:variable" 33 | ) 34 | 35 | bgmap=( 36 | "low:default" 37 | "selection:mode-line window-border region-hilite" 38 | ) 39 | 40 | map_pe_fg () { 41 | for item in "${fgmap[@]}"; do 42 | if [ "$1" = "${item%:*}" ]; then 43 | echo "${item#*:}" 44 | return 45 | fi 46 | done 47 | } 48 | 49 | map_pe_bg () { 50 | for item in "${bgmap[@]}"; do 51 | if [ "$1" = "${item%:*}" ]; then 52 | echo "${item#*:}" 53 | return 54 | fi 55 | done 56 | } 57 | 58 | out_style () { 59 | echo "set_style(\"$1\", \"$2\", \"$3\")" 60 | } 61 | 62 | echo "// map Pe settings to QEmacs" 63 | echo "// generated by $(basename "$0") on `date`" 64 | 65 | while read line; do 66 | token="${line%=*}" 67 | value="${line#*=}" 68 | case "$token" in 69 | *color) 70 | name="${token% color}" 71 | qenames="$(map_pe_fg "$name")" 72 | for qename in ${qenames}; do 73 | #echo "color: $name -> $qename" >&2 74 | out_style "$qename" "color" "$value" 75 | done 76 | qenames="$(map_pe_bg "$name")" 77 | for qename in ${qenames}; do 78 | #echo "bgcolor: $name -> $qename" >&2 79 | out_style "$qename" "background-color" "$value" 80 | done 81 | ;; 82 | *) 83 | ;; 84 | esac 85 | done < "$pesettings" 86 | -------------------------------------------------------------------------------- /kmap/Spanish.kmap: -------------------------------------------------------------------------------- 1 | // Accents for ISO-8859-1 Spanish 2 | // Spanish kmap v1.2 2000/05/15 17:53:17 3 | // Written by Grzegorz Adam Hankiewicz and 4 | // Juan Rafael Fernández García 5 | // Shamelessly based on Czyborra's work (all © Roman Czyborra@cs.tu-berlin.de) 6 | // with minor contributions 7 | "A' = 0xc1", // Á = LATIN CAPITAL LETTER A WITH ACUTE 8 | "E' = 0xc9", // É = LATIN CAPITAL LETTER E WITH ACUTE 9 | "I' = 0xcd", // Í = LATIN CAPITAL LETTER I WITH ACUTE 10 | "O' = 0xd3", // Ó = LATIN CAPITAL LETTER O WITH ACUTE 11 | "U' = 0xda", // Ú = LATIN CAPITAL LETTER U WITH ACUTE 12 | "a' = 0xe1", // á = LATIN SMALL LETTER A WITH ACUTE 13 | "e' = 0xe9", // é = LATIN SMALL LETTER E WITH ACUTE 14 | "i' = 0xed", // í = LATIN SMALL LETTER I WITH ACUTE 15 | "o' = 0xf3", // ó = LATIN SMALL LETTER O WITH ACUTE 16 | "u' = 0xfa", // ú = LATIN SMALL LETTER U WITH ACUTE 17 | "U: = 0xdc", // Ü = LATIN CAPITAL LETTER U WITH DIAERESIS 18 | "u: = 0xfc", // ü = LATIN SMALL LETTER U WITH DIAERESIS 19 | "N~=0x00D1", // Ñ = LATIN CAPITAL LETTER N WITH TILDE 20 | "n~=0x00F1", // ñ = LATIN SMALL LETTER N WITH TILDE 21 | "c;=0x00E7", // ç = LATIN SMALL LETTER C WITH CEDILLA 22 | "C;=0x00C7", // Ç = LATIN CAPITAL LETTER C WITH CEDILLA 23 | 24 | "<<=0x00AB", // « = LEFT-POINTING DOUBLE ANGLE QUOTATION MARK = 25 | ">>=0x00BB", // » = RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK = 26 | ",,=0x201E", // „ = DOUBLE LOW-9 QUOTATION MARK = 27 | "``=0x201C", // “ = LEFT DOUBLE QUOTATION MARK = 28 | "C)=0x00A9", // © = COPYRIGHT SIGN 29 | "E-=0x20AC", // € = EURO SIGN 30 | "Ct=0x00A2", // ¢ = CENT SIGN 31 | "L-=0x00A3", // £ = POUND SIGN 32 | "Y-=0x00A5", // = YEN SIGN 33 | 34 | "-: = 0xf7", // ÷ = DIVISION SIGN 35 | "S$=0x00A7", // § = SECTION SIGN 36 | 37 | ".!=0x00A1", // ¡ = INVERTED EXCLAMATION MARK 38 | ".?=0x00BF", // ¿ = INVERTED QUESTION MARK 39 | "a_=0x00AA", // ª = FEMININE ORDINAL INDICATOR 40 | "o_=0x00BA", // º = MASCULINE ORDINAL INDICATOR 41 | -------------------------------------------------------------------------------- /qt.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMACS_QT_H 2 | #define QEMACS_QT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | class QEQtContext; 13 | 14 | class QEQtView : public QWidget 15 | { 16 | Q_OBJECT 17 | public: 18 | QEQtView(QEQtContext *ctx, QWidget *parent = 0); 19 | ~QEQtView(); 20 | protected: 21 | virtual void keyPressEvent(QKeyEvent *); 22 | virtual void paintEvent(QPaintEvent *); 23 | virtual void closeEvent (QCloseEvent *); 24 | virtual void resizeEvent(QResizeEvent *); 25 | virtual void mousePressEvent(QMouseEvent *); 26 | virtual void mouseReleaseEvent(QMouseEvent *); 27 | virtual void mouseMoveEvent(QMouseEvent *); 28 | virtual void wheelEvent(QWheelEvent *); 29 | 30 | void mouseEvent(QMouseEvent *); 31 | 32 | public slots: 33 | void slotDrawText(const QFont &, int, int, const QString &, const QColor &, bool); 34 | void slotFillRectangle(int, int, int, int, const QColor &, bool); 35 | void slotResizeDoubleBuffer(const QSize &); 36 | void slotFlush(); 37 | void slotSetClip(int, int, int, int); 38 | void slotSetCursor(int, int, int, int); 39 | private: 40 | QEQtContext *_ctx; 41 | // when we draw in the double buffer, we increase this 42 | int _repaints; 43 | QRect _clip; 44 | QRect _cursor; 45 | }; 46 | 47 | class QEQtApplication : public QApplication 48 | { 49 | Q_OBJECT 50 | public: 51 | QEQtApplication(); 52 | private: 53 | 54 | }; 55 | 56 | // opaque pointer where Qt keeps its application and 57 | // views 58 | class QEQtContext 59 | { 60 | public: 61 | QEQtContext(); 62 | 63 | QEQtApplication *app; 64 | QEQtView *view; 65 | 66 | QFont font; 67 | QMainWindow *window; 68 | // qemacs hooks end painting here 69 | // and we replay on paintEvent 70 | QImage image; 71 | 72 | int events_rd; 73 | int events_wr; 74 | 75 | void flush(); 76 | }; 77 | #endif 78 | 79 | -------------------------------------------------------------------------------- /kmap/Israeli.kmap: -------------------------------------------------------------------------------- 1 | // Hebrew.kmap for Yudit 2 | // 1998-06-17 Roman Czyborra@cs.tu-berlin.de 3 | 4 | // Changed from the il_phonetic map to the standard israeli map by 5 | // Tzafrir Cohen 6 | 7 | "t=0x05D0", // א = HEBREW LETTER ALEF 8 | "c=0x05D1", // ב = HEBREW LETTER BET 9 | "d=0x05D2", // ג = HEBREW LETTER GIMEL 10 | "s=0x05D3", // ד = HEBREW LETTER DALET 11 | "v=0x05D4", // ה = HEBREW LETTER HE 12 | "u=0x05D5", // ו = HEBREW LETTER VAV 13 | "z=0x05D6", // ז = HEBREW LETTER ZAYIN 14 | "j=0x05D7", // ח = HEBREW LETTER HET 15 | "y=0x05D8", // ט = HEBREW LETTER TET 16 | "h=0x05D9", // י = HEBREW LETTER YOD 17 | "l=0x05DA", // ך = HEBREW LETTER FINAL KAF 18 | "f=0x05DB", // כ = HEBREW LETTER KAF 19 | "k=0x05DC", // ל = HEBREW LETTER LAMED 20 | "o=0x05DD", // ם = HEBREW LETTER FINAL MEM 21 | "n=0x05DE", // מ = HEBREW LETTER MEM 22 | "i=0x05DF", // ן = HEBREW LETTER FINAL NUN 23 | "b=0x05E0", // נ = HEBREW LETTER NUN 24 | "x=0x05E1", // ס = HEBREW LETTER SAMEKH 25 | "g=0x05E2", // ע = HEBREW LETTER AYIN 26 | ";=0x05E3", // ף = HEBREW LETTER FINAL PE 27 | "p=0x05E4", // פ = HEBREW LETTER PE 28 | ".=0x05E5", // ץ = HEBREW LETTER FINAL TSADI 29 | "m=0x05E6", // צ = HEBREW LETTER TSADI 30 | "e=0x05E7", // ק = HEBREW LETTER QOF 31 | "r=0x05E8", // ר = HEBREW LETTER RESH 32 | "a=0x05E9", // ש = HEBREW LETTER SHIN 33 | ",=0x05EA", // ת = HEBREW LETTER TAV 34 | 35 | // Some other mappings that change, besides the letters themselves: 36 | "q=0x002F", // slash (/) 37 | "w=0x0027", // apostrophy (') 38 | "`=0x003B", // smicolon (;) 39 | "'=0x002C", // comma (,) 40 | "/=0x002E", // dot (.) 41 | 42 | // There is said to be support for bidirectionality. If so: swapping 43 | // between left and right parathensis might prove useful. Just in case 44 | // Those should not mean "left-{brace|bracket|etc.}" and "right-" 45 | // but "open-" and "close-" 46 | // it does, I add the mapping remmed-out: 47 | //"[=0x005D", // "]" 48 | //"]=0x005B", // "[" 49 | //"{=0x007D", // "}" 50 | //"}=0x007B", // "{" 51 | //"(=0x0029", // ")" 52 | //")=0x0028", // "(" 53 | -------------------------------------------------------------------------------- /kmap/Unicode2.kmap: -------------------------------------------------------------------------------- 1 | // 2 | // Unicode input map for yudit 3 | // 4 | "unicode+digit1+digit2+digit3+digit4", 5 | 6 | "begin unicode", 7 | "U = 0x0", 8 | "u = 0x0", 9 | "end unicode", 10 | 11 | "begin digit1", 12 | "0x30=0x0000", 13 | "0x31=0x1000", 14 | "0x32=0x2000", 15 | "0x33=0x3000", 16 | "0x34=0x4000", 17 | "0x35=0x5000", 18 | "0x36=0x6000", 19 | "0x37=0x7000", 20 | "0x38=0x8000", 21 | "0x39=0x9000", 22 | "a=0xA000", 23 | "b=0xB000", 24 | "c=0xC000", 25 | "d=0xD000", 26 | "e=0xE000", 27 | "f=0xF000", 28 | "A=0xA000", 29 | "B=0xB000", 30 | "C=0xC000", 31 | "D=0xD000", 32 | "E=0xE000", 33 | "F=0xF000", 34 | "end digit1", 35 | 36 | "begin digit2", 37 | "0x30=0x0000", 38 | "0x31=0x0100", 39 | "0x32=0x0200", 40 | "0x33=0x0300", 41 | "0x34=0x0400", 42 | "0x35=0x0500", 43 | "0x36=0x0600", 44 | "0x37=0x0700", 45 | "0x38=0x0800", 46 | "0x39=0x0900", 47 | "a=0x0A00", 48 | "b=0x0B00", 49 | "c=0x0C00", 50 | "d=0x0D00", 51 | "e=0x0E00", 52 | "f=0x0F00", 53 | "A=0x0A00", 54 | "B=0x0B00", 55 | "C=0x0C00", 56 | "D=0x0D00", 57 | "E=0x0E00", 58 | "F=0x0F00", 59 | "end digit2", 60 | 61 | "begin digit3", 62 | "0x30=0x0000", 63 | "0x31=0x0010", 64 | "0x32=0x0020", 65 | "0x33=0x0030", 66 | "0x34=0x0040", 67 | "0x35=0x0050", 68 | "0x36=0x0060", 69 | "0x37=0x0070", 70 | "0x38=0x0080", 71 | "0x39=0x0090", 72 | "a=0x00A0", 73 | "b=0x00B0", 74 | "c=0x00C0", 75 | "d=0x00D0", 76 | "e=0x00E0", 77 | "f=0x00F0", 78 | "A=0x00A0", 79 | "B=0x00B0", 80 | "C=0x00C0", 81 | "D=0x00D0", 82 | "E=0x00E0", 83 | "F=0x00F0", 84 | "end digit3", 85 | 86 | "begin digit4", 87 | "0x30=0x0000", 88 | "0x31=0x0001", 89 | "0x32=0x0002", 90 | "0x33=0x0003", 91 | "0x34=0x0004", 92 | "0x35=0x0005", 93 | "0x36=0x0006", 94 | "0x37=0x0007", 95 | "0x38=0x0008", 96 | "0x39=0x0009", 97 | "a=0x000A", 98 | "b=0x000B", 99 | "c=0x000C", 100 | "d=0x000D", 101 | "e=0x000E", 102 | "f=0x000F", 103 | "A=0x000A", 104 | "B=0x000B", 105 | "C=0x000C", 106 | "D=0x000D", 107 | "E=0x000E", 108 | "F=0x000F", 109 | "end digit4" 110 | -------------------------------------------------------------------------------- /qe.1: -------------------------------------------------------------------------------- 1 | .\" Hey, EMACS: -*- nroff -*- 2 | .TH QE 1 "October 21, 2001" 3 | .\" Please adjust this date whenever revising the manpage. 4 | .SH NAME 5 | QEmacs \- tiny full-screen editor 6 | .SH SYNOPSIS 7 | .B qe 8 | .RB [options] 9 | .RI file... 10 | .SH DESCRIPTION 11 | .B qemacs 12 | is a tiny editor targetted at embedded systems or 13 | debugging. Although it is very small, it has some very interesting 14 | features that even big editors lack : 15 | 16 | - Full screen editor with an Emacs look and feel with all Emacs common 17 | features: multi-buffer, multi-window, command mode, universal 18 | argument, keyboard macros, config file with C like syntax, minibuffer 19 | with completion and history. 20 | 21 | - Can edit files of hundreds of Megabytes without being slow by using 22 | a highly optimized internal representation and by mmaping the file. 23 | 24 | - Full UTF8 support, including bidirectional editing respecting the 25 | Unicode bidi algorithm. Arabic and Indic scripts handling (in 26 | progress). 27 | 28 | - C mode: coloring with immediate update. Emacs like auto-indent. 29 | 30 | - Shell mode: colorized VT100 emulation so that your shell work 31 | exactly as you expect. Compile mode with next/prev error. 32 | 33 | - Input methods for most languages, including Chinese (input methods 34 | come from the Yudit editor). 35 | 36 | - Hexadecimal editing mode with insertion and block commands. Unicode 37 | hexa editing of UTF8 files also supported. 38 | 39 | - Works on any VT100 terminals without termcap. UTF8 VT100 support 40 | included with double width glyphs. 41 | 42 | - X11 support. Support multiple proportionnal fonts at the same time 43 | (as XEmacs). X Input methods supported. Xft extension supported for 44 | anti aliased font display. 45 | .PP 46 | For more information and a list of key bindings please see 47 | /usr/share/doc/qemacs/README.gz. 48 | .SH AUTHOR 49 | This manual page was written by Edmund GRIMLEY EVANS , 50 | for the Debian GNU/Linux system (but may be used by others). 51 | -------------------------------------------------------------------------------- /kmap/README: -------------------------------------------------------------------------------- 1 | Keymap files copied from Yudit. 2 | 3 | From yudit 1.5, (sources at http://czyborra.com/yudit): 4 | 5 | 2776 Nov 30 1999 Arabic.kmap 6 | 1657 Nov 30 1999 ArmenianEast.kmap 7 | 1657 Nov 30 1999 ArmenianWest.kmap 8 | 293475 Nov 30 1999 Chinese-CJ.kmap 9 | 6416 Nov 30 1999 Cyrillic.kmap 10 | 1883 Nov 30 1999 Czech.kmap 11 | 3808 Apr 17 1998 Danish.kmap 12 | 1781 Nov 30 1999 DE-RU.kmap 13 | 3808 Nov 30 1999 Dutch.kmap 14 | 1001 Nov 30 1999 Esperanto.kmap 15 | 18688 Nov 30 1999 Ethiopic.kmap 16 | 2151 Nov 30 1999 French.kmap 17 | 981 Nov 30 1999 Georgian.kmap 18 | 2241 Nov 30 1999 German.kmap 19 | 3363 Nov 30 1999 Greek.kmap 20 | 9054 Nov 30 1999 GreekMono.kmap 21 | 2225 Nov 30 1999 Guarani.kmap 22 | 1952 Nov 30 1999 Hangul.kmap 23 | 1086 Nov 30 1999 Hangul2.kmap 24 | 1205 Nov 30 1999 Hangul3.kmap 25 | 1244 Nov 30 1999 Hebrew.kmap 26 | 359 Nov 30 1999 Hungarian.kmap 27 | 4337 Nov 30 1999 KOI8_R.kmap 28 | 16247 Nov 30 1999 Kana.kmap 29 | 317 Nov 30 1999 Lithuanian.kmap 30 | 27210 Nov 30 1999 Mnemonic.kmap 31 | 1156 Nov 30 1999 Polish.kmap 32 | 1173 Nov 30 1999 Russian.kmap 33 | 12485 Nov 30 1999 SGML.kmap 34 | 14470 Nov 30 1999 TeX.kmap 35 | 12349 Nov 30 1999 Troff.kmap 36 | 1430 Nov 30 1999 Unicode2.kmap 37 | 8027 Nov 30 1999 VNtelex.kmap 38 | 8842 Nov 30 1999 Vietnamese.kmap 39 | 5120 Nov 30 1999 XKB_iso8859-4.kmap 40 | 41 | unused kmaps: 42 | 1952 Nov 30 1999 Hangul.kmap 43 | 1086 Nov 30 1999 Hangul2.kmap 44 | 1205 Nov 30 1999 Hangul3.kmap 45 | 1430 Nov 30 1999 Unicode2.kmap 46 | 47 | From yudit-1.6: 48 | renamed Danish.kmap -> DanishAlternate.kmap 49 | 50 | imported: 51 | 4266 Jan 9 2001 Danish.kmap 52 | 24877 Jan 9 2001 GreekBible.kmap 53 | 23370 Jan 9 2001 Polytonic.kmap 54 | 1862 May 16 2000 Spanish.kmap 55 | 3915 Jan 9 2001 Thai.kmap 56 | 7774 Jan 9 2001 VietnameseTelex.kmap 57 | 4339 Jan 9 2001 Welsh.kmap 58 | 59 | version 2.8.1 of yudit uses a compiled format. 60 | kmap files have moved to yudit-2.8.1/mytool/kmap 61 | 62 | imported fixes and more keymaps 63 | -------------------------------------------------------------------------------- /kmap/DE-RU.kmap: -------------------------------------------------------------------------------- 1 | //Meine persoenliche Deutsch-Russisch Keymap. 2 | //Lesen Sie bitte LIESMICH.DE-RU. Alles GPL Software. 3 | //Thomas Wohlfarth 4 | 5 | // 6 | //---------------- Grosse Buchstaben ---------------- 7 | // 8 | "A=0x0410", 9 | "B=0x0411", 10 | "W=0x0412", 11 | "V=0x0412", 12 | "G=0x0413", 13 | "D=0x0414", 14 | "E=0x0415", // je 15 | "Je=0x0415", 16 | "JE=0x0415", 17 | "E\"=0x0401", // jo 18 | "Jo=0x0401", 19 | "JO=0x0401", 20 | "JH=0x0416", //Weiches sch wie in "Journal" 21 | "Jh=0x0416", 22 | "S=0x0417", //stimmhaftes s wie in "See" 23 | "I=0x0418", 24 | "I'=0x0419", // kurzes i - i'kratkoje 25 | "K=0x041A", 26 | "L=0x041B", 27 | "M=0x041C", 28 | "N=0x041D", 29 | "O=0x041E", 30 | "P=0x041F", 31 | "R=0x0420", 32 | "C=0x0421", // scharfes s wie in "dass" 33 | "T=0x0422", 34 | "U=0x0423", 35 | "F=0x0424", 36 | "X=0x0425", // ch wie in "Bach" 37 | "Ch=0x0425", 38 | "CH=0x0425", 39 | "Z=0x0426", 40 | "Tsch=0x0427", 41 | "Sch=0x0428", 42 | "SCH=0x0428", 43 | "Schtsch=0x0429", 44 | "SCHTSCH=0x0429", 45 | "HZ=0x042A", // Haertezeichen 46 | "Y=0x042B", 47 | "WZ=0x042C", // Weichheitszeichen 48 | "0xC4=0x042D", // kurzes e (ae) 49 | "JU=0x042E", // ju 50 | "Ju=0x042E", 51 | "JA=0x042F", // ja 52 | "Ja=0x042F", 53 | 54 | // 55 | // --------------------Kleine Buchstaben------- 56 | // 57 | "a=0x0430", 58 | "b=0x0431", 59 | "w=0X0432", 60 | "v=0X0432", 61 | "g=0x0433", 62 | "d=0x0434", 63 | "e=0x0435", // je 64 | "je=0x0435", 65 | "e\"=0x0451", 66 | "jo=0x0451", 67 | "jh=0x0436", // weiches sch wie in "Journal" 68 | "s=0x0437", // stimmhaftes s wie in "See" 69 | "i=0x0438", 70 | "i'=0x0439", 71 | "k=0x043A", 72 | "l=0x043B", 73 | "m=0x043C", 74 | "n=0x043D", 75 | "o=0x043E", 76 | "p=0x043F", 77 | "r=0x0440", 78 | "c=0x0441", // scharfes s wie in "dass" 79 | "t=0x0442", 80 | "u=0x0443", 81 | "f=0x0444", 82 | "x=0x0445", // ch wie in "Bach" 83 | "ch=0x0445", 84 | "z=0x0446", 85 | "tsch=0x0447", 86 | "sch=0x0448", 87 | "schtsch=0x0449", 88 | "hz=0x044A", // Haertezeichen 89 | "y=0x044B", 90 | "wz=0x044C", // Weichheitszeichen 91 | "0xE4=0x044D", // kurzes e (ae) 92 | "ju=0x044E", 93 | "ja=0x044F", 94 | -------------------------------------------------------------------------------- /qemacs.spec: -------------------------------------------------------------------------------- 1 | %define name qemacs 2 | %define version 0.3pre3 3 | %define release 1 4 | 5 | Summary: qemacs (qe) - a small editor with some special features 6 | Name: %{name} 7 | Version: %{version} 8 | Release: %{release} 9 | Source0: http://fabrice.bellard.free.fr/qemacs/%{name}-%{version}.tar.gz 10 | #Patch0: qemacs-0.2-makefile.patch 11 | Copyright: LGPL 12 | Group: Editors 13 | BuildRoot: %{_tmppath}/%{name}-buildroot 14 | Prefix: %{_prefix} 15 | URL: http://fabrice.bellard.free.fr/qemacs/ 16 | 17 | # for the character maps: 18 | #BuildRequires: yudit 19 | Provides: qe 20 | 21 | %description 22 | QEmacs is an terminal-based text editor (with Emacs look&feel) with a small 23 | size and some unique features: 24 | 25 | * Full screen editor with an Emacs compatible key subset (including undo and 26 | incremental search) and emacs look and feel. 27 | * Can edit huge files (e.g. 100MBytes) without being slow by using a highly 28 | optimized internal representation and by mmaping the file. 29 | * Full UTF8 support, including double width chars such as ideograms, provided 30 | you have an UTF8 VT100 emulator such as a recent xterm. 31 | * Bidirectional editing conforming to the Unicode Bidir algorithm (for Hebrew or 32 | Arabic). 33 | * Can optionally contain input methods from the Yudit editor for most 34 | languages, including Chinese CJ, Hebrew and Arabic. 35 | * Hexadecimal editing mode with insertion and block commands. Can edit binary 36 | files as well as text files. 37 | 38 | %prep 39 | %setup -n %{name} 40 | %patch0 -p0 -b .tzafrir 41 | 42 | %build 43 | #./configure --prefix=%{prefix} 44 | make PREFIX=%{prefix} CFLAGS="$RPM_OPT_FLAGS" 45 | 46 | %install 47 | install -d $RPM_BUILD_ROOT%{prefix}/bin 48 | make prefix=$RPM_BUILD_ROOT%{prefix} install 49 | 50 | %clean 51 | rm -rf $RPM_BUILD_ROOT 52 | 53 | %files 54 | %defattr(-,root,root) 55 | %doc CHANGES COPYING README TODO 56 | %{_prefix}/bin/qe 57 | %{_prefix}/share/qe/kmaps 58 | %{_prefix}/share/qe/ligatures 59 | %{_prefix}/man/man1/qe.1 60 | 61 | %changelog 62 | * Wed May 30 2001 Tzafrir Cohen 0.2-1 63 | - initial spec file. Added patch that also includes all of yudit's maps 64 | 65 | # end of file 66 | -------------------------------------------------------------------------------- /kmap/ArmenianEast.kmap: -------------------------------------------------------------------------------- 1 | // 2 | // Eastern Armenian Phonetic keyboard (Rafi Papazian) 3 | // 4 | // Mark Leisher 5 | // 1998-11-21 6 | // 7 | "!=0x0031", // 8 | "#=0x0545", // 9 | "$=0x0033", // 10 | "%=0x0034", // 11 | "&=0x0587", // 12 | "'=0x0583", // 13 | "(=0x0029", // 14 | ")=0x0555", // 15 | "*=0x0028", // 16 | ",=0x0577", // 17 | "-=0x057C", // 18 | ".=0x0572", // 19 | "/=0x056E", // 20 | "0x30=0x0585", // 21 | "0x31=0x003A", // 22 | "0x32=0x0571", // 23 | "0x33=0x0575", // 24 | "0x34=0x055B", // 25 | "0x35=0x002C", // 26 | "0x36=0x002D", // 27 | "0x37=0x002E", // 28 | "0x38=0x00AB", // 29 | "0x39=0x00BB", // 30 | ":=0x0539", // 31 | ";=0x0569", // 32 | "<=0x0547", // 33 | "0x3D=0x056A", // 34 | ">=0x0542", // 35 | "?=0x053E", // 36 | "@=0x0541", // 37 | "A=0x0531", // 38 | "B=0x0532", // 39 | "C=0x0533", // 40 | "D=0x0534", // 41 | "E=0x0537", // 42 | "F=0x0556", // 43 | "G=0x0554", // 44 | "H=0x0540", // 45 | "I=0x053B", // 46 | "J=0x0543", // 47 | "K=0x053F", // 48 | "L=0x053C", // 49 | "M=0x0544", // 50 | "N=0x0546", // 51 | "O=0x0548", // 52 | "P=0x054A", // 53 | "Q=0x053D", // 54 | "R=0x0550", // 55 | "S=0x054D", // 56 | "T=0x054F", // 57 | "U=0x0538", // 58 | "V=0x054E", // 59 | "W=0x0552", // 60 | "X=0x0551", // 61 | "Y=0x0535", // 62 | "Z=0x0536", // 63 | "[=0x0579", // 64 | "\"=0x0553", // 65 | "\+=0x053A", // 66 | "\\=0x0027", // 67 | "]=0x057B", // 68 | "^=0x0039", // 69 | "_=0x054C", // 70 | "`=0x055D", // 71 | "a=0x0561", // 72 | "b=0x0562", // 73 | "c=0x0563", // 74 | "d=0x0564", // 75 | "e=0x0567", // 76 | "f=0x0586", // 77 | "g=0x0584", // 78 | "h=0x0570", // 79 | "i=0x056B", // 80 | "j=0x0573", // 81 | "k=0x056F", // 82 | "l=0x056C", // 83 | "m=0x0574", // 84 | "n=0x0576", // 85 | "o=0x0578", // 86 | "p=0x057A", // 87 | "q=0x056D", // 88 | "r=0x0580", // 89 | "s=0x057D", // 90 | "t=0x057F", // 91 | "u=0x0568", // 92 | "v=0x057E", // 93 | "w=0x0582", // 94 | "x=0x0581", // 95 | "y=0x0565", // 96 | "z=0x0566", // 97 | "{=0x0549", // 98 | "|=0x055E", // 99 | "}=0x054B", // 100 | "~=0x055C", // 101 | -------------------------------------------------------------------------------- /kmap/ArmenianWest.kmap: -------------------------------------------------------------------------------- 1 | // 2 | // Western Armenian Phonetic keyboard (Rafi Papazian) 3 | // 4 | // Mark Leisher 5 | // 1998-11-21 6 | // 7 | "!=0x0031", // 8 | "#=0x0545", // 9 | "$=0x0033", // 10 | "%=0x0034", // 11 | "&=0x0587", // 12 | "'=0x0583", // 13 | "(=0x0029", // 14 | ")=0x0555", // 15 | "*=0x0028", // 16 | ",=0x0577", // 17 | "-=0x057C", // 18 | ".=0x0572", // 19 | "/=0x056E", // 20 | "0x30=0x0585", // 21 | "0x31=0x003A", // 22 | "0x32=0x0571", // 23 | "0x33=0x0575", // 24 | "0x34=0x055B", // 25 | "0x35=0x002C", // 26 | "0x36=0x002D", // 27 | "0x37=0x002E", // 28 | "0x38=0x00AB", // 29 | "0x39=0x00BB", // 30 | ":=0x0539", // 31 | ";=0x0569", // 32 | "<=0x0547", // 33 | "0x3D=0x056A", // 34 | ">=0x0542", // 35 | "?=0x053E", // 36 | "@=0x0541", // 37 | "A=0x0531", // 38 | "B=0x054A", // 39 | "C=0x0533", // 40 | "D=0x054F", // 41 | "E=0x0537", // 42 | "F=0x0556", // 43 | "G=0x053F", // 44 | "H=0x0540", // 45 | "I=0x053B", // 46 | "J=0x0543", // 47 | "K=0x0554", // 48 | "L=0x053C", // 49 | "M=0x0544", // 50 | "N=0x0546", // 51 | "O=0x0548", // 52 | "P=0x0532", // 53 | "Q=0x053D", // 54 | "R=0x0550", // 55 | "S=0x054D", // 56 | "T=0x0534", // 57 | "U=0x0538", // 58 | "V=0x0552", // 59 | "W=0x054E", // 60 | "X=0x0551", // 61 | "Y=0x0535", // 62 | "Z=0x0536", // 63 | "[=0x0579", // 64 | "\"=0x0553", // 65 | "\+=0x053A", // 66 | "\\=0x0027", // 67 | "]=0x057B", // 68 | "^=0x0039", // 69 | "_=0x054C", // 70 | "`=0x055D", // 71 | "a=0x0561", // 72 | "b=0x057A", // 73 | "c=0x0563", // 74 | "d=0x057F", // 75 | "e=0x0567", // 76 | "f=0x0586", // 77 | "g=0x056F", // 78 | "h=0x0570", // 79 | "i=0x056B", // 80 | "j=0x0573", // 81 | "k=0x0584", // 82 | "l=0x056C", // 83 | "m=0x0574", // 84 | "n=0x0576", // 85 | "o=0x0578", // 86 | "p=0x0562", // 87 | "q=0x056D", // 88 | "r=0x0580", // 89 | "s=0x057D", // 90 | "t=0x0564", // 91 | "u=0x0568", // 92 | "v=0x0582", // 93 | "w=0x057E", // 94 | "x=0x0581", // 95 | "y=0x0565", // 96 | "z=0x0566", // 97 | "{=0x0549", // 98 | "|=0x055E", // 99 | "}=0x054B", // 100 | "~=0x055C", // 101 | -------------------------------------------------------------------------------- /fbfrender.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fbfrender - FBF font cache and renderer 3 | * 4 | * Copyright (c) 2001, 2002 Fabrice Bellard. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef FBFRENDER_H 22 | #define FBFRENDER_H 23 | 24 | /* glyph cache */ 25 | typedef struct GlyphCache { 26 | struct GlyphCache *hash_next; 27 | struct GlyphCache *prev, *next; 28 | void *private; /* private data available for the driver, initialized to NULL */ 29 | /* font info */ 30 | short size; /* font size */ 31 | unsigned short style; /* font style */ 32 | short w, h; /* glyph bitmap size */ 33 | short x, y; /* glyph bitmap offset */ 34 | unsigned short index; /* glyph index */ 35 | unsigned short data_size; 36 | short xincr; /* glyph x increment */ 37 | unsigned char is_fallback; /* true if fallback glyph */ 38 | unsigned char data[0]; 39 | } GlyphCache; 40 | 41 | void fbf_text_metrics(QEditScreen *s, QEFont *font, 42 | QECharMetrics *metrics, 43 | const unsigned int *str, int len); 44 | GlyphCache *decode_cached_glyph(QEditScreen *s, QEFont *font, int code); 45 | QEFont *fbf_open_font(QEditScreen *s, int style, int size); 46 | void fbf_close_font(QEditScreen *s, QEFont **fontp); 47 | 48 | int fbf_render_init(const char *font_path); 49 | void fbf_render_cleanup(void); 50 | 51 | struct fbf_font { 52 | const unsigned char *data; 53 | unsigned int size; 54 | }; 55 | extern const struct fbf_font fbf_fonts[]; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /tests/HELLO.txt: -------------------------------------------------------------------------------- 1 | 2 | This is a list of ways to say hello in various languages. 3 | Its purpose is to illustrate a number of scripts. 4 | 5 | --------------------------------------------------------- 6 | 7 | Europe: 8 | 9 | Czech (česky) Dobrý den 10 | Danish (Dansk) Hej, Goddag 11 | English Hello 12 | English (IPA ɪŋglɪʃ) hɛləʊ 13 | Esperanto Saluton 14 | Estonian Tere, Tervist 15 | Finnish (Suomi) Hei 16 | French (Français) Bonjour, Salut 17 | German (Deutsch Nord) Guten Tag 18 | German (Deutsch Süd) Grüß Gott 19 | Italiano Ciao, Buon giorno 20 | Greek (Ελληνικά) Γειά σας 21 | Maltese Ċaw, Saħħa 22 | Nederlands, Vlaams Hallo, Dag 23 | Norwegian (Norsk) Hei, God dag 24 | Polish Dzień dobry, Hej 25 | Russian (Русский) Здравствуйте! 26 | Slovak (Slovensky) Dobrý deň 27 | Spanish (Español) ¡Hola! 28 | Swedish (Svenska) Hej, Goddag 29 | Turkish (Türkçe) Merhaba 30 | 31 | America: 32 | 33 | Cherokee (ᏣᎳᎩ) ᎣᏏᏲ 34 | 35 | Middle Near East/Africa: 36 | 37 | Amharic (አማርኛ) ሠላም 38 | Arabic ﺍﻟﺴﻼﻡ ﻋﻠﻴﻜﻢ 39 | Arabic (Pango) السَّلام عليكُم 40 | Arabic (اَلْعَرَبِيَّةُ)‎ اَلسَّلَامُ عَلَيْكُم 41 | Georgian (ქართველი) გამარჯობა 42 | Hebrew שלום 43 | Hebrew (עִבְרִית)‎ שָׁלוֹם 44 | Persian (فارسی)‎ سلام عليکم 45 | Yiddish (ײַדישע)‎ דאָס הײַזעלע 46 | 47 | South/South-East Asia: 48 | 49 | Bengali (বাঙ্লা) ষাগতোম 50 | Burmese မ္ရန္မာ 51 | Gujarati ગુજરાતિ 52 | Hindi (हिंदी) नमस्ते, नमस्कार । 53 | Khmer (ខ្មៃរ) ជំរាបសួរ (ex: ក្ក្រឿ៌) 54 | Lao (ພາສາລາວ) ສະບາຍດີ, ຂໍໃຫ້ໂຊກດີ 55 | Malayalam (മലയാളം) നമസ്കാരം (ex: ന+്+ര=ന്ര) 56 | Punjabi ਪੁਂਜਾਬਿ 57 | Sinhala (සිංහල) ආයුබෝවන් 58 | Tamil (தமிழ்) வணக்கம் 59 | Thai (ภาษาไทย) สวัสดีครับ, สวัสดีค่ะ 60 | Tibetan (བོད་སྐད་) བཀྲ་ཤིས་བདེ་ལེགས༎ (ex: བསྒྲུབས, ཧཱུཾ) 61 | Tigrigna (ትግርኛ) ሰላማት 62 | Vietnamese (Tiếng Việt) Chào bạn 63 | 64 | East Asia 65 | 66 | Chinese (中文,普通话,汉语) 你好 67 | Cantonese (粵語,廣東話) 早晨, 你好 68 | Japanese (日本語) こんにちは, コンニチハ 69 | Korean (한글) 안녕하세요, 안녕하십니까 70 | 71 | Difference among chinese characters in GB, JIS, KSC, BIG5: 72 | GB -- 元气 开发 73 | JIS -- 元気 開発 74 | KSC -- 元氣 開發 75 | BIG5 -- 元氣 開發 76 | 77 | Just for a test of JISX0212: 騏驎 (the second character is of JISX0212) 78 | -------------------------------------------------------------------------------- /kmap/Guarani.kmap: -------------------------------------------------------------------------------- 1 | // http://czyborra.com/yudit/Guarani.kmap 1998-09-25 2 | 3 | // Pino Zollo writes: 4 | 5 | // Guarani is the most spoken language in Paraguay and it is written 6 | // since 1500 when Jesuits came to this country. With the recent 7 | // scolar reform Guarani was introduced as mandatory in all classes. 8 | // The peculiarity of guarani' consists in its nasal vawel that are 9 | // the 6 following: "a e i o u y" with the cedilla ~ on top and the 10 | // same with tonic accent ' on top. Furthermore there are "n" and "g" 11 | // with ~ on top. Asuncion, 1998-08-20. Literature: 12 | // http://www1.highway.com.py/~pinoz/Linux/Guarani/ 13 | // http://merece.uthscsa.edu/gram/guarani/ 14 | // http://czyborra.com/yudit/ 15 | 16 | "A'=0x00C1", // Á = LATIN CAPITAL LETTER A WITH ACUTE 17 | "a'=0x00E1", // á = LATIN SMALL LETTER A WITH ACUTE 18 | "A~=0x00C3", // à = LATIN CAPITAL LETTER A WITH TILDE 19 | "a~=0x00E3", // ã = LATIN SMALL LETTER A WITH TILDE 20 | "E'=0x00C9", // É = LATIN CAPITAL LETTER E WITH ACUTE 21 | "e'=0x00E9", // é = LATIN SMALL LETTER E WITH ACUTE 22 | "E~=0x1EBC", // Ẽ = LATIN CAPITAL LETTER E WITH TILDE 23 | "e~=0x1EBD", // ẽ = LATIN SMALL LETTER E WITH TILDE 24 | "G~=G 0x0303", // G̃ = LATIN CAPITAL LETTER G + COMBINING TILDE 25 | "g~=g 0x0303", // g̃ = LATIN SMALL LETTER G + COMBINING TILDE 26 | "I'=0x00CD", // Í = LATIN CAPITAL LETTER I WITH ACUTE 27 | "i'=0x00ED", // í = LATIN SMALL LETTER I WITH ACUTE 28 | "I~=0x0128", // Ĩ = LATIN CAPITAL LETTER I WITH TILDE 29 | "i~=0x0129", // ĩ = LATIN SMALL LETTER I WITH TILDE 30 | "N~=0x00D1", // Ñ = LATIN CAPITAL LETTER N WITH TILDE 31 | "n~=0x00F1", // ñ = LATIN SMALL LETTER N WITH TILDE 32 | "O'=0x00D3", // Ó = LATIN CAPITAL LETTER O WITH ACUTE 33 | "o'=0x00F3", // ó = LATIN SMALL LETTER O WITH ACUTE 34 | "O~=0x00D5", // Õ = LATIN CAPITAL LETTER O WITH TILDE 35 | "o~=0x00F5", // õ = LATIN SMALL LETTER O WITH TILDE 36 | "U'=0x00DA", // Ú = LATIN CAPITAL LETTER U WITH ACUTE 37 | "u'=0x00FA", // ú = LATIN SMALL LETTER U WITH ACUTE 38 | "U~=0x0168", // Ũ = LATIN CAPITAL LETTER U WITH TILDE 39 | "u~=0x0169", // ũ = LATIN SMALL LETTER U WITH TILDE 40 | "Y'=0x00DD", // Ý = LATIN CAPITAL LETTER Y WITH ACUTE 41 | "y'=0x00FD", // ý = LATIN SMALL LETTER Y WITH ACUTE 42 | "Y~=0x1EF8", // Ỹ = LATIN CAPITAL LETTER Y WITH TILDE 43 | "y~=0x1EF9", // ỹ = LATIN SMALL LETTER Y WITH TILDE 44 | -------------------------------------------------------------------------------- /kmap/DanishAlternate.kmap: -------------------------------------------------------------------------------- 1 | // Danish.kmap for the Unicode editor Yudit 2 | // 1998-04-17 Roman Czyborra@cs.tu-berlin.de 3 | 4 | // Danish letters 5 | 6 | "AA=0x00c5", // Å = LATIN CAPITAL LETTER A WITH RING ABOVE 7 | "AE=0x00c6", // Æ = LATIN CAPITAL LETTER AE 8 | "O/=0x00d8", // Ø = LATIN CAPITAL LETTER O WITH STROKE 9 | "aa=0x00e5", // å = LATIN SMALL LETTER A WITH RING ABOVE 10 | "ae=0x00e6", // æ = LATIN SMALL LETTER AE 11 | "o/=0x00f8", // ø = LATIN SMALL LETTER O WITH STROKE 12 | 13 | // The international currency sign looks like a crown and is thus well 14 | // suited for any Skandinavian krona: 15 | 16 | "kr.=0x00A4", // ¤ = CURRENCY SIGN 17 | 18 | // http://domen.uninett.no/~hta/ietf/lang-chars.txt lists the 19 | // following optional Danish accents: 20 | 21 | "A'=0x00c1", // Á = LATIN CAPITAL LETTER A WITH ACUTE 22 | "E'=0x00c9", // É = LATIN CAPITAL LETTER E WITH ACUTE 23 | "I'=0x00cd", // Í = LATIN CAPITAL LETTER I WITH ACUTE 24 | "O'=0x00d3", // Ó = LATIN CAPITAL LETTER O WITH ACUTE 25 | "U'=0x00da", // Ú = LATIN CAPITAL LETTER U WITH ACUTE 26 | "Y'=0x00dd", // Ý = LATIN CAPITAL LETTER Y WITH ACUTE 27 | "a'=0x00e1", // á = LATIN SMALL LETTER A WITH ACUTE 28 | "e'=0x00e9", // é = LATIN SMALL LETTER E WITH ACUTE 29 | "i'=0x00ed", // í = LATIN SMALL LETTER I WITH ACUTE 30 | "o'=0x00f3", // ó = LATIN SMALL LETTER O WITH ACUTE 31 | "u'=0x00fa", // ú = LATIN SMALL LETTER U WITH ACUTE 32 | "y'=0x00fd", // ý = LATIN SMALL LETTER Y WITH ACUTE 33 | 34 | // optional Norwegian accents 35 | 36 | "A<=0x01cd", // Ǎ = LATIN CAPITAL LETTER A WITH CARON 37 | "O>=0x00d4", // Ô = LATIN CAPITAL LETTER O WITH CIRCUMFLEX 38 | "U:=0x00dc", // Ü = LATIN CAPITAL LETTER U WITH DIAERESIS 39 | "a<=0x01ce", // ǎ = LATIN SMALL LETTER A WITH CARON 40 | "o>=0x00f4", // ô = LATIN SMALL LETTER O WITH CIRCUMFLEX 41 | "u:=0x00fc", // ü = LATIN SMALL LETTER U WITH DIAERESIS 42 | 43 | // Swedish letters 44 | 45 | "A:=0x00c4", // Ä = LATIN CAPITAL LETTER A WITH DIAERESIS 46 | "O:=0x00d6", // Ö = LATIN CAPITAL LETTER O WITH DIAERESIS 47 | "a:=0x00e4", // ä = LATIN SMALL LETTER A WITH DIAERESIS 48 | "o:=0x00f6", // ö = LATIN SMALL LETTER O WITH DIAERESIS 49 | 50 | // Not much missing for Faeroese and Icelandic: 51 | 52 | "D-=0x00d0", // Ð = LATIN CAPITAL LETTER ETH 53 | "d-=0x00f0", // ð = LATIN SMALL LETTER ETH 54 | "T-=0x00de", // Þ = LATIN CAPITAL LETTER THORN 55 | "t-=0x00fe", // þ = LATIN SMALL LETTER THORN 56 | 57 | -------------------------------------------------------------------------------- /kmap/Hebrew.kmap: -------------------------------------------------------------------------------- 1 | // Hebrew.kmap for Yudit 2 | // 2001-01-30 Raphael Finkel raphael@cs.uky.edu 3 | 4 | // These are the Yiddish letters, according to the UYIP mapping convention 5 | 6 | "a=0x05D0 0x05b7", // HEBREW LETTER ALEF, HEBREW POINT PATAH 7 | "A=0x05D0", // HEBREW LETTER ALEF 8 | "B=0x05D1 0x05BF", // HEBREW LETTER BET, HEBREW POINT RAFE 9 | "b=0x05D1", // HEBREW LETTER BET 10 | "c=0x05E6", // HEBREW LETTER TSADI 11 | "C=0x05E5", // HEBREW LETTER FINAL TSADI 12 | "d=0x05D3", // HEBREW LETTER DALET 13 | "e=0x05E2", // HEBREW LETTER AYIN 14 | "E=0x05F2", // HEBREW LIGATURE YIDDISH DOUBLE YOD 15 | "f=0x05E4 0x05BF", // HEBREW LETTER PE, HEBREW POINT RAFE 16 | "F=0x05E3", // HEBREW LETTER FINAL PE 17 | "g=0x05D2", // HEBREW LETTER GIMEL 18 | "h=0x05D4", // HEBREW LETTER HE 19 | "H=0x05D7", // HEBREW LETTER HET 20 | "i=0x05D9", // HEBREW LETTER YOD 21 | "I=0x05D9 0x05B4", // HEBREW LETTER YOD, HEBREW POINT HIRIQ 22 | "j=0x05F2", // HEBREW LIGATURE YIDDISH DOUBLE YOD 23 | "J=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 24 | "k=0x05E7", // HEBREW LETTER QOF 25 | "K=0x05DB 0x05BC", // HEBREW LETTER KAF, HEBREW POINT DAGESH OR MAPIQ 26 | "l=0x05DC", // HEBREW LETTER LAMED 27 | "m=0x05DE", // HEBREW LETTER MEM 28 | "M=0x05DD", // HEBREW LETTER FINAL MEM 29 | "n=0x05E0", // HEBREW LETTER NUN 30 | "N=0x05DF", // HEBREW LETTER FINAL NUN 31 | "o=0x05D0 0x05B8", // HEBREW LETTER ALEF, HEBREW POINT QAMATS 32 | "O=0x05F1", // HEBREW LIGATURE YIDDISH VAV YOD 33 | "p=0x05E4 0x05BC", // HEBREW LETTER PE, HEBREW POINT DAGESH OR MAPIQ 34 | "q=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 35 | "r=0x05E8", // HEBREW LETTER RESH 36 | "s=0x05E1", // HEBREW LETTER SAMEKH 37 | "S=0x05EA", // HEBREW LETTER TAV 38 | "t=0x05D8", // HEBREW LETTER TET 39 | "T=0x05EA 0x05BC", // HEBREW LETTER TAV, HEBREW POINT DAGESH OR MAPIQ 40 | "u=0x05D5", // HEBREW LETTER VAV 41 | "U=0x05D5 0x05BC", // HEBREW LETTER VAV, HEBREW POINT DAGESH OR MAPIQ 42 | "v=0x05F0", // HEBREW LIGATURE YIDDISH DOUBLE VAV 43 | "V=0x05D1 0x05BF", // HEBREW LETTER BET, HEBREW POINT RAFE 44 | "w=0x05E9", // HEBREW LETTER SHIN 45 | "W=0x05E9 0x05C2", // HEBREW LETTER SHIN, HEBREW POINT SIN DOT 46 | "x=0x05DB", // HEBREW LETTER KAF 47 | "X=0x05DA", // HEBREW LETTER FINAL KAF 48 | "y=0x05D9", // HEBREW LETTER YOD 49 | "Y=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 50 | "z=0x05D6", // HEBREW LETTER ZAYIN 51 | -------------------------------------------------------------------------------- /kmap/HebrewR.kmap: -------------------------------------------------------------------------------- 1 | // Hebrew.kmap for Yudit 2 | // 2001-01-30 Raphael Finkel raphael@cs.uky.edu 3 | 4 | // These are the Yiddish letters, according to the UYIP mapping convention 5 | 6 | "a=0x05D0 0x05b7", // HEBREW LETTER ALEF, HEBREW POINT PATAH 7 | "A=0x05D0", // HEBREW LETTER ALEF 8 | "B=0x05D1 0x05BF", // HEBREW LETTER BET, HEBREW POINT RAFE 9 | "b=0x05D1", // HEBREW LETTER BET 10 | "c=0x05E6", // HEBREW LETTER TSADI 11 | "C=0x05E5", // HEBREW LETTER FINAL TSADI 12 | "d=0x05D3", // HEBREW LETTER DALET 13 | "e=0x05E2", // HEBREW LETTER AYIN 14 | "E=0x05F2", // HEBREW LIGATURE YIDDISH DOUBLE YOD 15 | "f=0x05E4 0x05BF", // HEBREW LETTER PE, HEBREW POINT RAFE 16 | "F=0x05E3", // HEBREW LETTER FINAL PE 17 | "g=0x05D2", // HEBREW LETTER GIMEL 18 | "h=0x05D4", // HEBREW LETTER HE 19 | "H=0x05D7", // HEBREW LETTER HET 20 | "i=0x05D9", // HEBREW LETTER YOD 21 | "I=0x05D9 0x05B4", // HEBREW LETTER YOD, HEBREW POINT HIRIQ 22 | "j=0x05F2", // HEBREW LIGATURE YIDDISH DOUBLE YOD 23 | "J=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 24 | "k=0x05E7", // HEBREW LETTER QOF 25 | "K=0x05DB 0x05BC", // HEBREW LETTER KAF, HEBREW POINT DAGESH OR MAPIQ 26 | "l=0x05DC", // HEBREW LETTER LAMED 27 | "m=0x05DE", // HEBREW LETTER MEM 28 | "M=0x05DD", // HEBREW LETTER FINAL MEM 29 | "n=0x05E0", // HEBREW LETTER NUN 30 | "N=0x05DF", // HEBREW LETTER FINAL NUN 31 | "o=0x05D0 0x05B8", // HEBREW LETTER ALEF, HEBREW POINT QAMATS 32 | "O=0x05F1", // HEBREW LIGATURE YIDDISH VAV YOD 33 | "p=0x05E4 0x05BC", // HEBREW LETTER PE, HEBREW POINT DAGESH OR MAPIQ 34 | "q=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 35 | "r=0x05E8", // HEBREW LETTER RESH 36 | "s=0x05E1", // HEBREW LETTER SAMEKH 37 | "S=0x05EA", // HEBREW LETTER TAV 38 | "t=0x05D8", // HEBREW LETTER TET 39 | "T=0x05EA 0x05BC", // HEBREW LETTER TAV, HEBREW POINT DAGESH OR MAPIQ 40 | "u=0x05D5", // HEBREW LETTER VAV 41 | "U=0x05D5 0x05BC", // HEBREW LETTER VAV, HEBREW POINT DAGESH OR MAPIQ 42 | "v=0x05F0", // HEBREW LIGATURE YIDDISH DOUBLE VAV 43 | "V=0x05D1 0x05BF", // HEBREW LETTER BET, HEBREW POINT RAFE 44 | "w=0x05E9", // HEBREW LETTER SHIN 45 | "W=0x05E9 0x05C2", // HEBREW LETTER SHIN, HEBREW POINT SIN DOT 46 | "x=0x05DB", // HEBREW LETTER KAF 47 | "X=0x05DA", // HEBREW LETTER FINAL KAF 48 | "y=0x05D9", // HEBREW LETTER YOD 49 | "Y=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 50 | "z=0x05D6", // HEBREW LETTER ZAYIN 51 | -------------------------------------------------------------------------------- /kmap/French.kmap: -------------------------------------------------------------------------------- 1 | // French.kmap for the Unicode text editor Yudit 2 | // 1998-06-10 roman@czyborra.com - improvements welcome 3 | // 2004-07-05 Modified by Yves Codet 4 | 5 | "~=0x00A0", //   = NO-BREAK SPACE 6 | "'=0x2019", // ’ = RIGHT SINGLE QUOTATION MARK (APOSTROPHE) 7 | "<<=0x00AB", // « = LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 8 | ">>=0x00BB", // » = RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK 9 | "e'=0x00E9", // é = LATIN SMALL LETTER E WITH ACUTE 10 | "e`=0x00E8", // è = LATIN SMALL LETTER E WITH GRAVE 11 | "u`=0x00F9", // ù = LATIN SMALL LETTER U WITH GRAVE 12 | "c;=0x00E7", // ç = LATIN SMALL LETTER C WITH CEDILLA 13 | "a`=0x00E0", // à = LATIN SMALL LETTER A WITH GRAVE 14 | "E'=0x00C9", // É = LATIN CAPITAL LETTER E WITH ACUTE 15 | "E`=0x00C8", // È = LATIN CAPITAL LETTER E WITH GRAVE 16 | "U`=0x00D9", // Ù = LATIN CAPITAL LETTER U WITH GRAVE 17 | "C;=0x00C7", // Ç = LATIN CAPITAL LETTER C WITH CEDILLA 18 | "A`=0x00C0", // À = LATIN CAPITAL LETTER A WITH GRAVE 19 | "a>=0x00E2", // â = LATIN SMALL LETTER A WITH CIRCUMFLEX 20 | "e>=0x00EA", // ê = LATIN SMALL LETTER E WITH CIRCUMFLEX 21 | "i>=0x00EE", // î = LATIN SMALL LETTER I WITH CIRCUMFLEX 22 | "o>=0x00F4", // ô = LATIN SMALL LETTER O WITH CIRCUMFLEX 23 | "u>=0x00FB", // û = LATIN SMALL LETTER U WITH CIRCUMFLEX 24 | "ae=0x00E6", // æ = LATIN SMALL LETTER AE 25 | "oe=0x0153", // œ = LATIN SMALL LIGATURE OE 26 | "e;=0x00EB", // ë = LATIN SMALL LETTER E WITH DIAERESIS 27 | "i;=0x00EF", // ï = LATIN SMALL LETTER I WITH DIAERESIS 28 | "u;=0x00FC", // ü = LATIN SMALL LETTER U WITH DIAERESIS 29 | "y;=0x00FF", // ÿ = LATIN SMALL LETTER Y WITH DIAERESIS 30 | "A>=0x00C2", //  = LATIN CAPITAL LETTER A WITH CIRCUMFLEX 31 | "E>=0x00CA", // Ê = LATIN CAPITAL LETTER E WITH CIRCUMFLEX 32 | "I>=0x00CE", // Î = LATIN CAPITAL LETTER I WITH CIRCUMFLEX 33 | "O>=0x00D4", // Ô = LATIN CAPITAL LETTER O WITH CIRCUMFLEX 34 | "U>=0x00DB", // Û = LATIN CAPITAL LETTER U WITH CIRCUMFLEX 35 | "AE=0x00C6", // Æ = LATIN CAPITAL LETTER AE 36 | "OE=0x0152", // Œ = LATIN CAPITAL LIGATURE OE 37 | "E;=0x00CB", // Ë = LATIN CAPITAL LETTER E WITH DIAERESIS 38 | "I;=0x00CF", // Ï = LATIN CAPITAL LETTER I WITH DIAERESIS 39 | "U;=0x00DC", // Ü = LATIN CAPITAL LETTER U WITH DIAERESIS 40 | "Y;=0x0178", // Ÿ = LATIN CAPITAL LETTER Y WITH DIAERESIS 41 | "Ff=0x20A3", // ₣ = FRENCH FRANC SIGN 42 | "E$=0x20AC", // € = EURO SIGN 43 | "Ct=0x00A2", // ¢ = CENT SIGN 44 | "C)=0x00A9", // © = COPYRIGHT SIGN 45 | 46 | -------------------------------------------------------------------------------- /libqhtml/cssid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CSS core for qemacs. 3 | * 4 | * Copyright (c) 2000, 2001, 2002 Fabrice Bellard. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | /* definition of builtin CSS identifiers for easy testing in C code */ 22 | 23 | CSSID(class) 24 | CSSID(id) 25 | CSSID(img) 26 | CSSID(width) 27 | CSSID(height) 28 | CSSID(body) 29 | CSSID(text) 30 | CSSID(font) 31 | CSSID(basefont) 32 | CSSID(size) 33 | CSSID(color) 34 | CSSID(bgcolor) 35 | CSSID(align) 36 | CSSID(style) 37 | CSSID(script) 38 | CSSID(li) 39 | CSSID(b) 40 | CSSID(i) 41 | CSSID(em) 42 | CSSID(br) 43 | CSSID(hr) 44 | CSSID(meta) 45 | CSSID(link) 46 | CSSID(form) 47 | CSSID(base) 48 | CSSID(input) 49 | CSSID(td) 50 | CSSID(th) 51 | CSSID(tr) 52 | CSSID(dt) 53 | CSSID(dd) 54 | CSSID(table) 55 | CSSID(a) 56 | CSSID(href) 57 | CSSID(border) 58 | CSSID(clear) 59 | CSSID(cellspacing) 60 | CSSID(cellpadding) 61 | CSSID(valign) 62 | CSSID(type) 63 | CSSID(value) 64 | CSSID(button) 65 | CSSID(reset) 66 | CSSID(submit) 67 | CSSID(password) 68 | CSSID(textarea) 69 | CSSID(cols) 70 | CSSID(rows) 71 | CSSID(select) 72 | CSSID(image) 73 | CSSID(file) 74 | CSSID(caption) 75 | CSSID(ol) 76 | CSSID(colspan) 77 | CSSID(rowspan) 78 | CSSID(col) 79 | CSSID(colgroup) 80 | CSSID(hspace) 81 | CSSID(vspace) 82 | CSSID(alt) 83 | CSSID(src) 84 | CSSID(programlisting) 85 | CSSIDSTR(list_item, "list-item") 86 | CSSID(start) 87 | CSSID(html) 88 | -------------------------------------------------------------------------------- /kmap/Hangul.kmap: -------------------------------------------------------------------------------- 1 | // 2 | // Roman transliteration of Korean for yudit. 3 | // 4 | "consonant0+vowel+consonant3", 5 | 6 | "begin consonant0", 7 | "g=0xAC00", 8 | "gg=0xAE4C", 9 | "n=0xB098", 10 | "d=0xB2E4", 11 | "dd=0xB530", 12 | "l=0xB77C", 13 | "r=0xB77C", 14 | "m=0xB9C8", 15 | "b=0xBC14", 16 | "bb=0xBE60", 17 | "s=0xC0AC", 18 | "ss=0xC2F8", 19 | "=0xC544", 20 | "j=0xC790", 21 | "jj=0xC9DC", 22 | "c=0xCC28", 23 | "k=0xCE74", 24 | "t=0xD0C0", 25 | "p=0xD30C", 26 | "h=0xD558", 27 | "end consonant0", 28 | 29 | "begin vowel", 30 | "a=0x0000", 31 | "ae=0x001C", 32 | "ya=0x0038", 33 | "uae=0x0054", 34 | "eo=0x0070", 35 | "e=0x008C", 36 | "yeo=0x00A8", 37 | "ye=0x00C4", 38 | "o=0x00E0", 39 | "wa=0x00FC", 40 | "wae=0x0118", 41 | "oe=0x0134", 42 | "yo=0x0150", 43 | "u=0x016C", 44 | "weo=0x0188", 45 | "we=0x01A4", 46 | "wi=0x01C0", 47 | "yu=0x01DC", 48 | "eu=0x01F8", 49 | "yi=0x0214", 50 | "i=0x0230", 51 | "end vowel", 52 | 53 | "begin consonant3", 54 | "=0x0000", 55 | "g=0x0001", 56 | "gg=0x0002", 57 | "gs=0x0003", 58 | "n=0x0004", 59 | "nj=0x0005", 60 | "nh=0x0006", 61 | "d=0x0007", 62 | "l=0x0008", 63 | "lg=0x0009", 64 | "lm=0x000A", 65 | "lb=0x000B", 66 | "ls=0x000C", 67 | "lt=0x000D", 68 | "lp=0x000E", 69 | "lh=0x000F", 70 | 71 | "r=0x0008", 72 | "rg=0x0009", 73 | "rm=0x000A", 74 | "rb=0x000B", 75 | "rs=0x000C", 76 | "rt=0x000D", 77 | "rp=0x000E", 78 | "rh=0x000F", 79 | 80 | "m=0x0010", 81 | "b=0x0011", 82 | "bs=0x0012", 83 | "s=0x0013", 84 | "ss=0x0014", 85 | "ng=0x0015", 86 | "j=0x0016", 87 | "c=0x0017", 88 | "k=0x0018", 89 | "t=0x0019", 90 | "p=0x001A", 91 | "h=0x001B", 92 | 93 | " 0x20 =0x0000", 94 | "g 0x20 =0x0001", 95 | "gg 0x20 =0x0002", 96 | "gs 0x20 =0x0003", 97 | "n 0x20 =0x0004", 98 | "nj 0x20 =0x0005", 99 | "nh 0x20 =0x0006", 100 | "d 0x20 =0x0007", 101 | "l 0x20 =0x0008", 102 | "lg 0x20 =0x0009", 103 | "lm 0x20 =0x000A", 104 | "lb 0x20 =0x000B", 105 | "ls 0x20 =0x000C", 106 | "lt 0x20 =0x000D", 107 | "lp 0x20 =0x000E", 108 | "lh 0x20 =0x000F", 109 | 110 | "r 0x20 =0x0008", 111 | "rg 0x20 =0x0009", 112 | "rm 0x20 =0x000A", 113 | "rb 0x20 =0x000B", 114 | "rs 0x20 =0x000C", 115 | "rt 0x20 =0x000D", 116 | "rp 0x20 =0x000E", 117 | "rh 0x20 =0x000F", 118 | 119 | "m 0x20 =0x0010", 120 | "b 0x20 =0x0011", 121 | "bs 0x20 =0x0012", 122 | "s 0x20 =0x0013", 123 | "ss 0x20 =0x0014", 124 | "ng 0x20 =0x0015", 125 | "j 0x20 =0x0016", 126 | "c 0x20 =0x0017", 127 | "k 0x20 =0x0018", 128 | "t 0x20 =0x0019", 129 | "p 0x20 =0x001A", 130 | "h 0x20 =0x001B", 131 | "end consonant3" 132 | 133 | -------------------------------------------------------------------------------- /libqhtml/Makefile: -------------------------------------------------------------------------------- 1 | # Libqhtml tiny HTML/CSS rendering library for QEmacs 2 | # 3 | # Copyright (c) 2000-2002 Fabrice Bellard. 4 | # Copyright (c) 2000-2014 Charlie Gordon. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | 20 | DEPTH=.. 21 | 22 | include $(DEPTH)/config.mak 23 | 24 | ifeq ($(CC),gcc) 25 | CFLAGS += -Wall -g -O2 -funsigned-char 26 | # do not warn about zero-length formats. 27 | CFLAGS += -Wno-format-zero-length 28 | LDFLAGS := -g 29 | endif 30 | 31 | #include local compiler configuration file 32 | -include $(DEPTH)/cflags.mk 33 | 34 | ifdef TARGET_GPROF 35 | CFLAGS += -p 36 | LDFLAGS += -p 37 | endif 38 | 39 | ifdef TARGET_ARCH_X86 40 | #CFLAGS+=-fomit-frame-pointer 41 | ifeq ($(GCC_MAJOR),2) 42 | CFLAGS+=-m386 -malign-functions=0 43 | else 44 | CFLAGS+=-march=i386 -falign-functions=0 45 | endif 46 | endif 47 | 48 | CFLAGS+=-I$(DEPTH) 49 | 50 | LIB= libqhtml.a 51 | OBJS= css.o xmlparse.o cssparse.o html_style.o docbook_style.o 52 | 53 | DEPENDS:= qe.h config.h cutils.h display.h qestyles.h config.mak 54 | DEPENDS:= $(addprefix $(DEPTH)/, $(DEPENDS)) 55 | 56 | OBJS_DIR:= $(DEPTH)/.objs/libqhtml 57 | OBJS:= $(addprefix $(OBJS_DIR)/, $(OBJS)) 58 | 59 | $(shell mkdir -p $(OBJS_DIR)) 60 | 61 | # 62 | # Dependencies 63 | # 64 | all: $(LIB) 65 | 66 | $(LIB): $(OBJS) Makefile 67 | rm -f $@ 68 | $(AR) rc $@ $(OBJS) 69 | 70 | $(OBJS_DIR)/%.o: %.c $(DEPENDS) Makefile 71 | $(CC) $(DEFINES) $(CFLAGS) -o $@ -c $< 72 | 73 | # 74 | # build default style sheet file 75 | # 76 | csstoqe$(EXE): csstoqe.c Makefile 77 | $(HOST_CC) $(CFLAGS) -o $@ $< 78 | 79 | html_style.c: html.css csstoqe$(EXE) Makefile 80 | ./csstoqe html_style < $< > $@ 81 | 82 | docbook_style.c: docbook.css csstoqe$(EXE) Makefile 83 | ./csstoqe docbook_style < $< > $@ 84 | 85 | clean: 86 | rm -rf *.dSYM 87 | rm -f *~ *.o *.a *.exe *_g TAGS gmon.out core *.exe.stackdump \ 88 | csstoqe html_style.c docbook_style.c \ 89 | $(OBJS_DIR)/*.o 90 | -------------------------------------------------------------------------------- /kmap/German.kmap: -------------------------------------------------------------------------------- 1 | // German.kmap for the Unicode editor Yudit 2 | // 1998-04-17 Roman Czyborra@cs.tu-berlin.de 3 | // Changes: 4 | // 202-04-02 Gaspar Sinai : 5 | // o added die Auslassungspunkte ellipsis dots omission marks … 6 | // o added der Gedankenstrich long dash – 7 | 8 | "...=0x2026", // … die Auslassungspunkte 9 | "--=0x2013", // – der Gedankenstrich 10 | "'' = 0x201D", // “ RIGHT DOUBLE QUOTATION MARK 11 | 12 | // „German“ quotation marks: 13 | 14 | ",,=0x201E", // „ = DOUBLE LOW-9 QUOTATION MARK = 15 | "``=0x201C", // “ = LEFT DOUBLE QUOTATION MARK = 16 | 17 | // In a lot of German books you will also find: »...« 18 | 19 | ">>=0x00BB", // » = RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK = 20 | "<<=0x00AB", // « = LEFT-POINTING DOUBLE ANGLE QUOTATION MARK = 21 | 22 | // The Paragraphenzeichen is used to number 23 | // paragrahs of the legal code (§ 1 StVO): 24 | 25 | "S$=0x00A7", // § = SECTION SIGN 26 | 27 | // Germany and Austria are trading their currencies for the Euro: 28 | 29 | "E$=0x20AC", // € = EURO SIGN 30 | 31 | // The following definitions give German umlaut vowels to typers of 32 | // German who are used to typing their umlauts on American 33 | // (ASCII-QWERTY) keyboards as with ae, oe, ue, and sz replacements. 34 | 35 | "Ae=0x00c4", // Ä = Aumlaut = LATIN CAPITAL LETTER A WITH DIAERESIS 36 | "Oe=0x00d6", // Ö = Oumlaut = LATIN CAPITAL LETTER O WITH DIAERESIS 37 | "Ue=0x00dc", // Ü = Uumlaut = LATIN CAPITAL LETTER U WITH DIAERESIS 38 | "ae=0x00e4", // ä = LATIN SMALL LETTER A WITH DIAERESIS 39 | "oe=0x00f6", // ö = LATIN SMALL LETTER O WITH DIAERESIS 40 | "ue=0x00fc", // ü = LATIN SMALL LETTER U WITH DIAERESIS 41 | "sz=0x00df", // ß = eszet = germandbls = LATIN SMALL LETTER SHARP S 42 | 43 | // WARNING: With this method you will get a lot of funny typing errors 44 | // for all words containing real ae, oe or ue combinations like a 45 | // nonsensical "Maür" instead of the correct "Mauer". To prevent this, 46 | // you can try to remember to always insert a period and type "Mau.er": 47 | 48 | ".e=0x0065", // e = LATIN SMALL LETTER E 49 | ".z=0x007A", // z = LATIN SMALL LETTER Z 50 | 51 | // You're probably better off editing the umlaut input sequence to 52 | // something less ambiguous (ä a; a' a: a" a= "a or \"a) depending on 53 | // whether your keyboard already has straight umlaut keys or whatever 54 | // composition sequence you're used to. 55 | 56 | // German typewriters traditionally also allowed to type the following 57 | // two accented letters in words imported from French: We want to be 58 | // able to type sentences like „André kaufte zwei Karten à 10 DM.“ 59 | 60 | "e'=0x00e9", // é = LATIN SMALL LETTER E WITH ACUTE 61 | "`a=0x00e0", // à = LATIN SMALL LETTER A WITH GRAVE 62 | 63 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('qemacs ', 'c') 2 | 3 | sources = files([ 4 | 'qe.c', 5 | 'parser.c', 6 | 'charset.c', 7 | 'buffer.c', 8 | 'input.c', 9 | 'display.c', 10 | 'util.c', 11 | 'hex.c', 12 | 'list.c', 13 | 'cutils.c' 14 | ]) 15 | 16 | if get_option('tiny').disabled() 17 | sources += files(['extras.c', 'variables.c', 'charsetjis.c', 'charsetmore.c']) 18 | endif 19 | 20 | # all other modes 21 | sources += files([ 22 | 'unihex.c', 23 | 'bufed.c', 24 | 'clang.c', 25 | 'htmlsrc.c', 26 | 'lisp.c', 27 | 'makemode.c', 28 | 'markdown.c', 29 | 'orgmode.c', 30 | 'perl.c', 31 | 'script.c', 32 | 'extra-modes.c']) 33 | 34 | if host_machine.system() != 'windows' 35 | sources += files(['shell.c', 'dired.c', 'latex-mode.c', 'archive.c']) 36 | endif 37 | 38 | conf_data = configuration_data() 39 | conf_data.set_quoted('QE_VERSION', '5.0') 40 | conf_data.set_quoted('CONFIG_QE_DATADIR', '/') 41 | conf_data.set_quoted('CONFIG_QE_PREFIX', '/') 42 | 43 | 44 | configure_file(input: 'config.h.in', 45 | output: 'config.h', 46 | configuration : conf_data) 47 | configuration_inc = include_directories('.') 48 | 49 | treesitter_lang_deps = [] 50 | if get_option('treesitter').enabled() 51 | treesitter_dep = dependency('tree-sitter', required: true) 52 | if not treesitter_dep.found() 53 | treesitter = subproject('tree-sitter') 54 | endif 55 | 56 | if treesitter_dep.found() 57 | sources += files(['treesitter.c']) 58 | endif 59 | 60 | foreach lang : ['go', 'json'] 61 | treesitter_lang_deps += dependency('tree-sitter-@0@'.format(lang), 62 | fallback : ['tree-sitter-@0@'.format(lang), 63 | 'tree_sitter_@0@_dep'.format(lang)]) 64 | endforeach 65 | endif 66 | 67 | gtkdep = dependency('', required: false) 68 | if get_option('gtk').enabled() 69 | gtkdep = dependency('gtk+-3.0', required: true) 70 | if gtkdep.found() 71 | sources += files(['gtk.c']) 72 | endif 73 | else 74 | if host_machine.system() == 'linux' 75 | sources += files(['unix.c']) 76 | endif 77 | endif 78 | 79 | if host_machine.system() == 'linux' 80 | sources += files(['tty.c']) 81 | endif 82 | 83 | # this has to be done once all source files are known 84 | # FIXME do this properly 85 | grep = find_program('grep') 86 | modinit_gen = custom_target('modinit_gen', 87 | command: [grep, '-h', '^qe_module_init', sources], 88 | output : 'allmodules.txt', 89 | capture: true) 90 | sources += files(['qeend.c']) 91 | 92 | executable('qe', 93 | [sources, modinit_gen], 94 | dependencies : [gtkdep, treesitter_dep] + treesitter_lang_deps, 95 | include_directories : configuration_inc, 96 | c_args : '-DHAVE_QE_CONFIG_H') 97 | -------------------------------------------------------------------------------- /kmap/Czech.kmap: -------------------------------------------------------------------------------- 1 | // Czech kmap v1.1 1999/11/30 11:36:00 2 | // send your criticism to roman@czyborra.com 3 | // 4 | // modified by Radovan Garabík 5 | // to include ä, ĺ, ľ, ó, ô, ö, ŕ, ú, ü and capital variants 6 | // (Slovak letters and letters commonly occuring in Czech and Slovak texts) 7 | 8 | 9 | ",,=0x201E", // „ = DOUBLE LOW-9 QUOTATION MARK = 10 | "``=0x201C", // “ = LEFT DOUBLE QUOTATION MARK = 11 | "A'=0x00C1", // Á = LATIN CAPITAL LETTER A WITH ACUTE 12 | "A:=0x00C4", // Ä = LATIN CAPITAL LETTER A WITH DIARESIS 13 | "C$=0x00A4", // ¤ = CURRENCY SIGN 14 | "C<=0x010C", // Č = LATIN CAPITAL LETTER C WITH CARON 15 | "D<=0x010E", // Ď = LATIN CAPITAL LETTER D WITH CARON 16 | "E'=0x00C9", // É = LATIN CAPITAL LETTER E WITH ACUTE 17 | "E<=0x011A", // Ě = LATIN CAPITAL LETTER E WITH CARON 18 | "I'=0x00CD", // Í = LATIN CAPITAL LETTER I WITH ACUTE 19 | "L'=0x0139", // Ĺ = LATIN CAPITAL LETTER L WITH ACUTE 20 | "L<=0x013D", // Ľ = LATIN CAPITAL LETTER L WITH CARON 21 | "N<=0x0147", // Ň = LATIN CAPITAL LETTER N WITH CARON 22 | "O'=0x00D3", // Ó = LATIN CAPITAL LETTER O WITH ACUTE 23 | "O^=0x00D4", // Ô = LATIN CAPITAL LETTER O WITH CIRCUMFLEX 24 | "O:=0x00D6", // Ö = LATIN CAPITAL LETTER O WITH DIARESIS 25 | "R'=0x0154", // Ŕ = LATIN CAPITAL LETTER R WITH ACUTE 26 | "R<=0x0158", // Ř = LATIN CAPITAL LETTER R WITH CARON 27 | "S<=0x0160", // Š = LATIN CAPITAL LETTER S WITH CARON 28 | "T<=0x0164", // Ť = LATIN CAPITAL LETTER T WITH CARON 29 | "U'=0x00DA", // Ú = LATIN CAPITAL LETTER U WITH ACUTE 30 | "U0=0x016E", // Ů = LATIN CAPITAL LETTER U WITH RING ABOVE 31 | "U:=0x00DC", // Ü = LATIN CAPITAL LETTER U WITH DIARESIS 32 | "Y'=0x00DD", // Ý = LATIN CAPITAL LETTER Y WITH ACUTE 33 | "Z<=0x017D", // Ž = LATIN CAPITAL LETTER Z WITH CARON 34 | "a'=0x00E1", // á = LATIN SMALL LETTER A WITH ACUTE 35 | "a:=0x00E4", // ä = LATIN SMALL LETTER A WITH DIARESIS 36 | "c<=0x010D", // č = LATIN SMALL LETTER C WITH CARON 37 | "d<=0x010F", // ď = LATIN SMALL LETTER D WITH CARON 38 | "e'=0x00E9", // é = LATIN SMALL LETTER E WITH ACUTE 39 | "e<=0x011B", // ě = LATIN SMALL LETTER E WITH CARON 40 | "i'=0x00ED", // í = LATIN SMALL LETTER I WITH ACUTE 41 | "l'=0x013A", // ĺ = LATIN SMALL LETTER L WITH ACUTE 42 | "l<=0x013E", // ľ = LATIN SMALL LETTER L WITH CARON 43 | "n<=0x0148", // ň = LATIN SMALL LETTER N WITH CARON 44 | "o'=0x00F3", // ó = LATIN SMALL LETTER O WITH ACUTE 45 | "o^=0x00F4", // ô = LATIN SMALL LETTER O WITH CIRCUMFLEX 46 | "o:=0x00F6", // ö = LATIN SMALL LETTER O WITH DIARESIS 47 | "r'=0x0155", // ŕ = LATIN SMALL LETTER R WITH ACUTE 48 | "r<=0x0159", // ř = LATIN SMALL LETTER R WITH CARON 49 | "s<=0x0161", // š = LATIN SMALL LETTER S WITH CARON 50 | "t<=0x0165", // ť = LATIN SMALL LETTER T WITH CARON 51 | "u'=0x00FA", // ú = LATIN SMALL LETTER U WITH ACUTE 52 | "u0=0x016F", // ů = LATIN SMALL LETTER U WITH RING ABOVE 53 | "u:=0x00FC", // ü = LATIN SMALL LETTER U WITH DIARESIS 54 | "y'=0x00FD", // ý = LATIN SMALL LETTER Y WITH ACUTE 55 | "z<=0x017E", // ž = LATIN SMALL LETTER Z WITH CARON 56 | -------------------------------------------------------------------------------- /variables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Module for handling variables in QEmacs 3 | * 4 | * Copyright (c) 2000-2008 Charlie Gordon. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | typedef enum QVarType { 22 | VAR_UNKNOWN = 0, 23 | VAR_NUMBER, 24 | VAR_STRING, 25 | VAR_CHARS, 26 | } QVarType; 27 | 28 | enum QVarAccess { 29 | VAR_RO, 30 | VAR_RW, 31 | }; 32 | 33 | enum QVarDomain { 34 | VAR_GLOBAL, 35 | VAR_STATE, 36 | VAR_BUFFER, 37 | VAR_WINDOW, 38 | VAR_MODE, 39 | VAR_SELF, 40 | }; 41 | 42 | extern const char * const var_domain[]; 43 | 44 | typedef struct VarDef { 45 | const char *name; 46 | enum QVarDomain domain : 4; 47 | enum QVarType type : 4; 48 | enum QVarAccess rw : 2; 49 | unsigned int size : 16; 50 | union { 51 | void *ptr; 52 | int offset; 53 | char **pstr; 54 | int *pint; 55 | char *str; 56 | int num; 57 | } value; 58 | struct VarDef *next; 59 | } VarDef; 60 | 61 | #define U_VAR(name, type) \ 62 | { (name), VAR_SELF, type, VAR_RW, 0, { .num = 0 }, NULL }, 63 | #define G_VAR(name,ptr,type,rw) \ 64 | { (name), VAR_GLOBAL, type, rw, 0, { (void*)&(ptr) }, NULL }, 65 | #define S_VAR(name,fld,type,rw) \ 66 | { (name), VAR_STATE, type, rw, sizeof(((QEmacsState*)0)->fld), { .offset = offsetof(QEmacsState, fld) }, NULL }, 67 | #define B_VAR(name,fld,type,rw) \ 68 | { (name), VAR_BUFFER, type, rw, sizeof(((EditBuffer*)0)->fld), { .offset = offsetof(EditBuffer, fld) }, NULL }, 69 | #define W_VAR(name,fld,type,rw) \ 70 | { (name), VAR_WINDOW, type, rw, sizeof(((EditState*)0)->fld), { .offset = offsetof(EditState, fld) }, NULL }, 71 | #define M_VAR(name,fld,type,rw) \ 72 | { (name), VAR_MODE, type, rw, sizeof(((ModeDef*)0)->fld), { .offset = offsetof(ModeDef, fld) }, NULL }, 73 | 74 | void qe_register_variables(VarDef *vars, int count); 75 | VarDef *qe_find_variable(const char *name); 76 | void qe_complete_variable(CompleteState *cp); 77 | 78 | QVarType qe_get_variable(EditState *s, const char *name, 79 | char *buf, int size, int *pnum, int as_source); 80 | QVarType qe_set_variable(EditState *s, const char *name, 81 | const char *value, int num); 82 | 83 | void qe_list_variables(EditState *s, EditBuffer *b); 84 | 85 | void do_set_variable(EditState *s, const char *name, const char *value); 86 | void do_show_variable(EditState *s, const char *name); 87 | -------------------------------------------------------------------------------- /fbftoqe.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Convert FBF fonts into source code to link them in QEmacs. 3 | * 4 | * Copyright (c) 2002 Fabrice Bellard. 5 | * Copyright (c) 2007-2008 Charlie Gordon. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include "cutils.h" 27 | 28 | static int dump_font(const char *filename, const char *name) 29 | { 30 | int c; 31 | FILE *f; 32 | int j; 33 | 34 | f = fopen(filename, "rb"); 35 | if (!f) { 36 | perror(filename); 37 | exit(1); 38 | } 39 | printf("static unsigned char const font_%s[] = {\n", name); 40 | j = 0; 41 | for (;;) { 42 | c = getc(f); 43 | if (c == EOF) 44 | break; 45 | if ((j & 7) == 0) 46 | printf(" "); 47 | j++; 48 | printf(" 0x%02x,", c); 49 | if ((j & 7) == 0) 50 | printf("\n"); 51 | } 52 | if ((j & 7) != 0) 53 | printf("\n"); 54 | printf("};\n\n"); 55 | 56 | fclose(f); 57 | return j; 58 | } 59 | 60 | static void getname(char *name, int name_size, const char *filename) 61 | { 62 | const char *p; 63 | char *q; 64 | 65 | p = strrchr(filename, '/'); 66 | if (!p) 67 | p = filename; 68 | else 69 | p++; 70 | pstrcpy(name, name_size, p); 71 | q = strrchr(name, '.'); 72 | if (q) 73 | *q = '\0'; 74 | } 75 | 76 | #define FONT_MAX 128 77 | 78 | int main(int argc, char **argv) 79 | { 80 | const char *filename; 81 | char name[128]; 82 | int font_size[FONT_MAX]; 83 | int i; 84 | 85 | printf("/* This file was generated automatically by fbftoqe */\n\n" 86 | "#include \"qe.h\"\n" 87 | "#include \"fbfrender.h\"\n" 88 | "\n"); 89 | 90 | for (i = 1; i < argc; i++) { 91 | filename = argv[i]; 92 | getname(name, sizeof(name), filename); 93 | font_size[i] = dump_font(filename, name); 94 | } 95 | 96 | /* dump font list */ 97 | printf("const struct fbf_font fbf_fonts[] = {\n"); 98 | for (i = 1; i < argc; i++) { 99 | filename = argv[i]; 100 | getname(name, sizeof(name), filename); 101 | printf(" { font_%s, %d },\n", name, font_size[i]); 102 | } 103 | printf(" { NULL, 0 },\n"); 104 | printf("};\n"); 105 | return 0; 106 | } 107 | -------------------------------------------------------------------------------- /list.c: -------------------------------------------------------------------------------- 1 | /* 2 | * List mode for QEmacs. 3 | * 4 | * Copyright (c) 2001, 2002 Fabrice Bellard. 5 | * Copyright (c) 2002-2013 Charlie Gordon. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #include "qe.h" 23 | 24 | ModeDef list_mode; 25 | 26 | static int list_get_colorized_line(EditState *s, 27 | unsigned int *buf, int buf_size, 28 | int *offsetp, __unused__ int line_num) 29 | { 30 | QEmacsState *qs = s->qe_state; 31 | int offset, len; 32 | 33 | offset = *offsetp; 34 | len = eb_get_line(s->b, buf, buf_size, offsetp); 35 | 36 | if (((qs->active_window == s) || s->force_highlight) && 37 | s->offset >= offset && s->offset < *offsetp) 38 | { 39 | /* highlight the line if the cursor is inside */ 40 | set_color(buf, buf + len, QE_STYLE_HIGHLIGHT); 41 | } else 42 | if (buf[0] == '*') { 43 | /* selection */ 44 | set_color(buf, buf + len, QE_STYLE_SELECTION); 45 | } 46 | return len; 47 | } 48 | 49 | /* get current position (index) in list */ 50 | int list_get_pos(EditState *s) 51 | { 52 | int line, col; 53 | eb_get_pos(s->b, &line, &col, s->offset); 54 | return line; 55 | } 56 | 57 | /* get current offset of the line in list */ 58 | int list_get_offset(EditState *s) 59 | { 60 | int line, col; 61 | eb_get_pos(s->b, &line, &col, s->offset); 62 | return eb_goto_pos(s->b, line, 0); 63 | } 64 | 65 | void list_toggle_selection(EditState *s) 66 | { 67 | int offset; 68 | unsigned char ch; 69 | 70 | offset = list_get_offset(s); 71 | 72 | eb_read(s->b, offset , &ch, 1); 73 | if (ch == ' ') 74 | ch = '*'; 75 | else 76 | ch = ' '; 77 | eb_write(s->b, offset , &ch, 1); 78 | 79 | text_move_up_down(s, 1); 80 | } 81 | 82 | static int list_mode_init(EditState *s, ModeSavedData *saved_data) 83 | { 84 | text_mode_init(s, saved_data); 85 | 86 | s->wrap = WRAP_TRUNCATE; 87 | s->get_colorized_line = list_get_colorized_line; 88 | return 0; 89 | } 90 | 91 | static int list_init(void) 92 | { 93 | memcpy(&list_mode, &text_mode, sizeof(ModeDef)); 94 | list_mode.name = "list"; 95 | list_mode.mode_probe = NULL; 96 | list_mode.mode_init = list_mode_init; 97 | list_mode.mode_flags = MODEF_NOCMD; 98 | 99 | qe_register_mode(&list_mode); 100 | 101 | return 0; 102 | } 103 | 104 | qe_module_init(list_init); 105 | -------------------------------------------------------------------------------- /kmap/Arabic.kmap: -------------------------------------------------------------------------------- 1 | // This kmap file was generated from 2 | // The Experimental Arabic.kmap 3 | // 1998-06-18 Roman Czyborra@cs.tu-berlin.de 4 | // By Gaspar Sinai's perl script ./arabickmap.pl at 2001-12-05. 5 | // 6 | "$=0x064C", // ٌ = ARABIC DAMMATAN 7 | "%=0x064F", // ُ = ARABIC DAMMA 8 | "&=0x0651", // ّ = ARABIC SHADDA 9 | "'=0x064E", // َ = ARABIC FATHA 10 | "*=0x0652", // ْ = ARABIC SUKUN 11 | ",=0x060C", // ، = ARABIC COMMA 12 | "-=0x0640", // ـ = ARABIC TATWEEL 13 | "0x30=0x0660", // ٠ = ARABIC-INDIC DIGIT ZERO 14 | "0x31=0x0661", // ١ = ARABIC-INDIC DIGIT ONE 15 | "0x32=0x0662", // ٢ = ARABIC-INDIC DIGIT TWO 16 | "0x33=0x0663", // ٣ = ARABIC-INDIC DIGIT THREE 17 | "0x34=0x0664", // ٤ = ARABIC-INDIC DIGIT FOUR 18 | "0x35=0x0665", // ٥ = ARABIC-INDIC DIGIT FIVE 19 | "0x36=0x0666", // ٦ = ARABIC-INDIC DIGIT SIX 20 | "0x37=0x0667", // ٧ = ARABIC-INDIC DIGIT SEVEN 21 | "0x38=0x0668", // ٨ = ARABIC-INDIC DIGIT EIGHT 22 | "0x39=0x0669", // ٩ = ARABIC-INDIC DIGIT NINE 23 | ";=0x061B", // ؛ = ARABIC SEMICOLON 24 | "?=0x061F", // ؟ = ARABIC QUESTION MARK 25 | "@=0x0621", // ء = ARABIC LETTER HAMZA 26 | "A=0x0670", // ٰ = ARABIC LETTER SUPERSCRIPT ALEF 27 | "^=0x064B", // ً = ARABIC FATHATAN 28 | "_=0x064D", // ٍ = ARABIC KASRATAN 29 | "`=0x0650", // ِ = ARABIC KASRA 30 | "a=0x0627", // ا = ARABIC LETTER ALEF 31 | "aB=0x0625", // إ = ARABIC LETTER ALEF WITH HAMZA BELOW 32 | "aH=0x0623", // أ = ARABIC LETTER ALEF WITH HAMZA ABOVE 33 | "aM=0x0622", // آ = ARABIC LETTER ALEF WITH MADDA ABOVE 34 | "b=0x0628", // ب = ARABIC LETTER BEH 35 | "c=0x0635", // ص = ARABIC LETTER SAD 36 | "d=0x062F", // د = ARABIC LETTER DAL 37 | "dD=0x0636", // ض = ARABIC LETTER DAD 38 | "dK=0x0630", // ذ = ARABIC LETTER THAL 39 | "e=0x0639", // ع = ARABIC LETTER AIN 40 | "f=0x0641", // ف = ARABIC LETTER FEH 41 | "g=0x062C", // ج = ARABIC LETTER JEEM 42 | "gF=0x06AF", // گ = ARABIC LETTER GAF 43 | "h=0x0647", // ه = ARABIC LETTER HEH 44 | "hH=0x0681", // ځ = ARABIC LETTER HAH WITH HAMZA ABOVE 45 | "hK=0x062D", // ح = ARABIC LETTER HAH 46 | "i=0x063A", // غ = ARABIC LETTER GHAIN 47 | "j=0x0649", // ى = ARABIC LETTER ALEF MAKSURA 48 | "k=0x0643", // ك = ARABIC LETTER KAF 49 | "l=0x0644", // ل = ARABIC LETTER LAM 50 | "m=0x0645", // م = ARABIC LETTER MEEM 51 | "n=0x0646", // ن = ARABIC LETTER NOON 52 | "p=0x067E", // پ = ARABIC LETTER PEH 53 | "q=0x0642", // ق = ARABIC LETTER QAF 54 | "r=0x0631", // ر = ARABIC LETTER REH 55 | "s=0x0633", // س = ARABIC LETTER SEEN 56 | "S=0x0634", // ش = ARABIC LETTER SHEEN 57 | "t=0x062A", // ت = ARABIC LETTER TEH 58 | "tC=0x0686", // چ = ARABIC LETTER TCHEH 59 | "tJ=0x0637", // ط = ARABIC LETTER TAH 60 | "tK=0x062B", // ث = ARABIC LETTER THEH 61 | "tM=0x0629", // ة = ARABIC LETTER TEH MARBUTA 62 | "v=0x06A4", // ڤ = ARABIC LETTER VEH 63 | "w=0x0648", // و = ARABIC LETTER WAW 64 | "wH=0x0624", // ؤ = ARABIC LETTER WAW WITH HAMZA ABOVE 65 | "x=0x062E", // خ = ARABIC LETTER KHAH 66 | "y=0x064A", // ي = ARABIC LETTER YEH 67 | "yH=0x0626", // ئ = ARABIC LETTER YEH WITH HAMZA ABOVE 68 | "z=0x0632", // ز = ARABIC LETTER ZAIN 69 | "zH=0x0638", // ظ = ARABIC LETTER ZAH 70 | "zJ=0x0698", // ژ = ARABIC LETTER JEH 71 | // 72 | // Shaping part using shape.mys. Autogenerated. 73 | // 74 | "l aM=0x0644 0x0622", // لآ LAM ALEF WITH MADDA ABOVE 75 | "l aH=0x0644 0x0623", // لأ LAM ALEF WITH HAMZA ABOVE 76 | "l aB=0x0644 0x0625", // لإ LAM ALEF WITH HAMZA BELOW 77 | "l a=0x0644 0x0627", // لا LAM ALEF 78 | // 79 | // End of shaping part. Autogenerated. 80 | // 81 | -------------------------------------------------------------------------------- /qfribidi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FriBidi - Library of BiDi algorithm 3 | * 4 | * Copyright (C) 1999 Dov Grobgeld 5 | * 6 | * The optimizations to reduce the code size from 13 KB to 3 KB and 7 | * the embed/override hack handling are 8 | * Copyright (C) 2000 Fabrice Bellard. 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Library General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Library General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | */ 24 | 25 | typedef int FriBidiChar; 26 | 27 | typedef enum { 28 | /* do not change the order of these constants since 'property_val' 29 | depends on them */ 30 | FRIBIDI_TYPE_LTR, /* Strong left to right */ 31 | FRIBIDI_TYPE_RTL, /* Right to left characters */ 32 | FRIBIDI_TYPE_WL, /* Weak left to right */ 33 | FRIBIDI_TYPE_WR, /* Weak right to left */ 34 | FRIBIDI_TYPE_EN, /* European digit */ 35 | FRIBIDI_TYPE_ES, /* European number separator */ 36 | FRIBIDI_TYPE_ET, /* European number terminator */ 37 | FRIBIDI_TYPE_AN, /* Arabic digit */ 38 | FRIBIDI_TYPE_CS, /* Common Separator */ 39 | FRIBIDI_TYPE_BS, /* Block separator */ 40 | FRIBIDI_TYPE_SS, /* Segment separator */ 41 | FRIBIDI_TYPE_WS, /* Whitespace */ 42 | FRIBIDI_TYPE_AL, /* Arabic characters */ 43 | FRIBIDI_TYPE_NSM, /* Non spacing mark */ 44 | FRIBIDI_TYPE_BN, 45 | FRIBIDI_TYPE_ON, /* Other Neutral */ 46 | FRIBIDI_TYPE_LRE, /* Left-To-Right embedding */ 47 | FRIBIDI_TYPE_RLE, /* Right-To-Left embedding */ 48 | FRIBIDI_TYPE_PDF, /* Pop directional override */ 49 | FRIBIDI_TYPE_LRO, /* Left-To-Right override */ 50 | FRIBIDI_TYPE_RLO, /* Right-To-Left override */ 51 | 52 | /* The following are only used internally */ 53 | FRIBIDI_TYPE_SOT, 54 | FRIBIDI_TYPE_EOT, 55 | FRIBIDI_TYPE_N, 56 | FRIBIDI_TYPE_E, 57 | FRIBIDI_TYPE_CTL, /* Control units */ 58 | FRIBIDI_TYPE_EO, /* Control units */ 59 | FRIBIDI_TYPE_NULL, /* type record is to be deleted */ 60 | FRIBIDI_TYPE_L = FRIBIDI_TYPE_LTR, 61 | FRIBIDI_TYPE_R = FRIBIDI_TYPE_RTL, 62 | FRIBIDI_TYPE_CM = FRIBIDI_TYPE_ON + 2, 63 | } FriBidiCharType; 64 | 65 | /*====================================================================== 66 | // Typedef for the run-length list. 67 | //----------------------------------------------------------------------*/ 68 | typedef struct _TypeLink { 69 | FriBidiCharType type; 70 | int pos; 71 | int len; 72 | int level; 73 | } TypeLink; 74 | 75 | FriBidiCharType fribidi_get_type(FriBidiChar ch); 76 | FriBidiCharType fribidi_get_type_test(FriBidiChar ch); 77 | FriBidiChar fribidi_get_mirror_char(FriBidiChar ch); 78 | 79 | void fribidi_analyse_string(TypeLink *type_rl_list, 80 | FriBidiCharType *pbase_dir, 81 | int *pmax_level); 82 | -------------------------------------------------------------------------------- /kmap/Greek.kmap: -------------------------------------------------------------------------------- 1 | // 2 | // Greek 3 | // 4 | "'=0x0384", // GREEK TONOS 5 | "u=0x0385", // GREEK DIALYTIKA TONOS Micro 6 | "A'=0x0386", // GREEK CAPITAL LETTER ALPHA WITH TONOS 7 | "..=0x00B7", // MIDDLE DOT 8 | "E'=0x0388", // GREEK CAPITAL LETTER EPSILON WITH TONOS 9 | "H'=0x0389", // GREEK CAPITAL LETTER ETA WITH TONOS 10 | "I'=0x038A", // GREEK CAPITAL LETTER IOTA WITH TONOS 11 | ">>=0x00BB", // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK 12 | "O'=0x038C", // GREEK CAPITAL LETTER OMICRON WITH TONOS 13 | "1/2=0x00BD", 14 | "Y'=0x038E", // GREEK CAPITAL LETTER UPSILON WITH TONOS 15 | "W'=0x038F", // GREEK CAPITAL LETTER OMEGA WITH TONOS 16 | "i:'=0x0390", // GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS 17 | "A=0x0391", // GREEK CAPITAL LETTER ALPHA 18 | "B=0x0392", // GREEK CAPITAL LETTER BETA 19 | "G=0x0393", // GREEK CAPITAL LETTER GAMMA 20 | "D=0x0394", // GREEK CAPITAL LETTER DELTA 21 | "E=0x0395", // GREEK CAPITAL LETTER EPSILON 22 | "Z=0x0396", // GREEK CAPITAL LETTER ZETA 23 | "H=0x0397", // GREEK CAPITAL LETTER ETA 24 | "O~=0x0398", // GREEK CAPITAL LETTER THETA 25 | "I=0x0399", // GREEK CAPITAL LETTER IOTA 26 | "K=0x039A", // GREEK CAPITAL LETTER KAPPA 27 | "L=0x039B", // GREEK CAPITAL LETTER LAMDA 28 | "M=0x039C", // GREEK CAPITAL LETTER MU 29 | "N=0x039D", // GREEK CAPITAL LETTER NU 30 | "X=0x039E", // GREEK CAPITAL LETTER XI 31 | "O=0x039F", // GREEK CAPITAL LETTER OMICRON 32 | "P=0x03A0", // GREEK CAPITAL LETTER PI 33 | "R=0x03A1", // GREEK CAPITAL LETTER RO 34 | "S=0x03A3", // GREEK CAPITAL LETTER SIGMA 35 | "T=0x03A4", // GREEK CAPITAL LETTER TAU 36 | "Y=0x03A5", // GREEK CAPITAL LETTER UPSILON 37 | "F=0x03A6", // GREEK CAPITAL LETTER PHI 38 | "C=0x03A7", // GREEK CAPITAL LETTER CHI 39 | "PS=0x03A8", // GREEK CAPITAL LETTER PSI 40 | "Ps=0x03A8", // GREEK CAPITAL LETTER PSI 41 | "W=0x03A9", // GREEK CAPITAL LETTER OMEGA 42 | "I:=0x03AA", // GREEK CAPITAL LETTER IOTA WITH DIALYTIKA 43 | "Y:=0x03AB", // GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA 44 | "a'=0x03AC", // GREEK SMALL LETTER ALPHA WITH TONOS 45 | "e'=0x03AD", // GREEK SMALL LETTER EPSILON WITH TONOS 46 | "h'=0x03AE", // GREEK SMALL LETTER ETA WITH TONOS 47 | "i'=0x03AF", // GREEK SMALL LETTER IOTA WITH TONOS 48 | "y:'=0x03B0", // GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS 49 | "a=0x03B1", // GREEK SMALL LETTER ALPHA 50 | "b=0x03B2", // GREEK SMALL LETTER BETA 51 | "g=0x03B3", // GREEK SMALL LETTER GAMMA 52 | "d=0x03B4", // GREEK SMALL LETTER DELTA 53 | "e=0x03B5", // GREEK SMALL LETTER EPSILON 54 | "z=0x03B6", // GREEK SMALL LETTER ZETA 55 | "h=0x03B7", // GREEK SMALL LETTER ETA 56 | "o~=0x03B8", // GREEK SMALL LETTER THETA 57 | "i=0x03B9", // GREEK SMALL LETTER IOTA 58 | "k=0x03BA", // GREEK SMALL LETTER KAPPA 59 | "l=0x03BB", // GREEK SMALL LETTER LAMDA 60 | "m=0x03BC", // GREEK SMALL LETTER MU 61 | "n=0x03BD", // GREEK SMALL LETTER NU 62 | "x=0x03BE", // GREEK SMALL LETTER XI 63 | "o=0x03BF", // GREEK SMALL LETTER OMICRON 64 | "p=0x03C0", // GREEK SMALL LETTER PI 65 | "r=0x03C1", // GREEK SMALL LETTER RO 66 | "s=0x03C3", // GREEK SMALL LETTER SIGMA 67 | "t=0x03C4", // GREEK SMALL LETTER TAU 68 | "y=0x03C5", // GREEK SMALL LETTER UPSILON 69 | "f=0x03C6", // GREEK SMALL LETTER PHI 70 | "c=0x03C7", // GREEK SMALL LETTER CHI 71 | "ps=0x03C8", // GREEK SMALL LETTER PSI 72 | "w=0x03C9", // GREEK SMALL LETTER OMEGA 73 | "i:=0x03CA", // GREEK SMALL LETTER IOTA WITH DIALYTIKA 74 | "y:=0x03CB", // GREEK SMALL LETTER UPSILON WITH DIALYTIKA 75 | "o'=0x03CC", // GREEK SMALL LETTER OMICRON WITH TONOS 76 | "y'=0x03CD", // GREEK SMALL LETTER UPSILON WITH TONOS 77 | "w'=0x03CE", // GREEK SMALL LETTER OMEGA WITH TONOS 78 | -------------------------------------------------------------------------------- /qestyles.h: -------------------------------------------------------------------------------- 1 | /* root style, must be complete */ 2 | STYLE_DEF(QE_STYLE_DEFAULT, "default", 3 | QERGB(0xf8, 0xd8, 0xb0), QERGB(0x00, 0x00, 0x00), 4 | QE_FAMILY_FIXED, 12) 5 | 6 | /* system styles */ 7 | STYLE_DEF(QE_STYLE_MODE_LINE, "mode-line", 8 | QERGB(0x00, 0x00, 0x00), QERGB(0xe0, 0xe0, 0xe0), 9 | 0, 0) 10 | STYLE_DEF(QE_STYLE_WINDOW_BORDER, "window-border", 11 | QERGB(0x00, 0x00, 0x00), QERGB(0xe0, 0xe0, 0xe0), 12 | 0, 0) 13 | STYLE_DEF(QE_STYLE_MINIBUF, "minibuf", 14 | QERGB(0xff, 0xff, 0x00), COLOR_TRANSPARENT, 15 | 0, 0) 16 | STYLE_DEF(QE_STYLE_STATUS, "status", 17 | QERGB(0xff, 0xff, 0x00), COLOR_TRANSPARENT, 18 | 0, 0) 19 | 20 | /* default style for HTML/CSS2 pages */ 21 | STYLE_DEF(QE_STYLE_CSS_DEFAULT, "css-default", 22 | QERGB(0x00, 0x00, 0x00), QERGB(0xbb, 0xbb, 0xbb), 23 | QE_FAMILY_SERIF, 12) 24 | 25 | /* coloring styles */ 26 | STYLE_DEF(QE_STYLE_HIGHLIGHT, "highlight", 27 | QERGB(0x00, 0x00, 0x00), QERGB(0xf8, 0xd8, 0xb0), 28 | 0, 0) 29 | STYLE_DEF(QE_STYLE_SELECTION, "selection", 30 | QERGB(0xff, 0xff, 0xff), QERGB(0x00, 0x00, 0xff), 31 | 0, 0) 32 | STYLE_DEF(QE_STYLE_COMMENT, "comment", 33 | QERGB(0xf8, 0x44, 0x00), COLOR_TRANSPARENT, 34 | 0, 0) 35 | STYLE_DEF(QE_STYLE_PREPROCESS, "preprocess", 36 | QERGB(0x00, 0xff, 0xff), COLOR_TRANSPARENT, 37 | 0, 0) 38 | STYLE_DEF(QE_STYLE_STRING, "string", 39 | QERGB(0xf8, 0xa0, 0x78), COLOR_TRANSPARENT, 40 | 0, 0) 41 | STYLE_DEF(QE_STYLE_STRING_Q, "string-q", 42 | QERGB(0xf8, 0xa0, 0x78), COLOR_TRANSPARENT, 43 | 0, 0) 44 | STYLE_DEF(QE_STYLE_KEYWORD, "keyword", 45 | QERGB(0x00, 0xff, 0xff), COLOR_TRANSPARENT, 46 | 0, 0) 47 | STYLE_DEF(QE_STYLE_NUMBER, "number", 48 | QERGB(0xf8, 0xd8, 0xb0), COLOR_TRANSPARENT, 49 | 0, 0) 50 | STYLE_DEF(QE_STYLE_FUNCTION, "function", 51 | QERGB(0x80, 0xcc, 0xf0), COLOR_TRANSPARENT, 52 | 0, 0) 53 | STYLE_DEF(QE_STYLE_VARIABLE, "variable", 54 | QERGB(0xe8, 0xdc, 0x80), COLOR_TRANSPARENT, 55 | 0, 0) 56 | STYLE_DEF(QE_STYLE_TYPE, "type", 57 | QERGB(0x98, 0xf8, 0x98), COLOR_TRANSPARENT, 58 | 0, 0) 59 | STYLE_DEF(QE_STYLE_TAG, "tag", 60 | QERGB(0x00, 0xff, 0xff), COLOR_TRANSPARENT, 61 | 0, 0) 62 | STYLE_DEF(QE_STYLE_CSS, "css", 63 | QERGB(0x98, 0xf8, 0x98), COLOR_TRANSPARENT, 64 | 0, 0) 65 | 66 | /* popup / region styles */ 67 | STYLE_DEF(QE_STYLE_REGION_HILITE, "region-hilite", 68 | COLOR_TRANSPARENT, QERGB(0x80, 0xf0, 0xf0), 69 | 0, 0) 70 | 71 | /* HTML coloring styles */ 72 | STYLE_DEF(QE_STYLE_HTML_COMMENT, "html-comment", 73 | QERGB(0xf8, 0x44, 0x00), COLOR_TRANSPARENT, 74 | 0, 0) 75 | STYLE_DEF(QE_STYLE_HTML_STRING, "html-string", 76 | QERGB(0xf8, 0xa0, 0x78), COLOR_TRANSPARENT, 77 | 0, 0) 78 | STYLE_DEF(QE_STYLE_HTML_SCRIPT, "html-script", 79 | QERGB(0x98, 0xf8, 0x98), COLOR_TRANSPARENT, 80 | 0, 0) 81 | STYLE_DEF(QE_STYLE_HTML_ENTITY, "html-entity", 82 | QERGB(0xe8, 0xdc, 0x80), COLOR_TRANSPARENT, 83 | 0, 0) 84 | STYLE_DEF(QE_STYLE_HTML_TAG, "html-tag", 85 | QERGB(0x80, 0xcc, 0xf0), COLOR_TRANSPARENT, 86 | 0, 0) 87 | -------------------------------------------------------------------------------- /input.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Input method handling for QEmacs. 3 | * 4 | * Copyright (c) 2000 Fabrice Bellard. 5 | * Copyright (c) 2002-2008 Charlie Gordon. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #include "qe.h" 23 | 24 | static int default_input(__unused__ int *match_buf, 25 | __unused__ int match_buf_size, 26 | __unused__ int *match_len_ptr, 27 | __unused__ const u8 *data, 28 | __unused__ const unsigned int *buf, 29 | __unused__ int len) 30 | { 31 | return INPUTMETHOD_NOMATCH; 32 | } 33 | 34 | static int unicode_input(int *match_buf, 35 | int match_buf_size, 36 | int *match_len_ptr, 37 | __unused__ const u8 *data, 38 | const unsigned int *buf, int len) 39 | { 40 | int i, h, c; 41 | if (buf[0] != 'x') 42 | return INPUTMETHOD_NOMATCH; 43 | 44 | c = 0; 45 | if (len > 5) 46 | len = 5; 47 | for (i = 1; i < len; i++) { 48 | h = to_hex(buf[i]); 49 | if (h == -1) 50 | return INPUTMETHOD_NOMATCH; 51 | c = (c << 4) | h; 52 | } 53 | if (len == 5) { 54 | *match_len_ptr = len; 55 | match_buf[0] = c; 56 | return 1; 57 | } else { 58 | return INPUTMETHOD_MORECHARS; 59 | } 60 | } 61 | 62 | static InputMethod default_input_method = { 63 | "default", default_input, NULL, NULL, 64 | }; 65 | 66 | static InputMethod unicode_input_method = { 67 | "unicode", unicode_input, NULL, NULL, 68 | }; 69 | 70 | void register_input_method(InputMethod *m) 71 | { 72 | QEmacsState *qs = &qe_state; 73 | InputMethod **p; 74 | 75 | p = &qs->input_methods; 76 | while (*p != NULL) { 77 | p = &(*p)->next; 78 | } 79 | m->next = NULL; 80 | *p = m; 81 | } 82 | 83 | static void input_completion(CompleteState *cp) 84 | { 85 | QEmacsState *qs = cp->s->qe_state; 86 | InputMethod *m; 87 | 88 | for (m = qs->input_methods; m != NULL; m = m->next) { 89 | complete_test(cp, m->name); 90 | } 91 | } 92 | 93 | static InputMethod *find_input_method(const char *name) 94 | { 95 | QEmacsState *qs = &qe_state; 96 | InputMethod *m; 97 | 98 | for (m = qs->input_methods; m != NULL; m = m->next) { 99 | if (strequal(m->name, name)) 100 | return m; 101 | } 102 | return NULL; 103 | } 104 | 105 | void do_set_input_method(EditState *s, const char *name) 106 | { 107 | InputMethod *m = find_input_method(name); 108 | 109 | if (m) { 110 | s->input_method = m; 111 | s->selected_input_method = m; 112 | } else { 113 | put_status(s, "'%s' not found", name); 114 | } 115 | } 116 | 117 | void do_switch_input_method(EditState *s) 118 | { 119 | if (s->input_method) 120 | s->input_method = NULL; 121 | else 122 | s->input_method = s->selected_input_method; 123 | } 124 | 125 | void init_input_methods(void) 126 | { 127 | register_input_method(&default_input_method); 128 | register_input_method(&unicode_input_method); 129 | register_completion("input", input_completion); 130 | } 131 | -------------------------------------------------------------------------------- /kmap/Dutch.kmap: -------------------------------------------------------------------------------- 1 | // -*-c++-*- 2 | // Dutch.kmap for the Unicode editor Yudit 3 | // 1998-04-17 Roman Czyborra@cs.tu-berlin.de 4 | 5 | // The florin currency symbol used for the Dutch guilder and its 6 | // prospective successor is the Euro: 7 | 8 | "fl.=0x0192", // ƒ = LATIN SMALL LETTER F WITH HOOK 9 | "eur.=0x20AC", // € = EURO SIGN 10 | 11 | // The 25th letter of the Dutch alphabet is the long ij (Y) derived 12 | // from the Old German î. 13 | 14 | "ij=0x0133", // ij = LATIN SMALL LIGATURE IJ 15 | "IJ=0x0132", // IJ = LATIN CAPITAL LIGATURE IJ 16 | 17 | // Whenever a vowel pair such as ei eu ie oe must be spoken as two 18 | // different sounds, Dutch puts a trema on the second letter: 19 | 20 | ":a=0x00e4", // ä = LATIN SMALL LETTER A WITH DIAERESIS 21 | ":e=0x00eb", // ë = LATIN SMALL LETTER E WITH DIAERESIS 22 | ":i=0x00ef", // ï = LATIN SMALL LETTER I WITH DIAERESIS 23 | ":o=0x00f6", // ö = LATIN SMALL LETTER O WITH DIAERESIS 24 | ":u=0x00fc", // ü = LATIN SMALL LETTER U WITH DIAERESIS 25 | ":A=0x00c4", // Ä = LATIN CAPITAL LETTER A WITH DIAERESIS 26 | ":E=0x00cb", // Ë = LATIN CAPITAL LETTER E WITH DIAERESIS 27 | ":I=0x00cf", // Ï = LATIN CAPITAL LETTER I WITH DIAERESIS 28 | ":O=0x00d6", // Ö = LATIN CAPITAL LETTER O WITH DIAERESIS 29 | ":U=0x00dc", // Ü = LATIN CAPITAL LETTER U WITH DIAERESIS 30 | 31 | // Accent aigu is used to mark emphasis on long vowels as in "vóór" 32 | 33 | "a'=0x00e1", // á = LATIN SMALL LETTER A WITH ACUTE 34 | "e'=0x00e9", // é = LATIN SMALL LETTER E WITH ACUTE 35 | "i'=0x00ed", // í = LATIN SMALL LETTER I WITH ACUTE 36 | "o'=0x00f3", // ó = LATIN SMALL LETTER O WITH ACUTE 37 | "u'=0x00fa", // ú = LATIN SMALL LETTER U WITH ACUTE 38 | "A'=0x00c1", // Á = LATIN CAPITAL LETTER A WITH ACUTE 39 | "E'=0x00c9", // É = LATIN CAPITAL LETTER E WITH ACUTE 40 | "I'=0x00cd", // Í = LATIN CAPITAL LETTER I WITH ACUTE 41 | "O'=0x00d3", // Ó = LATIN CAPITAL LETTER O WITH ACUTE 42 | "U'=0x00da", // Ú = LATIN CAPITAL LETTER U WITH ACUTE 43 | 44 | // Accent grave is used to mark emphasis on short vowels, hè? 45 | 46 | "a`=0x00e0", // à = LATIN SMALL LETTER A WITH GRAVE 47 | "e`=0x00e8", // è = LATIN SMALL LETTER E WITH GRAVE 48 | "i`=0x00ec", // ì = LATIN SMALL LETTER I WITH GRAVE 49 | "o`=0x00f2", // ò = LATIN SMALL LETTER O WITH GRAVE 50 | "u`=0x00f9", // ù = LATIN SMALL LETTER U WITH GRAVE 51 | "A`=0x00c0", // À = LATIN CAPITAL LETTER A WITH GRAVE 52 | "E`=0x00c8", // È = LATIN CAPITAL LETTER E WITH GRAVE 53 | "I`=0x00cc", // Ì = LATIN CAPITAL LETTER I WITH GRAVE 54 | "O`=0x00d2", // Ò = LATIN CAPITAL LETTER O WITH GRAVE 55 | "U`=0x00d9", // Ù = LATIN CAPITAL LETTER U WITH GRAVE 56 | 57 | // Dutch contains a lot of French words such as façade, gênant and the 58 | // circumflex is also useful for typing the Frisian minority language: 59 | 60 | "c;=0x00e7", // ç = LATIN SMALL LETTER C WITH CEDILLA 61 | "C;=0x00c7", // Ç = LATIN CAPITAL LETTER C WITH CEDILLA 62 | "a^=0x00e2", // â = LATIN SMALL LETTER A WITH CIRCUMFLEX 63 | "e^=0x00ea", // ê = LATIN SMALL LETTER E WITH CIRCUMFLEX 64 | "i^=0x00ee", // î = LATIN SMALL LETTER I WITH CIRCUMFLEX 65 | "o^=0x00f4", // ô = LATIN SMALL LETTER O WITH CIRCUMFLEX 66 | "u^=0x00fb", // û = LATIN SMALL LETTER U WITH CIRCUMFLEX 67 | "A^=0x00c2", //  = LATIN CAPITAL LETTER A WITH CIRCUMFLEX 68 | "E^=0x00ca", // Ê = LATIN CAPITAL LETTER E WITH CIRCUMFLEX 69 | "I^=0x00ce", // Î = LATIN CAPITAL LETTER I WITH CIRCUMFLEX 70 | "O^=0x00d4", // Ô = LATIN CAPITAL LETTER O WITH CIRCUMFLEX 71 | "U^=0x00db", // Û = LATIN CAPITAL LETTER U WITH CIRCUMFLEX 72 | 73 | // While we're at it, let's follow the example of the Dutch POSIX 74 | // locale which uses ISO-8859-9 to cater to the many Turks in the 75 | // multicultural Dutch society: 76 | 77 | "i;=0x0131", // ı = LATIN SMALL LETTER I WITH NO DOT 78 | "s;=0x015f", // ş = LATIN SMALL LETTER S WITH CEDILLA 79 | "g;=0x011f", // ğ = LATIN SMALL LETTER G WITH BREVE 80 | "I;=0x0130", // İ =LATIN CAPITAL LETTER I WITH DOT ABOVE 81 | "S;=0x015e", // Ş = LATIN CAPITAL LETTER S WITH CEDILLA 82 | "G;=0x011e", // Ğ = LATIN CAPITAL LETTER G WITH BREVE 83 | 84 | -------------------------------------------------------------------------------- /libqhtml/csstoqe.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Convert a CSS style sheet to C buffer so that it can be statically 3 | * linked with qemacs 4 | * 5 | * Copyright (c) 2002 Fabrice Bellard. 6 | * Copyright (c) 2007-2008 Charlie Gordon. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | static int peekc(FILE *f) 28 | { 29 | int c = getc(f); 30 | if (c != EOF) 31 | ungetc(c, f); 32 | return c; 33 | } 34 | 35 | int main(int argc, char **argv) 36 | { 37 | int c, n, last_c, got_space, in_string; 38 | 39 | if (argc < 2) { 40 | fprintf(stderr, "usage: csstoqe array_name\n"); 41 | exit(1); 42 | } 43 | 44 | printf("/* Automatically generated file - do not edit */\n" 45 | "\n" 46 | "#include \"qe.h\"\n" 47 | "#include \"css.h\"\n" 48 | "\n"); 49 | printf("const char %s[] = {\n", argv[1]); 50 | n = 0; 51 | got_space = 0; 52 | last_c = 0; 53 | in_string = 0; 54 | for (;;) { 55 | c = getchar(); 56 | if (c == EOF) 57 | break; 58 | if (!in_string) { 59 | if (c == ' ' || c == '\t' || c == '\n') { 60 | got_space = 1; 61 | continue; 62 | } 63 | /* comments */ 64 | if (c == '/' && peekc(stdin) == '/') { 65 | /* C++ like comment */ 66 | for (;;) { 67 | c = getchar(); 68 | if (c == EOF) 69 | goto the_end; 70 | if (c == '\n') 71 | goto end_comment; 72 | } 73 | } 74 | if (c == '/' && peekc(stdin) == '*') { 75 | /* C like comment */ 76 | getchar(); 77 | for (;;) { 78 | c = getchar(); 79 | if (c == EOF) 80 | goto the_end; 81 | while (c == '*') { 82 | c = getchar(); 83 | if (c == EOF) 84 | goto the_end; 85 | if (c == '/') 86 | goto end_comment; 87 | } 88 | } 89 | end_comment: 90 | got_space = 1; 91 | continue; 92 | } 93 | } 94 | if (n == 0) { 95 | printf(" \""); 96 | } 97 | /* add separator if needed */ 98 | if (!in_string && got_space && isalnum(c) && isalnum(last_c)) { 99 | putchar(' '); 100 | n++; 101 | } 102 | if (c == '\"' || c == '\'' || c == '\\') { 103 | putchar('\\'); 104 | n++; 105 | } 106 | putchar(c); 107 | if (c == '\"') { 108 | /* CG: does not work for ' ' */ 109 | in_string ^= 1; 110 | } 111 | last_c = c; 112 | got_space = 0; 113 | if (++n >= 64) { 114 | printf("\"\n"); 115 | n = 0; 116 | } 117 | } 118 | the_end: 119 | if (n > 0) 120 | printf("\"\n"); 121 | printf("};\n\n"); 122 | return 0; 123 | } 124 | -------------------------------------------------------------------------------- /kmap/HebrewIsraeli.kmap: -------------------------------------------------------------------------------- 1 | # HebewIsraeli.kmap 2 | # yudit keyboard map for windows-1255 (Hebrew with vowels) 3 | # by Michael Radwin 4 | # on 2001-03-05 5 | # Revision: 1.2 6 | # vowels are mapped to \0, \1, \2, .. \9 7 | 8 | "q=0x002F", // SOLIDUS 9 | "w=0x0027", // APOSTROPHE 10 | "e=0x05E7", // HEBREW LETTER QOF 11 | "r=0x05E8", // HEBREW LETTER RESH 12 | "t=0x05D0", // HEBREW LETTER ALEF 13 | "y=0x05D8", // HEBREW LETTER TET 14 | "u=0x05D5", // HEBREW LETTER VAV 15 | "i=0x05DF", // HEBREW LETTER FINAL NUN 16 | "o=0x05DD", // HEBREW LETTER FINAL MEM 17 | "p=0x05E4", // HEBREW LETTER PE 18 | "a=0x05E9", // HEBREW LETTER SHIN 19 | "s=0x05D3", // HEBREW LETTER DALET 20 | "d=0x05D2", // HEBREW LETTER GIMEL 21 | "f=0x05DB", // HEBREW LETTER KAF 22 | "g=0x05E2", // HEBREW LETTER AYIN 23 | "h=0x05D9", // HEBREW LETTER YOD 24 | "j=0x05D7", // HEBREW LETTER HET 25 | "k=0x05DC", // HEBREW LETTER LAMED 26 | "l=0x05DA", // HEBREW LETTER FINAL KAF 27 | ";=0x05E3", // HEBREW LETTER FINAL PE 28 | "'=0x002C", // COMMA 29 | "z=0x05D6", // HEBREW LETTER ZAYIN 30 | "x=0x05E1", // HEBREW LETTER SAMEKH 31 | "c=0x05D1", // HEBREW LETTER BET 32 | "v=0x05D4", // HEBREW LETTER HE 33 | "b=0x05E0", // HEBREW LETTER NUN 34 | "n=0x05DE", // HEBREW LETTER MEM 35 | "m=0x05E6", // HEBREW LETTER TSADI 36 | ",=0x05EA", // HEBREW LETTER TAV 37 | ".=0x05E5", // HEBREW LETTER FINAL TSADI 38 | "/=0x002E", // FULL STOP 39 | "`=0x003B", // SEMICOLON 40 | "E=0x05E7 0x05BC", // HEBREW LETTER QOF, HEBREW POINT DAGESH OR MAPIQ 41 | "R=0x05E8 0x05BC", // HEBREW LETTER RESH, HEBREW POINT DAGESH OR MAPIQ 42 | "Y=0x05D8 0x05BC", // HEBREW LETTER TET, HEBREW POINT DAGESH OR MAPIQ 43 | "U=0x05D5 0x05BC", // HEBREW LETTER VAV, HEBREW POINT DAGESH OR MAPIQ 44 | "I=0x05D5 0x05B9", // HEBREW LETTER VAV, HEBREW POINT HOLAM 45 | "P=0x05E4 0x05BC", // HEBREW LETTER PE, HEBREW POINT DAGESH OR MAPIQ 46 | "A=0x05E9 0x05BC", // HEBREW LETTER SHIN, HEBREW POINT DAGESH OR MAPIQ 47 | "S=0x05D3 0x05BC", // HEBREW LETTER DALET, HEBREW POINT DAGESH OR MAPIQ 48 | "D=0x05D2 0x05BC", // HEBREW LETTER GIMEL, HEBREW POINT DAGESH OR MAPIQ 49 | "F=0x05DB 0x05BC", // HEBREW LETTER KAF, HEBREW POINT DAGESH OR MAPIQ 50 | "H=0x05D9 0x05BC", // HEBREW LETTER YOD, HEBREW POINT DAGESH OR MAPIQ 51 | "K=0x05DC 0x05BC", // HEBREW LETTER LAMED, HEBREW POINT DAGESH OR MAPIQ 52 | "L=0x05DA 0x05BC", // HEBREW LETTER FINAL KAF, HEBREW POINT DAGESH OR MAPIQ 53 | "Z=0x05D6 0x05BC", // HEBREW LETTER ZAYIN, HEBREW POINT DAGESH OR MAPIQ 54 | "X=0x05E1 0x05BC", // HEBREW LETTER SAMEKH, HEBREW POINT DAGESH OR MAPIQ 55 | "C=0x05D1 0x05BC", // HEBREW LETTER BET, HEBREW POINT DAGESH OR MAPIQ 56 | "V=0x05D4 0x05BC", // HEBREW LETTER HE, HEBREW POINT DAGESH OR MAPIQ 57 | "B=0x05E0 0x05BC", // HEBREW LETTER NUN, HEBREW POINT DAGESH OR MAPIQ 58 | "N=0x05DE 0x05BC", // HEBREW LETTER MEM, HEBREW POINT DAGESH OR MAPIQ 59 | "M=0x05E6 0x05BC", // HEBREW LETTER TSADI, HEBREW POINT DAGESH OR MAPIQ 60 | "<=0x05EA 0x05BC", // HEBREW LETTER TAV, HEBREW POINT DAGESH OR MAPIQ 61 | "0x5C `=0x20AA", // NEW SHEQEL SIGN 62 | "0x5C 0x31=0x05B1", // HEBREW POINT HATAF SEGOL 63 | "0x5C 0x32=0x05B3", // HEBREW POINT HATAF QAMATS 64 | "0x5C 0x33=0x05B2", // HEBREW POINT HATAF PATAH 65 | "0x5C 0x34=0x05B6", // HEBREW POINT SEGOL 66 | "0x5C 0x35=0x05B5", // HEBREW POINT TSERE 67 | "0x5C 0x36=0x05B4", // HEBREW POINT HIRIQ 68 | "0x5C 0x37=0x05B0", // HEBREW POINT SHEVA 69 | "0x5C 0x38=0x05B8", // HEBREW POINT QAMATS 70 | "0x5C 0x39=0x05B7", // HEBREW POINT PATAH 71 | "0x5C 0x30=0x05BB", // HEBREW POINT QUBUTS 72 | "0x5C -=0x05BE", // HEBREW PUNCTUATION MAQAF 73 | "0x5C 0x3D=0x05B9", // HEBREW POINT HOLAM 74 | "0x5C [=0x05E9 0x05C2", // HEBREW LETTER SHIN, HEBREW POINT SIN DOT 75 | "0x5C ]=0x05E9 0x05C1", // HEBREW LETTER SHIN, HEBREW POINT SHIN DOT 76 | "0x5C 0x5C=0x05BD", // HEBREW POINT METEG 77 | "0x5C ;=0x05E9 0x05BC 0x05C2", // HEBREW LETTER SHIN, HEBREW POINT DAGESH OR MAPIQ, HEBREW POINT SIN DOT 78 | "0x5C '=0x05E9 0x05BC 0x05C1", // HEBREW LETTER SHIN, HEBREW POINT DAGESH OR MAPIQ, HEBREW POINT SHIN DOT 79 | "0x5C ,=0x003C", // LESS-THAN SIGN 80 | "0x5C .=0x003E", // GREATER-THAN SIGN 81 | "0x5C q=0x05BF", // HEBREW POINT RAFE 82 | 83 | -------------------------------------------------------------------------------- /kmap/Thai.kmap: -------------------------------------------------------------------------------- 1 | // Thai.kmap, v1.0 2 | // GPL (c) 2000 Theppitak Karoonboonyanan 3 | 4 | // Thai keymap for the unicode editor Yudit, 5 | // based on Thai Industrial Standard TIS-820.2538 (1995) 6 | 7 | "d=0x0E01", // THAI CHARACTER KO KAI 8 | "-=0x0E02", // THAI CHARACTER KHO KHAI 9 | "\\=0x0E03", // THAI CHARACTER KHO KHUAT 10 | "0x38=0x0E04", // THAI CHARACTER KHO KHWAI 11 | "|=0x0E05", // THAI CHARACTER KHO KHON 12 | "S=0x0E06", // THAI CHARACTER KHO RAKHANG 13 | "\'=0x0E07", // THAI CHARACTER NGO NGU 14 | "0x30=0x0E08", // THAI CHARACTER CHO CHAN 15 | "C=0x0E09", // THAI CHARACTER CHO CHING 16 | "0x3D=0x0E0A", // THAI CHARACTER CHO CHANG 17 | ":=0x0E0B", // THAI CHARACTER SO SO 18 | "G=0x0E0C", // THAI CHARACTER CHO CHOE 19 | "P=0x0E0D", // THAI CHARACTER YO YING 20 | "E=0x0E0E", // THAI CHARACTER DO CHADA 21 | "D=0x0E0F", // THAI CHARACTER TO PATAK 22 | "{=0x0E10", // THAI CHARACTER THO THAN 23 | "R=0x0E11", // THAI CHARACTER THO NANGMONTHO 24 | "<=0x0E12", // THAI CHARACTER THO PHUTHAO 25 | "I=0x0E13", // THAI CHARACTER NO NEN 26 | "f=0x0E14", // THAI CHARACTER DO DEK 27 | "0x39=0x0E15", // THAI CHARACTER TO TAO 28 | "0x35=0x0E16", // THAI CHARACTER THO THUNG 29 | "m=0x0E17", // THAI CHARACTER THO THAHAN 30 | "T=0x0E18", // THAI CHARACTER THO THONG 31 | "o=0x0E19", // THAI CHARACTER NO NU 32 | "[=0x0E1A", // THAI CHARACTER BO BAIMAI 33 | "x=0x0E1B", // THAI CHARACTER PO PLA 34 | "z=0x0E1C", // THAI CHARACTER PHO PHUNG 35 | "/=0x0E1D", // THAI CHARACTER FO FA 36 | "r=0x0E1E", // THAI CHARACTER PHO PHAN 37 | "a=0x0E1F", // THAI CHARACTER FO FAN 38 | "0x34=0x0E20", // THAI CHARACTER PHO SAMPHAO 39 | ",=0x0E21", // THAI CHARACTER MO MA 40 | "p=0x0E22", // THAI CHARACTER YO YAK 41 | "i=0x0E23", // THAI CHARACTER RO RUA 42 | "A=0x0E24", // THAI CHARACTER RU 43 | "]=0x0E25", // THAI CHARACTER LO LING 44 | "?=0x0E26", // THAI CHARACTER LU 45 | ";=0x0E27", // THAI CHARACTER WO WAEN 46 | "L=0x0E28", // THAI CHARACTER SO SALA 47 | "K=0x0E29", // THAI CHARACTER SO RUSI 48 | "l=0x0E2A", // THAI CHARACTER SO SUA 49 | "s=0x0E2B", // THAI CHARACTER HO HIP 50 | ">=0x0E2C", // THAI CHARACTER LO CHULA 51 | "v=0x0E2D", // THAI CHARACTER O ANG 52 | "V=0x0E2E", // THAI CHARACTER HO NOKHUK 53 | "O=0x0E2F", // THAI CHARACTER PAIYANNOI 54 | "t=0x0E30", // THAI CHARACTER SARA A 55 | "y=0x0E31", // THAI CHARACTER MAI HAN-AKAT 56 | "k=0x0E32", // THAI CHARACTER SARA AA 57 | "e=0x0E33", // THAI CHARACTER SARA AM 58 | "b=0x0E34", // THAI CHARACTER SARA I 59 | "u=0x0E35", // THAI CHARACTER SARA II 60 | "0x37=0x0E36", // THAI CHARACTER SARA UE 61 | "n=0x0E37", // THAI CHARACTER SARA UEE 62 | "0x36=0x0E38", // THAI CHARACTER SARA U 63 | "^=0x0E39", // THAI CHARACTER SARA UU 64 | "B=0x0E3A", // THAI CHARACTER PHINTHU 65 | "0x31=0x0E3F", // THAI CURRENCY SYMBOL BAHT 66 | "g=0x0E40", // THAI CHARACTER SARA E 67 | "c=0x0E41", // THAI CHARACTER SARA AE 68 | "F=0x0E42", // THAI CHARACTER O 69 | ".=0x0E43", // THAI CHARACTER SARA AI MAIMUAN 70 | "w=0x0E44", // THAI CHARACTER SARA AI MAIMALAI 71 | "!=0x0E45", // THAI CHARACTER LAKKHANGYAO 72 | "q=0x0E46", // THAI CHARACTER MAIYAMOK 73 | "H=0x0E47", // THAI CHARACTER MAITAIKHU 74 | "j=0x0E48", // THAI CHARACTER MAI EK 75 | "h=0x0E49", // THAI CHARACTER MAI THO 76 | "U=0x0E4A", // THAI CHARACTER MAI TRI 77 | "J=0x0E4B", // THAI CHARACTER MAI CHATTAWA 78 | "N=0x0E4C", // THAI CHARACTER THANTHAKHAT 79 | "Y=0x0E4D", // THAI CHARACTER NIKHAHIT 80 | "0x26=0x0E4E", // THAI CHARACTER YAMAKKAN 81 | "`=0x0E4F", // THAI CHARACTER FONGMAN 82 | "Q=0x0E50", // THAI DIGIT ZERO 83 | "@=0x0E51", // THAI DIGIT ONE 84 | "#=0x0E52", // THAI DIGIT TWO 85 | "$=0x0E53", // THAI DIGIT THREE 86 | "%=0x0E54", // THAI DIGIT FOUR 87 | "*=0x0E55", // THAI DIGIT FIVE 88 | "(=0x0E56", // THAI DIGIT SIX 89 | ")=0x0E57", // THAI DIGIT SEVEN 90 | "_=0x0E58", // THAI DIGIT EIGHT 91 | "+=0x0E59", // THAI DIGIT NINE 92 | "~=0x0E5B", // THAI CHARACTER KHOMUT 93 | // punctuations 94 | "0x32=0x002F", // SOLIDUS 95 | "0x33=0x002D", // HYPHEN-MINUS 96 | "W=0x0022", // QUOTATION MARK 97 | "}=0x002C", // COMMA 98 | "\"=0x002E", // FULL STOP 99 | "Z=0x0028", // LEFT PARENTHESIS 100 | "X=0x0029", // RIGHT PARENTHESIS 101 | "M=0x003F", // QUESTION MARK 102 | 103 | -------------------------------------------------------------------------------- /cutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various simple C utilities 3 | * 4 | * Copyright (c) 2000-2002 Fabrice Bellard. 5 | * Copyright (c) 2000-2014 Charlie Gordon. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef CUTILS_H 23 | #define CUTILS_H 24 | 25 | #include 26 | 27 | /* These definitions prevent a clash with ffmpeg's cutil module. */ 28 | 29 | #define strstart(str, val, ptr) qe_strstart(str, val, ptr) 30 | #define strend(str, val, ptr) qe_strend(str, val, ptr) 31 | #define pstrcpy(buf, sz, str) qe_pstrcpy(buf, sz, str) 32 | #define pstrcat(buf, sz, str) qe_pstrcat(buf, sz, str) 33 | #define pstrncpy(buf, sz, str, n) qe_pstrncpy(buf, sz, str, n) 34 | 35 | #undef strncpy 36 | #define strncpy(d,s) do_not_use_strncpy!!(d,s) 37 | #undef strtok 38 | #define strtok(str,sep) do_not_use_strtok!!(str,sep) 39 | 40 | int strstart(const char *str, const char *val, const char **ptr); 41 | int strend(const char *str, const char *val, const char **ptr); 42 | char *pstrcpy(char *buf, int buf_size, const char *str); 43 | char *pstrcat(char *buf, int buf_size, const char *s); 44 | char *pstrncpy(char *buf, int buf_size, const char *s, int len); 45 | const char *get_basename(const char *filename); 46 | static inline char *get_basename_nc(char *filename) { 47 | return (char *)get_basename(filename); 48 | } 49 | static inline int get_basename_offset(const char *filename) { 50 | return get_basename(filename) - filename; 51 | } 52 | const char *get_extension(const char *filename); 53 | static inline char *get_extension_nc(char *filename) { 54 | return (char *)get_extension(filename); 55 | } 56 | static inline int get_extension_offset(const char *filename) { 57 | return get_extension(filename) - filename; 58 | } 59 | static inline void strip_extension(char *filename) { 60 | filename[get_extension(filename) - filename] = '\0'; 61 | } 62 | char *get_dirname(char *dest, int size, const char *file); 63 | 64 | /* Double linked lists. Same API as the linux kernel */ 65 | 66 | struct list_head { 67 | struct list_head *next, *prev; 68 | }; 69 | 70 | static inline int list_empty(struct list_head *head) 71 | { 72 | return head->next == head; 73 | } 74 | 75 | static inline void __list_add(struct list_head *elem, 76 | struct list_head *prev, struct list_head *next) 77 | { 78 | next->prev = elem; 79 | elem->next = next; 80 | prev->next = elem; 81 | elem->prev = prev; 82 | } 83 | 84 | static inline void __list_del(struct list_head *prev, struct list_head *next) 85 | { 86 | prev->next = next; 87 | next->prev = prev; 88 | } 89 | 90 | #define LIST_HEAD(name) struct list_head name = { &name, &name } 91 | 92 | /* add at the head */ 93 | #define list_add(elem, head) \ 94 | __list_add((struct list_head *)elem, head, (head)->next); 95 | 96 | /* add at tail */ 97 | #define list_add_tail(elem, head) \ 98 | __list_add((struct list_head *)elem, (head)->prev, head) 99 | 100 | /* delete */ 101 | #define list_del(elem) __list_del(((struct list_head *)elem)->prev, \ 102 | ((struct list_head *)elem)->next) 103 | 104 | #define list_for_each(elem, head) \ 105 | for (elem = (void *)(head)->next; elem != (void *)(head); elem = elem->next) 106 | 107 | #define list_for_each_safe(elem, elem1, head) \ 108 | for (elem = (void *)(head)->next, elem1 = elem->next; elem != (void *)(head); \ 109 | elem = elem1, elem1 = elem->next) 110 | 111 | #define list_for_each_prev(elem, head) \ 112 | for (elem = (void *)(head)->prev; elem != (void *)(head); elem = elem->prev) 113 | 114 | #endif 115 | -------------------------------------------------------------------------------- /kmap/Danish.kmap: -------------------------------------------------------------------------------- 1 | // Danish.kmap for the Unicode editor Yudit 2 | // 1998-04-17 Roman Czyborra@cs.tu-berlin.de 3 | 4 | // Danish letters 5 | // BL: In a few cases, for transcribing foreign names (like frensh), 6 | // oe = oslash may be a problem, but it is the way danes always transcribe it. 7 | 8 | "AA=0x00c5", // Å = LATIN CAPITAL LETTER A WITH RING ABOVE 9 | "AE=0x00c6", // Æ = LATIN CAPITAL LETTER AE 10 | "OE=0x00d8", // Ø = LATIN CAPITAL LETTER O WITH STROKE 11 | "aa=0x00e5", // å = LATIN SMALL LETTER A WITH RING ABOVE 12 | "ae=0x00e6", // æ = LATIN SMALL LETTER AE 13 | "oe=0x00f8", // ø = LATIN SMALL LETTER O WITH STROKE 14 | 15 | // The international currency sign looks like a crown and is thus well 16 | // suited for any Skandinavian krona: 17 | // BL: Please strike this, it is not very good. Kroner = kr. 18 | 19 | // "kr.=0x00A4", // ¤ = CURRENCY SIGN 20 | 21 | // http://domen.uninett.no/~hta/ietf/lang-chars.txt lists the 22 | // following optional Danish accents: 23 | // BL: Dead accents should be used, ppl are used to this. 24 | // See a more updated keymap on 25 | // http://www.dkuug.dk/keld/xkb_latin1.html 26 | 27 | "´A=0x00c1", // Á = LATIN CAPITAL LETTER A WITH ACUTE 28 | "´E=0x00c9", // É = LATIN CAPITAL LETTER E WITH ACUTE 29 | "´I=0x00cd", // Í = LATIN CAPITAL LETTER I WITH ACUTE 30 | "´O=0x00d3", // Ó = LATIN CAPITAL LETTER O WITH ACUTE 31 | "´U=0x00da", // Ú = LATIN CAPITAL LETTER U WITH ACUTE 32 | "´Y=0x00dd", // Ý = LATIN CAPITAL LETTER Y WITH ACUTE 33 | "´a=0x00e1", // á = LATIN SMALL LETTER A WITH ACUTE 34 | "´e=0x00e9", // é = LATIN SMALL LETTER E WITH ACUTE 35 | "´i=0x00ed", // í = LATIN SMALL LETTER I WITH ACUTE 36 | "´o=0x00f3", // ó = LATIN SMALL LETTER O WITH ACUTE 37 | "´u=0x00fa", // ú = LATIN SMALL LETTER U WITH ACUTE 38 | "´y=0x00fd", // ý = LATIN SMALL LETTER Y WITH ACUTE 39 | 40 | // optional Norwegian accents 41 | // BL: Dunno if they are especially norwegian but they are 42 | // potentially useful for writing foreign ppl's names. 43 | // Better to have too many than too few. 44 | 45 | "A<=0x01cd", // Ǎ = LATIN CAPITAL LETTER A WITH CARON 46 | "¸C=0x00c7", // Ç = LATIN CAPITAL LETTER C WITH CEDILLA 47 | "~N=0x00d1", // Ñ = LATIN CAPITAL LETTER N WITH TILDE 48 | "^O=0x00d4", // Ô = LATIN CAPITAL LETTER O WITH CIRCUMFLEX 49 | "¨U=0x00dc", // Ü = LATIN CAPITAL LETTER U WITH DIAERESIS 50 | // for us-ascii-only systems: 51 | ":U=0x00dc", // Ü = LATIN CAPITAL LETTER U WITH DIAERESIS 52 | "a<=0x01ce", // ǎ = LATIN SMALL LETTER A WITH CARON 53 | "¸c=0x00e7", // ç = LATIN SMALL LETTER C WITH CEDILLA 54 | "~n=0x00f1", // ñ = LATIN SMALL LETTER N WITH TILDE 55 | "^o=0x00f4", // ô = LATIN SMALL LETTER O WITH CIRCUMFLEX 56 | "¨u=0x00fc", // ü = LATIN SMALL LETTER U WITH DIAERESIS 57 | // for us-ascii-only systems: 58 | ":u=0x00fc", // ü = LATIN SMALL LETTER U WITH DIAERESIS 59 | 60 | "`A=0x00c0", // À = LATIN CAPITAL LETTER A WITH GRAVE 61 | "`E=0x00c8", // È = LATIN CAPITAL LETTER E WITH GRAVE 62 | "`I=0x00cc", // Ì = LATIN CAPITAL LETTER I WITH GRAVE 63 | "`O=0x00d2", // Ò = LATIN CAPITAL LETTER O WITH GRAVE 64 | "`U=0x00d9", // Ù = LATIN CAPITAL LETTER U WITH GRAVE 65 | "`a=0x00e0", // à = LATIN SMALL LETTER A WITH GRAVE 66 | "`e=0x00e8", // è = LATIN SMALL LETTER E WITH GRAVE 67 | "`i=0x00ec", // ì = LATIN SMALL LETTER I WITH GRAVE 68 | "`o=0x00f2", // ò = LATIN SMALL LETTER O WITH GRAVE 69 | "`u=0x00f9", // ù = LATIN SMALL LETTER U WITH GRAVE 70 | 71 | 72 | // Swedish letters. 73 | // BL: Swedish is the same as danish except o-diaresis is used 74 | // instead of o-slash and a-diaresis instead of a-ring. 75 | 76 | "¨A=0x00c4", // Ä = LATIN CAPITAL LETTER A WITH DIAERESIS 77 | "¨O=0x00d6", // Ö = LATIN CAPITAL LETTER O WITH DIAERESIS 78 | "¨a=0x00e4", // ä = LATIN SMALL LETTER A WITH DIAERESIS 79 | "¨o=0x00f6", // ö = LATIN SMALL LETTER O WITH DIAERESIS 80 | // for us-ascii-only systems: 81 | ":A=0x00c4", // Ä = LATIN CAPITAL LETTER A WITH DIAERESIS 82 | ":O=0x00d6", // Ö = LATIN CAPITAL LETTER O WITH DIAERESIS 83 | ":a=0x00e4", // ä = LATIN SMALL LETTER A WITH DIAERESIS 84 | ":o=0x00f6", // ö = LATIN SMALL LETTER O WITH DIAERESIS 85 | 86 | // Not much missing for Faeroese and Icelandic: 87 | 88 | "D-=0x00d0", // Ð = LATIN CAPITAL LETTER ETH 89 | "d-=0x00f0", // ð = LATIN SMALL LETTER ETH 90 | "T-=0x00de", // Þ = LATIN CAPITAL LETTER THORN 91 | "t-=0x00fe", // þ = LATIN SMALL LETTER THORN 92 | 93 | // Doublequotes. Swedes use «» (or so I've heard), but I prefer doublequotes. 94 | // Uncomment if you feel the same way: 95 | 96 | "«=0x201c", // “ = QUOTEDBLLEFT 97 | "»=0x201d", // ” = QUOTEDBLRIGHT 98 | -------------------------------------------------------------------------------- /kmap/Welsh.kmap: -------------------------------------------------------------------------------- 1 | // Welsh.kmap for the Unicode text editor Yudit 2 | // 2000-10-29 david@sheetmusic.org.uk - improvements welcome 3 | 4 | "A\\=0x00c0", // À = LATIN CAPITAL LETTER A WITH GRAVE 5 | "A/=0x00c1", // Á = LATIN CAPITAL LETTER A WITH ACUTE 6 | "A^=0x00c2", //  = LATIN CAPITAL LETTER A WITH CIRCUMFLEX 7 | "A+=0x00c2", //  = LATIN CAPITAL LETTER A WITH CIRCUMFLEX 8 | "A\"=0x00c4", // Ä = LATIN CAPITAL LETTER A WITH DIAERESIS 9 | "a\\=0x00e0", // à = LATIN SMALL LETTER A WITH GRAVE 10 | "a/=0x00e1", // á = LATIN SMALL LETTER A WITH ACUTE 11 | "a^=0x00e2", // â = LATIN SMALL LETTER A WITH CIRCUMFLEX 12 | "a+=0x00e2", // â = LATIN SMALL LETTER A WITH CIRCUMFLEX 13 | "a\"=0x00e4", // ä = LATIN SMALL LETTER A WITH DIAERESIS 14 | 15 | "E\\=0x00c8", // È = LATIN CAPITAL LETTER E WITH GRAVE 16 | "E/=0x00c9", // É = LATIN CAPITAL LETTER E WITH ACUTE 17 | "E^=0x00ca", // Ê = LATIN CAPITAL LETTER E WITH CIRCUMFLEX 18 | "E+=0x00ca", // Ê = LATIN CAPITAL LETTER E WITH CIRCUMFLEX 19 | "E\"=0x00cb", // Ë = LATIN CAPITAL LETTER E WITH DIAERESIS 20 | "e\\=0x00e8", // è = LATIN SMALL LETTER E WITH GRAVE 21 | "e/=0x00e9", // é = LATIN SMALL LETTER E WITH ACUTE 22 | "e^=0x00ea", // ê = LATIN SMALL LETTER E WITH CIRCUMFLEX 23 | "e+=0x00ea", // ê = LATIN SMALL LETTER E WITH CIRCUMFLEX 24 | "e\"=0x00eb", // ë = LATIN SMALL LETTER E WITH DIAERESIS 25 | 26 | "I\\=0x00cc", // Ì = LATIN CAPITAL LETTER I WITH GRAVE 27 | "I/=0x00cd", // Í = LATIN CAPITAL LETTER I WITH ACUTE 28 | "I^=0x00ce", // Î = LATIN CAPITAL LETTER I WITH CIRCUMFLEX 29 | "I+=0x00ce", // Î = LATIN CAPITAL LETTER I WITH CIRCUMFLEX 30 | "I\"=0x00cf", // Ï = LATIN CAPITAL LETTER I WITH DIAERESIS 31 | "i\\=0x00ec", // ì = LATIN SMALL LETTER I WITH GRAVE 32 | "i/=0x00ed", // í = LATIN SMALL LETTER I WITH ACUTE 33 | "i^=0x00ee", // î = LATIN SMALL LETTER I WITH CIRCUMFLEX 34 | "i+=0x00ee", // î = LATIN SMALL LETTER I WITH CIRCUMFLEX 35 | "i\"=0x00ef", // ï = LATIN SMALL LETTER I WITH DIAERESIS 36 | 37 | "O\\=0x00d2", // Ò = LATIN CAPITAL LETTER O WITH GRAVE 38 | "O/=0x00d3", // Ó = LATIN CAPITAL LETTER O WITH ACUTE 39 | "O^=0x00d4", // Ô = LATIN CAPITAL LETTER O WITH CIRCUMFLEX 40 | "O+=0x00d4", // Ô = LATIN CAPITAL LETTER O WITH CIRCUMFLEX 41 | "O\"=0x00d6", // Ö = LATIN CAPITAL LETTER O WITH DIAERESIS 42 | "o\\=0x00f2", // ò = LATIN SMALL LETTER O WITH GRAVE 43 | "o/=0x00f3", // ó = LATIN SMALL LETTER O WITH ACUTE 44 | "o^=0x00f4", // ô = LATIN SMALL LETTER O WITH CIRCUMFLEX 45 | "o+=0x00f4", // ô = LATIN SMALL LETTER O WITH CIRCUMFLEX 46 | "o\"=0x00f6", // ö = LATIN SMALL LETTER O WITH DIAERESIS 47 | 48 | "U\\=0x00d9", // Ù = LATIN CAPITAL LETTER U WITH GRAVE 49 | "U/=0x00da", // Ú = LATIN CAPITAL LETTER U WITH ACUTE 50 | "U^=0x00db", // Û = LATIN CAPITAL LETTER U WITH CIRCUMFLEX 51 | "U+=0x00db", // Û = LATIN CAPITAL LETTER U WITH CIRCUMFLEX 52 | "U\"=0x00dc", // Ü = LATIN CAPITAL LETTER U WITH DIAERESIS 53 | "u\\=0x00f9", // ù = LATIN SMALL LETTER U WITH GRAVE 54 | "u/=0x00fa", // ú = LATIN SMALL LETTER U WITH ACUTE 55 | "u^=0x00fb", // û = LATIN SMALL LETTER U WITH CIRCUMFLEX 56 | "u+=0x00fb", // û = LATIN SMALL LETTER U WITH CIRCUMFLEX 57 | "u\"=0x00fc", // ü = LATIN SMALL LETTER U WITH DIAERESIS 58 | 59 | "Y\\=0x1ef2", // Ỳ = LATIN CAPITAL LETTER Y WITH GRAVE 60 | "Y/=0x00dd", // Ý = LATIN CAPITAL LETTER Y WITH ACUTE 61 | "Y^=0x0176", // Ŷ = LATIN CAPITAL LETTER Y WITH CIRCUMFLEX 62 | "Y+=0x0176", // Ŷ = LATIN CAPITAL LETTER Y WITH CIRCUMFLEX 63 | "Y\"=0x0178", // Ÿ = LATIN CAPITAL LETTER Y WITH DIAERESIS 64 | "y\\=0x1ef3", // ỳ = LATIN SMALL LETTER Y WITH GRAVE 65 | "y/=0x00fd", // ý = LATIN SMALL LETTER Y WITH ACUTE 66 | "y\"=0x00ff", // ÿ = LATIN SMALL LETTER Y WITH DIAERESIS 67 | "y^=0x0177", // ŷ = LATIN SMALL LETTER Y WITH CIRCUMFLEX 68 | "y+=0x0177", // ŷ = LATIN SMALL LETTER Y WITH CIRCUMFLEX 69 | 70 | "W\\=0x1e80", // Ẁ = LATIN CAPITAL LETTER W WITH GRAVE 71 | "W/=0x1e82", // Ẃ = LATIN CAPITAL LETTER W WITH ACUTE 72 | "W^=0x0174", // Ŵ = LATIN CAPITAL LETTER W WITH CIRCUMFLEX 73 | "W+=0x0174", // Ŵ = LATIN CAPITAL LETTER W WITH CIRCUMFLEX 74 | "W\"=0x1e84", // Ẅ = LATIN CAPITAL LETTER W WITH DIAERESIS 75 | "w\\=0x1e81", // ẁ = LATIN SMALL LETTER W WITH GRAVE 76 | "w/=0x1e83", // ẃ = LATIN SMALL LETTER W WITH ACUTE 77 | "w^=0x0175", // ŵ = LATIN SMALL LETTER W WITH CIRCUMFLEX 78 | "w+=0x0175", // ŵ = LATIN SMALL LETTER W WITH CIRCUMFLEX 79 | "w\"=0x1e85", // ẅ = LATIN SMALL LETTER W WITH DIAERESIS 80 | 81 | // This next one is "hawlfraint" (copyright). Dyma arwyddlun hawlfraint. 82 | "(h)=0x24d7", // ⓗ = CIRCLED LATIN SMALL LETTER H 83 | 84 | -------------------------------------------------------------------------------- /kmap/KOI8_R.kmap: -------------------------------------------------------------------------------- 1 | // Input table for KOI8-R keyboard. Russian-speking people are used to 2 | // "JCUKEN" keyboard (or whatever) that has Xmodmap/Xkbd set up to generate 3 | // KOI8 codes for Cyrillic characters. 4 | 5 | // Composed by Eugene Crosser out of this one: 6 | 7 | // Cyrillic input table following the 1995 edition of international 8 | // standard ISO 9 Transliteration of Cyrillic characters: 9 | 10 | // Created with Emacs for Yudit and decorated with Yudit 11 | // © 1998-04-18 Roman Czyborra@cs.tu-berlin.de 12 | // Additions and improvements welcome 13 | 14 | // 0. Quotation marks and special symbols popular with Cyrillic 15 | 16 | "<<=0x00AB", // « = LEFT-POINTING DOUBLE ANGLE QUOTATION MARK = 17 | ">>=0x00BB", // » = RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK = 18 | ",,=0x201E", // „ = DOUBLE LOW-9 QUOTATION MARK = 19 | "``=0x201C", // “ = LEFT DOUBLE QUOTATION MARK = 20 | 21 | // 1. General table for Slavic Cyrillic languages 22 | 23 | // The neat ISO 9 transliterations are worth remembering! 24 | // First the full line of Capital letters for clarity: 25 | 26 | "0xe1=0x0410", // А = CYRILLIC CAPITAL LETTER A 27 | "0xe2=0x0411", // Б = CYRILLIC CAPITAL LETTER BE 28 | "0xf7=0x0412", // В = CYRILLIC CAPITAL LETTER VE 29 | "0xe7=0x0413", // Г = CYRILLIC CAPITAL LETTER GHE 30 | "0xe4=0x0414", // Д = CYRILLIC CAPITAL LETTER DE 31 | "0xe5=0x0415", // Е = CYRILLIC CAPITAL LETTER IE 32 | "0xb3=0x0401", // Ё = CYRILLIC CAPITAL LETTER IO 33 | "0xf6=0x0416", // Ж = CYRILLIC CAPITAL LETTER ZHE 34 | "0xfa=0x0417", // З = CYRILLIC CAPITAL LETTER ZE 35 | "0xe9=0x0418", // И = CYRILLIC CAPITAL LETTER I 36 | "0xea=0x0419", // Й = CYRILLIC CAPITAL LETTER SHORT I 37 | "0xeb=0x041A", // К = CYRILLIC CAPITAL LETTER KA 38 | "0xec=0x041B", // Л = CYRILLIC CAPITAL LETTER EL 39 | "0xed=0x041C", // М = CYRILLIC CAPITAL LETTER EM 40 | "0xee=0x041D", // Н = CYRILLIC CAPITAL LETTER EN 41 | "0xef=0x041E", // О = CYRILLIC CAPITAL LETTER O 42 | "0xf0=0x041F", // П = CYRILLIC CAPITAL LETTER PE 43 | "0xf2=0x0420", // Р = CYRILLIC CAPITAL LETTER ER 44 | "0xf3=0x0421", // С = CYRILLIC CAPITAL LETTER ES 45 | "0xf4=0x0422", // Т = CYRILLIC CAPITAL LETTER TE 46 | "0xf5=0x0423", // У = CYRILLIC CAPITAL LETTER U 47 | "0xe6=0x0424", // Ф = CYRILLIC CAPITAL LETTER EF 48 | "0xe8=0x0425", // Х = CYRILLIC CAPITAL LETTER HA 49 | "0xe3=0x0426", // Ц = CYRILLIC CAPITAL LETTER TSE 50 | "0xfe=0x0427", // Ч = CYRILLIC CAPITAL LETTER CHE 51 | "0xfb=0x0428", // Ш = CYRILLIC CAPITAL LETTER SHA 52 | "0xfd=0x0429", // Щ = CYRILLIC CAPITAL LETTER SHCHA 53 | "0xff=0x042A", // Ъ = CYRILLIC CAPITAL LETTER HARD SIGN 54 | "0xf9=0x042B", // Ы = CYRILLIC CAPITAL LETTER YERU 55 | "0xf8=0x042C", // Ь = CYRILLIC CAPITAL LETTER SOFT SIGN 56 | "0xfc=0x042D", // Э = CYRILLIC CAPITAL LETTER E 57 | "0xe0=0x042E", // Ю = CYRILLIC CAPITAL LETTER YU 58 | "0xf1=0x042F", // Я = CYRILLIC CAPITAL LETTER YA 59 | 60 | // Then the same thing in lower case: 61 | 62 | "0xc1=0x0430", // а = CYRILLIC SMALL LETTER A 63 | "0xc2=0x0431", // б = CYRILLIC SMALL LETTER BE 64 | "0xd7=0x0432", // в = CYRILLIC SMALL LETTER VE 65 | "0xc7=0x0433", // г = CYRILLIC SMALL LETTER GHE 66 | "0xc4=0x0434", // д = CYRILLIC SMALL LETTER DE 67 | "0xc5=0x0435", // е = CYRILLIC SMALL LETTER IE 68 | "0xa3=0x0451", // ё = CYRILLIC SMALL LETTER IO 69 | "0xd6=0x0436", // ж = CYRILLIC SMALL LETTER ZHE 70 | "0xda=0x0437", // з = CYRILLIC SMALL LETTER ZE 71 | "0xc9=0x0438", // и = CYRILLIC SMALL LETTER I 72 | "0xca=0x0439", // й = CYRILLIC SMALL LETTER SHORT I 73 | "0xcb=0x043A", // к = CYRILLIC SMALL LETTER KA 74 | "0xcc=0x043B", // л = CYRILLIC SMALL LETTER EL 75 | "0xcd=0x043C", // м = CYRILLIC SMALL LETTER EM 76 | "0xce=0x043D", // н = CYRILLIC SMALL LETTER EN 77 | "0xcf=0x043E", // о = CYRILLIC SMALL LETTER O 78 | "0xd0=0x043F", // п = CYRILLIC SMALL LETTER PE 79 | "0xd2=0x0440", // р = CYRILLIC SMALL LETTER ER 80 | "0xd3=0x0441", // с = CYRILLIC SMALL LETTER ES 81 | "0xd4=0x0442", // т = CYRILLIC SMALL LETTER TE 82 | "0xd5=0x0443", // у = CYRILLIC SMALL LETTER U 83 | "0xc6=0x0444", // ф = CYRILLIC SMALL LETTER EF 84 | "0xc8=0x0445", // х = CYRILLIC SMALL LETTER HA 85 | "0xc3=0x0446", // ц = CYRILLIC SMALL LETTER TSE 86 | "0xde=0x0447", // ч = CYRILLIC SMALL LETTER CHE 87 | "0xdb=0x0448", // ш = CYRILLIC SMALL LETTER SHA 88 | "0xdd=0x0449", // щ = CYRILLIC SMALL LETTER SCHCHA 89 | "0xdf=0x044A", // ъ = CYRILLIC SMALL LETTER HARD SIGN 90 | "0xd9=0x044B", // ы = CYRILLIC SMALL LETTER YERU 91 | "0xd8=0x044C", // ь = CYRILLIC SMALL LETTER SOFT SIGN 92 | "0xdc=0x044D", // э = CYRILLIC SMALL LETTER E 93 | "0xc0=0x044E", // ю = CYRILLIC SMALL LETTER YU 94 | "0xd1=0x044F", // я = CYRILLIC SMALL LETTER YA 95 | -------------------------------------------------------------------------------- /script.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Shell script mode for QEmacs. 3 | * 4 | * Copyright (c) 2000-2014 Charlie Gordon. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "qe.h" 22 | 23 | /*---------------- Shell script colors ----------------*/ 24 | 25 | enum { 26 | SCRIPT_TEXT = QE_STYLE_DEFAULT, 27 | SCRIPT_COMMENT = QE_STYLE_COMMENT, 28 | SCRIPT_PREPROCESS = QE_STYLE_PREPROCESS, 29 | SCRIPT_COMMAND = QE_STYLE_FUNCTION, 30 | SCRIPT_VARIABLE = QE_STYLE_TYPE, 31 | SCRIPT_STRING = QE_STYLE_STRING, 32 | SCRIPT_BACKTICK = QE_STYLE_STRING_Q, 33 | }; 34 | 35 | static int script_var(const unsigned int *str, int j, int n) 36 | { 37 | for (; j < n; j++) { 38 | if (qe_isalnum_(str[j]) || str[j] == '-') 39 | continue; 40 | break; 41 | } 42 | return j; 43 | } 44 | 45 | static void script_colorize_line(unsigned int *str, int n, int mode_flags, 46 | int *statep, __unused__ int state_only) 47 | { 48 | int i = 0, j, style; 49 | 50 | style = SCRIPT_COMMAND; 51 | 52 | while (i < n) { 53 | switch (str[i]) { 54 | case '#': 55 | if (i > 0 && str[i - 1] == '$') 56 | break; 57 | style = SCRIPT_COMMENT; 58 | if (str[i + 1] == '!') 59 | style = SCRIPT_PREPROCESS; 60 | SET_COLOR(str, i, n, style); 61 | i = n; 62 | continue; 63 | case '`': 64 | style = SCRIPT_BACKTICK; 65 | goto has_string; 66 | case '\'': 67 | case '"': 68 | style = SCRIPT_STRING; 69 | has_string: 70 | /* parse string const */ 71 | for (j = i + 1; j < n; j++) { 72 | if (str[j] == str[i]) { 73 | j++; 74 | break; 75 | } 76 | } 77 | SET_COLOR(str, i, j, style); 78 | i = j; 79 | continue; 80 | case ' ': 81 | case '\t': 82 | break; 83 | default: 84 | j = script_var(str, i, n); 85 | if (j > i) { 86 | while (qe_isblank(str[j])) 87 | j++; 88 | if (str[j] == '=') 89 | style = SCRIPT_VARIABLE; 90 | SET_COLOR(str, i, j, style); 91 | style = SCRIPT_TEXT; 92 | i = j; 93 | continue; 94 | } 95 | // Should support << syntax 96 | // Should support $ syntax 97 | style = SCRIPT_TEXT; 98 | break; 99 | } 100 | i++; 101 | continue; 102 | } 103 | } 104 | 105 | static int script_mode_probe(ModeDef *mode, ModeProbeData *p) 106 | { 107 | if (match_extension(p->filename, mode->extensions)) 108 | return 80; 109 | 110 | if (p->buf[0] == '#') { 111 | if (p->buf[1] == '!') 112 | return 60; 113 | if (p->buf[1] == ' ') 114 | return 30; 115 | } 116 | return 1; 117 | } 118 | 119 | /* specific script commands */ 120 | static CmdDef script_commands[] = { 121 | CMD_DEF_END, 122 | }; 123 | 124 | static ModeDef script_mode; 125 | 126 | static int script_init(void) 127 | { 128 | /* Shell-script mode is almost like the text mode, so we copy and patch it */ 129 | memcpy(&script_mode, &text_mode, sizeof(ModeDef)); 130 | script_mode.name = "Shell-script"; 131 | script_mode.extensions = "sh|bash|csh|ksh|zsh"; 132 | script_mode.mode_probe = script_mode_probe; 133 | script_mode.colorize_func = script_colorize_line; 134 | 135 | qe_register_mode(&script_mode); 136 | qe_register_cmd_table(script_commands, &script_mode); 137 | 138 | return 0; 139 | } 140 | 141 | qe_module_init(script_init); 142 | -------------------------------------------------------------------------------- /indic.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Indic algorithms for QEmacs. 3 | * 4 | * Copyright (c) 2000 Fabrice Bellard. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "qe.h" 22 | #include "qfribidi.h" 23 | 24 | #define VIRAMA 0x94d 25 | #define RA 0x930 26 | #define RRA 0x931 27 | #define ZERO_WIDTH_JOINER 0x200d 28 | 29 | /* private unicode extensions */ 30 | #define DEAD_CONSONANT_OFFSET 0x10000 31 | #define HALF_OFFSET 0xe000 32 | 33 | #define RA_SUP 0xe97e 34 | #define RA_SUB 0xe97f 35 | #define RRA_HALF 0xe97d 36 | #define RA_DEAD (RA + DEAD_CONSONANT_OFFSET) 37 | 38 | #if 0 39 | static int is_vowel_sign (unsigned int i) 40 | { 41 | return (i >= 0x93E && i <= 0x94c) || (i >= 0x962 && i <= 0x963); 42 | } 43 | #endif 44 | 45 | static int is_consonant (unsigned int i) 46 | { 47 | return (i >= 0x915 && i <= 0x939) || (i >= 0x958 && i <= 0x95f); 48 | } 49 | 50 | static int is_ind_vowel (unsigned int i) 51 | { 52 | return (i >= 0x905 && i <= 0x914); 53 | } 54 | 55 | static int is_dead_consonant(unsigned int i) 56 | { 57 | return (i >= DEAD_CONSONANT_OFFSET && i <= DEAD_CONSONANT_OFFSET + 0x7f); 58 | } 59 | 60 | /* always returns a smaller buffer */ 61 | int devanagari_log2vis(unsigned int *str, unsigned int *ctog, int len) 62 | { 63 | int i, len1, cc, j, k, c; 64 | unsigned int *q, buf[len]; 65 | 66 | /* Rule 1 : dead consonant rule */ 67 | q = buf; 68 | len1 = len - 1; 69 | for (i = 0; i < len; i++) { 70 | cc = str[i]; 71 | if (is_consonant(cc) && i < len1 && str[i+1] == VIRAMA) { 72 | *q++ = cc + DEAD_CONSONANT_OFFSET; 73 | i++; 74 | } else { 75 | *q++ = cc; 76 | } 77 | } 78 | 79 | /************ RA rules */ 80 | /* XXX: rule 3, 4, 7 should be handled as ligatures */ 81 | for (i = 0; i < len1; i++) { 82 | /* Rule 2 */ 83 | if (buf[i] == RA_DEAD && 84 | (is_ind_vowel(buf[i+1]) || is_consonant(buf[i+1]))) { 85 | buf[i] = buf[i+1]; 86 | buf[i+1] = RA_SUP; 87 | } else 88 | /* Rule 5 */ 89 | if (buf[i] == RRA && 90 | buf[i+1] == VIRAMA) { 91 | buf[i] = RRA_HALF; 92 | buf[i+1] = 0; 93 | } else 94 | /* Rule 5a */ 95 | if (buf[i] == RA_DEAD && 96 | buf[i+1] == ZERO_WIDTH_JOINER) { 97 | buf[i] = RRA_HALF; 98 | buf[i+1] = 0; 99 | } else 100 | /* Rule 6 */ 101 | if (is_dead_consonant(buf[i]) && buf[i+1] == RA) { 102 | buf[i] -= DEAD_CONSONANT_OFFSET; 103 | buf[i+1] = RA_SUB; 104 | } else 105 | /* Rule 8 */ 106 | if (is_dead_consonant(buf[i]) && 107 | buf[i+1] == RA_DEAD) { 108 | buf[i] -= DEAD_CONSONANT_OFFSET; 109 | buf[i+1] = RA_SUB; 110 | buf[i+2] = VIRAMA; 111 | } 112 | } 113 | 114 | /* convert dead consonant to half consonants */ 115 | for (i = 0; i < len1; i++) { 116 | if (is_dead_consonant(buf[i]) && 117 | (i == (len1 - 1) || 118 | buf[i+1] == ZERO_WIDTH_JOINER || 119 | is_consonant(buf[i+1]) || 120 | is_dead_consonant(buf[i+1]))) { 121 | buf[i] -= DEAD_CONSONANT_OFFSET + HALF_OFFSET; 122 | } 123 | } 124 | 125 | /* output result and update ctog */ 126 | j = 0; 127 | for (i = 0; i < len; i++) { 128 | c = buf[i]; 129 | if (c != 0) { 130 | ctog[i] = j; 131 | str[j++] = c; 132 | } else { 133 | /* zero: associate it to previous char */ 134 | /* XXX: is it always a good guess ? */ 135 | k = j - 1; 136 | if (k < 0) 137 | k = 0; 138 | ctog[i] = k; 139 | } 140 | } 141 | return j; 142 | } 143 | -------------------------------------------------------------------------------- /lisp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Lisp Source mode for QEmacs. 3 | * 4 | * Copyright (c) 2000-2014 Charlie Gordon. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "qe.h" 22 | 23 | /* TODO: lisp-indent = 2 */ 24 | 25 | /*---------------- Lisp colors ----------------*/ 26 | 27 | #define IN_COMMENT 0x01 28 | #define IN_STRING 0x02 29 | 30 | #define LISP_TEXT QE_STYLE_DEFAULT 31 | #define LISP_COMMENT QE_STYLE_COMMENT 32 | #define LISP_STRING QE_STYLE_STRING 33 | 34 | static void lisp_colorize_line(unsigned int *str, int n, int mode_flags, 35 | int *statep, __unused__ int state_only) 36 | { 37 | int colstate = *statep; 38 | int i = 0, j = 0; 39 | 40 | if (colstate & IN_STRING) { 41 | for (j = i; j < n;) { 42 | if (str[j] == '\\' && ++j < n) { 43 | j++; 44 | } else 45 | if (str[j++] == '"') { 46 | colstate &= ~IN_STRING; 47 | break; 48 | } 49 | } 50 | SET_COLOR(str, i, j, LISP_STRING); 51 | i = j; 52 | } 53 | if (colstate & IN_COMMENT) { 54 | for (j = i; j < n; j++) { 55 | if (str[j] == '|' && j + 1 < n && str[j + 1] == '#') { 56 | j += 2; 57 | colstate &= ~IN_COMMENT; 58 | break; 59 | } 60 | } 61 | SET_COLOR(str, i, j, LISP_COMMENT); 62 | i = j; 63 | } 64 | while (i < n) { 65 | switch (str[i]) { 66 | case ';': 67 | SET_COLOR(str, i, n, LISP_COMMENT); 68 | i = n; 69 | continue; 70 | case '#': 71 | /* check for block comment */ 72 | if (str[i + 1] == '|') { 73 | colstate |= IN_COMMENT; 74 | for (j = i + 2; j < n; j++) { 75 | if (str[j] == '|' && str[j + 1] == '#') { 76 | j += 2; 77 | colstate &= ~IN_COMMENT; 78 | break; 79 | } 80 | } 81 | SET_COLOR(str, i, j, LISP_COMMENT); 82 | i = j; 83 | continue; 84 | } 85 | break; 86 | case '"': 87 | /* parse string const */ 88 | colstate |= IN_STRING; 89 | for (j = i + 1; j < n;) { 90 | if (str[j++] == '"') { 91 | colstate &= ~IN_STRING; 92 | break; 93 | } 94 | } 95 | SET_COLOR(str, i, j, LISP_STRING); 96 | i = j; 97 | continue; 98 | default: 99 | break; 100 | } 101 | i++; 102 | } 103 | *statep = colstate; 104 | } 105 | 106 | #undef IN_STRING 107 | #undef IN_COMMENT 108 | #undef LISP_TEXT 109 | #undef LISP_COMMENT 110 | #undef LISP_STRING 111 | 112 | static int lisp_mode_probe(ModeDef *mode, ModeProbeData *p) 113 | { 114 | /* check file name or extension */ 115 | if (match_extension(p->filename, mode->extensions) 116 | || strstart(p->filename, ".emacs", NULL)) 117 | return 80; 118 | 119 | return 1; 120 | } 121 | 122 | /* specific lisp commands */ 123 | static CmdDef lisp_commands[] = { 124 | CMD_DEF_END, 125 | }; 126 | 127 | ModeDef lisp_mode; 128 | 129 | static int lisp_init(void) 130 | { 131 | /* lisp mode is almost like the text mode, so we copy and patch it */ 132 | memcpy(&lisp_mode, &text_mode, sizeof(ModeDef)); 133 | lisp_mode.name = "Lisp"; 134 | lisp_mode.extensions = "ll|li|lh|lo|lm|lisp|el"; 135 | lisp_mode.mode_probe = lisp_mode_probe; 136 | lisp_mode.colorize_func = lisp_colorize_line; 137 | 138 | qe_register_mode(&lisp_mode); 139 | qe_register_cmd_table(lisp_commands, &lisp_mode); 140 | 141 | return 0; 142 | } 143 | 144 | qe_module_init(lisp_init); 145 | -------------------------------------------------------------------------------- /Changelog: -------------------------------------------------------------------------------- 1 | version 0.3.2dev: 2 | 3 | - Added support for cygwin platform. 4 | - Fixed crash bugs when deleting buffers and windows. 5 | - Added font locking to fix crash bugs in html/css. 6 | 7 | version 0.3.1: 8 | 9 | - SPACE in minibuffer does completion only if a completion method is 10 | defined. 11 | - better C-x k support (initial patch by Manuel Novoa III) 12 | - added set-tab-width, set-indent-width and set-indent-tabs-mode 13 | - probe mode for new file (patch by Manuel Novoa III) 14 | - force blocking mode for tty (patch by Manuel Novoa III) 15 | - improved image mode (full alpha channel support, full conversion, 16 | use improved FFmpeg image conversion routines). 17 | - video mode can change audio and video chanels. 18 | 19 | version 0.3: 20 | 21 | - added Latex mode (Martin Hedenfalk) 22 | - added '/' in directory completion (Martin Hedenfalk) 23 | - fixed offset when loading buffer (Martin Hedenfalk) 24 | - error when loading DLL (Martin Hedenfalk) 25 | - added toggle full screen command (bound to C-x f or f if suitable) 26 | (useful for image/video modes) 27 | - added toggle-mode-line. 28 | - various image/video mode fixes. 29 | - began separating the libqhtml library from the qemacs core 30 | 31 | version 0.3pre13: 32 | 33 | - added FFmpeg based image and audio/video modes. 34 | - added C-o, M-d, M-backspace, C-g for minibuffer exit and space for 35 | completion in minibuffer (thanks to Leigh L. Klotz). 36 | - 'Busy' state is indicated with a 'B' in status (-B:--). 37 | - when installing, 'qemacs' is standard name, and 'qe' is a link. 38 | - added custom configure script. 39 | - added emacs-like quit confirmation (ask to save each file). 40 | - added S-TAB key. 41 | - fixed shell bug if multiple window (tab_size must be set to 8). 42 | - added [down|up]case-[word|region] commands. 43 | - added HebrewIsraeli keymap 44 | 45 | version 0.3pre12: 46 | 47 | - added C-x C-x. 48 | - XML/HTML/CSS2: many bug fixes, improved inline formatting quality. 49 | - improved DocBook support. 50 | - (re)activated full bidi handling in HTML/CSS2 mode. Added support 51 | for RLO/LRO/RLE/LRO/PDF and associated CSS properties. Added 52 | 'bidi-mode' CSS property for bidi algorithm testing. 53 | - added documentation in qe-doc.html. 54 | - added 'set-system-font' configuration command (see config.eg) and 55 | added font fallback support if unknown chars in current font. 56 | - new charset system. Added fully supported 'C-x RET f' to select 57 | buffer charset (without modifying the actual buffer content) and 58 | 'convert-buffer-file-coding-system' to convert the charset of a 59 | buffer to another charset (modify the buffer content). 60 | - added many common charsets including ISO-8859-x, shift JIS and 61 | EUC-JP. 62 | - added double buffer for x11 display. 63 | - (re)activated FBF font renderer for standalone versions. 64 | - added test tool html2png. 65 | 66 | version 0.3pre11: 67 | 68 | - center display on cursor for isearch & replace. Repost key for 69 | isearch (emacs behaviour). 70 | - added XML mode (colorizing of TAGs, javascript and style sheets). 71 | - far better XML/HTML/CSS2 support, including parametric 'content:' property. 72 | - added WYSIWYG DocBook mode (first use of generic CSS2 qemacs 73 | renderer outside HTML mode). 74 | 75 | version 0.3pre10: 76 | 77 | - swapped C-v & M-v (Mark Burton) 78 | - added wheel mouse support (Laurent Charriere) 79 | - added paragraph functions (M-q, M-{, M-}). 80 | - added find-alternate-file (C-x C-v) 81 | - added default path in all file commands. 82 | - selection only changes bg & fg color. 83 | - first HTML selection display code. 84 | - fixed left key handling in column zero. 85 | 86 | version 0.3pre9: 87 | 88 | - css: faster properties handling, added 'content' property and pseudo 89 | selectors, better identifier handling. 90 | - html: added error buffer '*xml-error*'. 91 | 92 | version 0.3pre8: 93 | 94 | - added help (Ctrl-h ...) 95 | - better isearch support (case/word, last search) 96 | - added bufed mode (C-x C-b) 97 | - simplified lists handling & added mouse support 98 | - improved completion (can use mouse & up/down to select entry) 99 | - windows version compiles (still no display) 100 | - added dynamic modules support (optionnal, since it adds many symbols) 101 | 102 | version 0.3pre7: 103 | 104 | - enabled multiple simultaneous shell (use M-x shell several times) 105 | - added X11 mouse handling 106 | - added X11 selection handling 107 | - added buffer flags (readonly, system, savelog) 108 | - added prototype dired mode (C-x C-d) 109 | 110 | version 0.3pre6: 111 | 112 | - small fixes in shell mode. 113 | - compile fixes in x11.c 114 | - reactivated HTML/CSS renderer. 115 | - add TinyC compile script (see qe.tcc) 116 | 117 | version 0.2 - first public release 118 | 119 | version 0.1 - initial alpha release 120 | -------------------------------------------------------------------------------- /libfbf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libfbf.c - FBF font decoder 3 | * 4 | * Copyright (c) 2000, 2001, 2002 Fabrice Bellard. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef LIBFBF_H 22 | #define LIBFBF_H 23 | 24 | typedef struct { 25 | unsigned int magic; 26 | unsigned int version; 27 | unsigned int nb_glyphs; 28 | unsigned int compressed_segment_size; 29 | unsigned int flags; 30 | unsigned short max_width; 31 | unsigned short max_height; 32 | unsigned short x_res; 33 | unsigned short y_res; 34 | unsigned short pt_size; 35 | unsigned short ascent; 36 | unsigned short descent; 37 | unsigned short line_height; 38 | short underline_position; 39 | unsigned short underline_thickness; 40 | unsigned short nb_segments; 41 | unsigned char family_type; 42 | unsigned char dummy; /* align */ 43 | } UnifontHeader; 44 | 45 | #define UNIFONT_MAGIC (('U' << 24) | ('N' << 16) | ('F' << 8) | ('T')) 46 | 47 | /* interval compression model parameters */ 48 | 49 | #define NB_CTX ((1 << 12) * 3 * 3) 50 | #define NB_CTX1 (1 << 10) 51 | 52 | #define MAXDIST 4 53 | 54 | #define MAXWIDTH 128 55 | #define MAXHEIGHT 128 56 | #define MAXWRAP ((MAXWIDTH+7)/8) 57 | 58 | #define WRAP (MAXWIDTH + 2 * MAXDIST) 59 | 60 | /* arith coder parameters */ 61 | #define RANGE_MIN (1 << 10) 62 | 63 | /* flags */ 64 | #define UF_FLAG_HANGUL 0x0001 /* use ad hoc hangul compression */ 65 | 66 | /* family type */ 67 | #define UF_FAMILY_FIXED 0 68 | #define UF_FAMILY_SERIF 1 69 | #define UF_FAMILY_SANS 2 70 | 71 | #define JOHAB_BASE 0x20000 72 | 73 | /* segment cache */ 74 | typedef struct { 75 | short w, h; 76 | short x, y, xincr; 77 | unsigned char *bitmap; 78 | } GlyphEntry; 79 | 80 | struct UniFontData; 81 | 82 | typedef struct UniFontData UniFontData; 83 | 84 | #define CSEG_CACHE_SIZE 8 85 | 86 | typedef struct SegData { 87 | unsigned int start; 88 | unsigned short glyph; 89 | unsigned short size; 90 | } SegData; 91 | 92 | struct UniFontData { 93 | struct UniFontData *next_font; /* can be used by the user to link 94 | to next font */ 95 | int nb_glyphs; /* real number of glyphs */ 96 | int nb_glyphs_total; /* total number, including algorithmically 97 | generated ones */ 98 | unsigned int flags; 99 | int compressed_segment_size; 100 | int max_width, max_height; /* maximum dimensions of bitmaps */ 101 | int x_res, y_res, pt_size; 102 | int ascent, descent, line_height; 103 | int underline_position; /* in 64th pixel */ 104 | int underline_thickness; /* in 64th pixel */ 105 | char family_name[64]; 106 | int family_type; 107 | /* compressed segments offsets */ 108 | int nb_csegs; 109 | int *csegs_offsets; 110 | int *msegs_offsets; 111 | /* compressed segment cache */ 112 | struct GlyphSegment *cseg_cache[CSEG_CACHE_SIZE]; 113 | 114 | /* segments */ 115 | /* XXX: allocation */ 116 | int nb_segs; 117 | SegData *seg_table; 118 | 119 | /* memory functions */ 120 | void *mem_opaque; 121 | void *(*fbf_malloc)(void *mem_opaque, int size); 122 | void (*fbf_free)(void *mem_opaque, void *ptr); 123 | 124 | /* file input handlings */ 125 | void *infile; 126 | int (*fbf_seek)(void *infile, long pos); 127 | int (*fbf_read)(void *infile, unsigned char *buf, int len); 128 | int (*fbf_getc)(void *infile); 129 | 130 | /* bit buffer handling */ 131 | int bitbuf; 132 | int bitcnt; 133 | unsigned char ctx1[NB_CTX1]; 134 | /* arithmetic decoder */ 135 | unsigned int alow, arange, adata; 136 | 137 | /* temporary bitmap for composite glyph decoding */ 138 | unsigned char tmp_buffer[MAXWRAP * MAXHEIGHT]; 139 | GlyphEntry tmp_glyph_entry; 140 | }; 141 | 142 | typedef struct GlyphSegment { 143 | int first_glyph; 144 | int nb_glyphs; 145 | int use_count; 146 | unsigned char *bitmap_table; 147 | GlyphEntry metrics[1]; 148 | } GlyphSegment; 149 | 150 | int fbf_load_font(UniFontData *uf); 151 | void fbf_free_font(UniFontData *uf); 152 | 153 | int fbf_unicode_to_glyph(UniFontData *uf, int code); 154 | int fbf_decode_glyph(UniFontData *uf, 155 | GlyphEntry **glyph_entry_ptr, 156 | int index); 157 | 158 | #endif 159 | -------------------------------------------------------------------------------- /tests/colours.txt: -------------------------------------------------------------------------------- 1 | Test of most colour rendering. Omits the SCO fg and bg sequences, 2 | since they are destructive. 3 | Normal text and bold; reverse video and bold 4 | ANSI plus bold: 0 bold 1 bold 2 bold 3 bold 4 bold 5 bold 6 bold 7 bold 5 | xterm normal: fg0 bg0 fg1 bg1 fg2 bg2 fg3 bg3 fg4 bg4 fg5 bg5 fg6 bg6 fg7 bg7 6 | xterm bright: fg0 bg0 fg1 bg1 fg2 bg2 fg3 bg3 fg4 bg4 fg5 bg5 fg6 bg6 fg7 bg7 7 | xterm 256: 8 |  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 |  16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 10 |  32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 11 |  48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 12 |  64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 13 |  80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 14 |  96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 15 |  112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 16 |  128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 17 |  144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 18 |  160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 19 |  176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 20 |  192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 21 |  208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 22 |  224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 23 |  240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 24 | -------------------------------------------------------------------------------- /cp/README: -------------------------------------------------------------------------------- 1 | Charset Mapping files from unicode.org: 2 | 3 | http://www.unicode.org/Public/MAPPINGS/ISO8859/ 4 | 5 | 10592 Feb 27 2001 8859-1.TXT 6 | 10816 Feb 27 2001 8859-2.TXT 7 | 10498 Feb 27 2001 8859-3.TXT 8 | 10792 Feb 27 2001 8859-4.TXT 9 | 10427 Feb 27 2001 8859-5.TXT 10 | 8308 Feb 27 2001 8859-6.TXT 11 | 10582 Jan 27 2004 8859-7.TXT 12 | 8553 Feb 27 2001 8859-8.TXT 13 | 10628 Feb 27 2001 8859-9.TXT 14 | 10989 Feb 27 2001 8859-10.TXT 15 | 9730 Oct 8 2002 8859-11.TXT 16 | 10588 Feb 27 2001 8859-13.TXT 17 | 11021 Mar 3 2004 8859-14.TXT 18 | 10601 Mar 3 2004 8859-15.TXT 19 | 10886 Mar 3 2004 8859-16.TXT 20 | 21 | http://www.unicode.org/Public/MAPPINGS/ETSI/ 22 | 23 | 9253 Mar 3 2004 GSM0338.TXT 24 | 25 | http://www.unicode.org/Public/MAPPINGS/VENDORS/NEXT/ 26 | 27 | 7093 Jun 21 2005 NEXTSTEP.TXT 28 | 29 | http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ 30 | 31 | 24830 Apr 5 2005 ARABIC.TXT 32 | 13008 Apr 6 2005 CELTIC.TXT 33 | 13065 Apr 5 2005 CENTEURO.TXT 34 | 197055 Apr 5 2005 CHINSIMP.TXT 35 | 323716 Apr 5 2005 CHINTRAD.TXT 36 | 26610 Apr 5 2005 CORPCHAR.TXT 37 | 13388 Apr 5 2005 CROATIAN.TXT 38 | 13497 Apr 5 2005 CYRILLIC.TXT 39 | 17540 Apr 5 2005 DEVANAGA.TXT 40 | 14320 Apr 5 2005 DINGBATS.TXT 41 | 23987 Apr 5 2005 FARSI.TXT 42 | 14055 Apr 6 2005 GAELIC.TXT 43 | 14042 Apr 5 2005 GREEK.TXT 44 | 13940 Apr 5 2005 GUJARATI.TXT 45 | 16096 Apr 5 2005 GURMUKHI.TXT 46 | 27034 Apr 5 2005 HEBREW.TXT 47 | 14021 Apr 5 2005 ICELAND.TXT 48 | 11800 Apr 6 2005 INUIT.TXT 49 | 198175 Apr 5 2005 JAPANESE.TXT 50 | 10252 Apr 5 2005 KEYBOARD.TXT 51 | 369061 Apr 5 2005 KOREAN.TXT 52 | 14385 Apr 5 2005 ROMAN.TXT 53 | 14153 Apr 5 2005 ROMANIAN.TXT 54 | 16882 Apr 5 2005 SYMBOL.TXT 55 | 15564 Apr 6 2005 THAI.TXT 56 | 12808 Apr 6 2005 TURKISH.TXT 57 | 4624 Apr 6 2005 UKRAINE.TXT 58 | 59 | http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/ 60 | 61 | 9000 Nov 22 2006 CP037.TXT 62 | 9012 Nov 22 2006 CP1026.TXT 63 | 9027 Nov 22 2006 CP500.TXT 64 | 8721 Nov 22 2006 CP875.TXT 65 | 66 | http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/ 67 | 68 | 9177 Nov 22 2006 CYRILLIC.TXT 69 | 9413 Nov 22 2006 GREEK.TXT 70 | 9253 Nov 22 2006 ICELAND.TXT 71 | 9862 Nov 22 2006 LATIN2.TXT 72 | 9229 Nov 22 2006 ROMAN.TXT 73 | 9251 Nov 22 2006 TURKISH.TXT 74 | 75 | http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/ 76 | 77 | 9794 Nov 22 2006 CP437.TXT 78 | 9827 Nov 22 2006 CP737.TXT 79 | 9766 Nov 22 2006 CP775.TXT 80 | 9640 Nov 22 2006 CP850.TXT 81 | 9939 Nov 22 2006 CP852.TXT 82 | 9562 Nov 22 2006 CP855.TXT 83 | 9617 Nov 22 2006 CP857.TXT 84 | 9845 Nov 22 2006 CP860.TXT 85 | 9826 Nov 22 2006 CP861.TXT 86 | 9396 Nov 22 2006 CP862.TXT 87 | 9693 Nov 22 2006 CP863.TXT 88 | 9560 Nov 22 2006 CP864.TXT 89 | 9812 Nov 22 2006 CP865.TXT 90 | 9765 Nov 22 2006 CP866.TXT 91 | 9318 Nov 22 2006 CP869.TXT 92 | 8452 Nov 22 2006 CP874.TXT 93 | 94 | http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/ 95 | 96 | 9530 Nov 22 2006 CP1250.TXT 97 | 9205 Nov 22 2006 CP1251.TXT 98 | 9355 Nov 22 2006 CP1252.TXT 99 | 8938 Nov 22 2006 CP1253.TXT 100 | 9346 Nov 22 2006 CP1254.TXT 101 | 8304 Nov 22 2006 CP1255.TXT 102 | 8657 Nov 22 2006 CP1256.TXT 103 | 9218 Nov 22 2006 CP1257.TXT 104 | 9208 Nov 22 2006 CP1258.TXT 105 | 8439 Nov 22 2006 CP874.TXT 106 | 295324 Nov 22 2006 CP932.TXT 107 | 817310 Nov 22 2006 CP936.TXT 108 | 790736 Nov 22 2006 CP949.TXT 109 | 508978 Nov 22 2006 CP950.TXT 110 | 111 | http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/ 112 | 113 | 12128 Dec 29 2005 APL-ISO-IR-68.TXT 114 | 15279 May 7 2005 ATARIST.TXT 115 | 10895 Feb 27 2001 CP1006.TXT 116 | 8978 Feb 27 2001 CP424.TXT 117 | 9281 Feb 27 2001 CP856.TXT 118 | 3748 Feb 27 2001 IBMGRAPH.TXT 119 | 11204 Feb 27 2001 KOI8-R.TXT 120 | 49569 Apr 8 2002 SGML.TXT 121 | 7054 May 3 2003 US-ASCII-QUOTES.TXT 122 | 123 | http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/ 124 | 125 | 7949 Aug 1 2001 JIS0201.TXT 126 | 211650 Aug 1 2001 JIS0208.TXT 127 | 144386 Aug 1 2001 JIS0212.TXT 128 | 169236 Aug 1 2001 SHIFTJIS.TXT 129 | 130 | http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/ 131 | 132 | 295324 Nov 22 2006 CP932.TXT 133 | 134 | From yudit-1.6 sources: 135 | 136 | 12378 Nov 30 1999 VISCII.TXT (from yudit-1.6/data/VISCII.txt) 137 | 11911 Jan 9 2001 TCVN.TXT (from yudit-1.6/data/tcvn.txt) 138 | 139 | Code page files from Links browser source code: 140 | 141 | Mar 29 2000 links-0.99+1.00pre12/Unicode 142 | Apr 13 2002 links-2.1pre2/Unicode 143 | Jan 7 2004 links2-2.1pre26/Unicode 144 | 145 | *.cp 146 | 147 | cp1125.cp from lynx or glibc data 148 | 149 | glibc-2.3.5/localedata/charmaps/CP1125 150 | glibc-2.3.5/iconvdata/cp1125.c 151 | 152 | From yudit-2.8.1 sources: 153 | 154 | 11911 Aug 26 2002 TCVN.TXT (from yudit-2.8.1/mytool/uni/tcvn.txt) 155 | 156 | From http://x0213.org/codetable 157 | 158 | 324225 May 13 2006 euc-jis-2004-std.txt 159 | 314317 May 22 2006 iso-2022-jp-2004-std.txt 160 | 311985 May 22 2006 jisx0213-2004-std.txt 161 | 319186 May 13 2006 sjis-0213-2004-std.txt 162 | -------------------------------------------------------------------------------- /kmap/XKB_iso8859-4.kmap: -------------------------------------------------------------------------------- 1 | // Translation of XKB Latin 4 input for yudit editor. 2 | // Can be used for Lithuanian group of Lithuanian keymap. 3 | // 1999 5 12 Ričardas Čepas http://www.angelfire.com/me/rch/ll.html 4 | // Set environment variables _XKB_CHARSET=iso8859-4 XKB_FORCE=1 5 | // Do not disable XKB extention - if XKB_DEBUG is set you should see message OK 6 | 7 | 8 | "0xA0=0x00A0", // NO-BREAK SPACE 9 | "0xA1=0x0104", // LATIN CAPITAL LETTER A WITH OGONEK 10 | "0xA2=0x0138", // LATIN SMALL LETTER KRA (Greenlandic) 11 | "0xA3=0x0156", // LATIN CAPITAL LETTER R WITH CEDILLA 12 | "0xA4=0x00A4", // CURRENCY SIGN 13 | "0xA5=0x0128", // LATIN CAPITAL LETTER I WITH TILDE 14 | "0xA6=0x013B", // LATIN CAPITAL LETTER L WITH CEDILLA 15 | "0xA7=0x00A7", // SECTION SIGN 16 | "0xA8=0x00A8", // DIAERESIS 17 | "0xA9=0x0160", // LATIN CAPITAL LETTER S WITH CARON 18 | "0xAA=0x0112", // LATIN CAPITAL LETTER E WITH MACRON 19 | "0xAB=0x0122", // LATIN CAPITAL LETTER G WITH CEDILLA 20 | "0xAC=0x0166", // LATIN CAPITAL LETTER T WITH STROKE 21 | "0xAD=0x00AD", // SOFT HYPHEN 22 | "0xAE=0x017D", // LATIN CAPITAL LETTER Z WITH CARON 23 | "0xAF=0x00AF", // MACRON 24 | "0xB0=0x00B0", // DEGREE SIGN 25 | "0xB1=0x0105", // LATIN SMALL LETTER A WITH OGONEK 26 | "0xB2=0x02DB", // OGONEK 27 | "0xB3=0x0157", // LATIN SMALL LETTER R WITH CEDILLA 28 | "0xB4=0x00B4", // ACUTE ACCENT 29 | "0xB5=0x0129", // LATIN SMALL LETTER I WITH TILDE 30 | "0xB6=0x013C", // LATIN SMALL LETTER L WITH CEDILLA 31 | "0xB7=0x02C7", // CARON (Mandarin Chinese third tone) 32 | "0xB8=0x00B8", // CEDILLA 33 | "0xB9=0x0161", // LATIN SMALL LETTER S WITH CARON 34 | "0xBA=0x0113", // LATIN SMALL LETTER E WITH MACRON 35 | "0xBB=0x0123", // LATIN SMALL LETTER G WITH CEDILLA 36 | "0xBC=0x0167", // LATIN SMALL LETTER T WITH STROKE 37 | "0xBD=0x014A", // LATIN CAPITAL LETTER ENG (Sami) 38 | "0xBE=0x017E", // LATIN SMALL LETTER Z WITH CARON 39 | "0xBF=0x014B", // LATIN SMALL LETTER ENG (Sami) 40 | "0xC0=0x0100", // LATIN CAPITAL LETTER A WITH MACRON 41 | "0xC1=0x00C1", // LATIN CAPITAL LETTER A WITH ACUTE 42 | "0xC2=0x00C2", // LATIN CAPITAL LETTER A WITH CIRCUMFLEX 43 | "0xC3=0x00C3", // LATIN CAPITAL LETTER A WITH TILDE 44 | "0xC4=0x00C4", // LATIN CAPITAL LETTER A WITH DIAERESIS 45 | "0xC5=0x00C5", // LATIN CAPITAL LETTER A WITH RING ABOVE 46 | "0xC6=0x00C6", // LATIN CAPITAL LETTER AE 47 | "0xC7=0x012E", // LATIN CAPITAL LETTER I WITH OGONEK 48 | "0xC8=0x010C", // LATIN CAPITAL LETTER C WITH CARON 49 | "0xC9=0x00C9", // LATIN CAPITAL LETTER E WITH ACUTE 50 | "0xCA=0x0118", // LATIN CAPITAL LETTER E WITH OGONEK 51 | "0xCB=0x00CB", // LATIN CAPITAL LETTER E WITH DIAERESIS 52 | "0xCC=0x0116", // LATIN CAPITAL LETTER E WITH DOT ABOVE 53 | "0xCD=0x00CD", // LATIN CAPITAL LETTER I WITH ACUTE 54 | "0xCE=0x00CE", // LATIN CAPITAL LETTER I WITH CIRCUMFLEX 55 | "0xCF=0x012A", // LATIN CAPITAL LETTER I WITH MACRON 56 | "0xD0=0x0110", // LATIN CAPITAL LETTER D WITH STROKE 57 | "0xD1=0x0145", // LATIN CAPITAL LETTER N WITH CEDILLA 58 | "0xD2=0x014C", // LATIN CAPITAL LETTER O WITH MACRON 59 | "0xD3=0x0136", // LATIN CAPITAL LETTER K WITH CEDILLA 60 | "0xD4=0x00D4", // LATIN CAPITAL LETTER O WITH CIRCUMFLEX 61 | "0xD5=0x00D5", // LATIN CAPITAL LETTER O WITH TILDE 62 | "0xD6=0x00D6", // LATIN CAPITAL LETTER O WITH DIAERESIS 63 | "0xD7=0x00D7", // MULTIPLICATION SIGN 64 | "0xD8=0x00D8", // LATIN CAPITAL LETTER O WITH STROKE 65 | "0xD9=0x0172", // LATIN CAPITAL LETTER U WITH OGONEK 66 | "0xDA=0x00DA", // LATIN CAPITAL LETTER U WITH ACUTE 67 | "0xDB=0x00DB", // LATIN CAPITAL LETTER U WITH CIRCUMFLEX 68 | "0xDC=0x00DC", // LATIN CAPITAL LETTER U WITH DIAERESIS 69 | "0xDD=0x0168", // LATIN CAPITAL LETTER U WITH TILDE 70 | "0xDE=0x016A", // LATIN CAPITAL LETTER U WITH MACRON 71 | "0xDF=0x00DF", // LATIN SMALL LETTER SHARP S (German) 72 | "0xE0=0x0101", // LATIN SMALL LETTER A WITH MACRON 73 | "0xE1=0x00E1", // LATIN SMALL LETTER A WITH ACUTE 74 | "0xE2=0x00E2", // LATIN SMALL LETTER A WITH CIRCUMFLEX 75 | "0xE3=0x00E3", // LATIN SMALL LETTER A WITH TILDE 76 | "0xE4=0x00E4", // LATIN SMALL LETTER A WITH DIAERESIS 77 | "0xE5=0x00E5", // LATIN SMALL LETTER A WITH RING ABOVE 78 | "0xE6=0x00E6", // LATIN SMALL LETTER AE 79 | "0xE7=0x012F", // LATIN SMALL LETTER I WITH OGONEK 80 | "0xE8=0x010D", // LATIN SMALL LETTER C WITH CARON 81 | "0xE9=0x00E9", // LATIN SMALL LETTER E WITH ACUTE 82 | "0xEA=0x0119", // LATIN SMALL LETTER E WITH OGONEK 83 | "0xEB=0x00EB", // LATIN SMALL LETTER E WITH DIAERESIS 84 | "0xEC=0x0117", // LATIN SMALL LETTER E WITH DOT ABOVE 85 | "0xED=0x00ED", // LATIN SMALL LETTER I WITH ACUTE 86 | "0xEE=0x00EE", // LATIN SMALL LETTER I WITH CIRCUMFLEX 87 | "0xEF=0x012B", // LATIN SMALL LETTER I WITH MACRON 88 | "0xF0=0x0111", // LATIN SMALL LETTER D WITH STROKE 89 | "0xF1=0x0146", // LATIN SMALL LETTER N WITH CEDILLA 90 | "0xF2=0x014D", // LATIN SMALL LETTER O WITH MACRON 91 | "0xF3=0x0137", // LATIN SMALL LETTER K WITH CEDILLA 92 | "0xF4=0x00F4", // LATIN SMALL LETTER O WITH CIRCUMFLEX 93 | "0xF5=0x00F5", // LATIN SMALL LETTER O WITH TILDE 94 | "0xF6=0x00F6", // LATIN SMALL LETTER O WITH DIAERESIS 95 | "0xF7=0x00F7", // DIVISION SIGN 96 | "0xF8=0x00F8", // LATIN SMALL LETTER O WITH STROKE 97 | "0xF9=0x0173", // LATIN SMALL LETTER U WITH OGONEK 98 | "0xFA=0x00FA", // LATIN SMALL LETTER U WITH ACUTE 99 | "0xFB=0x00FB", // LATIN SMALL LETTER U WITH CIRCUMFLEX 100 | "0xFC=0x00FC", // LATIN SMALL LETTER U WITH DIAERESIS 101 | "0xFD=0x0169", // LATIN SMALL LETTER U WITH TILDE 102 | "0xFE=0x016B", // LATIN SMALL LETTER U WITH MACRON 103 | "0xFF=0x02D9", // DOT ABOVE (Mandarin Chinese light tone) 104 | -------------------------------------------------------------------------------- /mpeg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * MPEG mode for QEmacs. 3 | * 4 | * Copyright (c) 2001 Fabrice Bellard. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "qe.h" 22 | 23 | #define SEQ_END_CODE 0x000001b7 24 | #define SEQ_START_CODE 0x000001b3 25 | #define GOP_START_CODE 0x000001b8 26 | #define PICTURE_START_CODE 0x00000100 27 | #define SLICE_MIN_START_CODE 0x00000101 28 | #define SLICE_MAX_START_CODE 0x000001af 29 | #define EXT_START_CODE 0x000001b5 30 | #define USER_START_CODE 0x000001b2 31 | 32 | #define PACK_START_CODE 0x000001ba 33 | #define SYSTEM_HEADER_START_CODE 0x000001bb 34 | #define ISO_11172_END_CODE 0x000001b9 35 | 36 | static int mpeg_display(EditState *s, DisplayState *ds, int offset) 37 | { 38 | unsigned int startcode; 39 | int ret, badchars, offset_start; 40 | unsigned char buf[4]; 41 | 42 | /* search start code */ 43 | 44 | badchars = 0; 45 | 46 | display_bol(ds); 47 | display_printf(ds, -1, -1, "%08x:", offset); 48 | for (;;) { 49 | ret = eb_read(s->b, offset, buf, 4); 50 | if (ret == 0) { 51 | if (badchars) 52 | display_eol(ds, -1, -1); 53 | goto the_end; 54 | } 55 | 56 | if (ret == 4) { 57 | startcode = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; 58 | if ((startcode & 0xffffff00) == 0x00000100) { 59 | if (badchars) { 60 | display_eol(ds, -1, -1); 61 | display_bol(ds); 62 | display_printf(ds, -1, -1, "%08x:", offset); 63 | } 64 | break; 65 | } 66 | } 67 | /* display unknown chars */ 68 | display_printf(ds, -1, -1, " ["); 69 | display_printhex(ds, offset, offset + 1, buf[0], 2); 70 | display_printf(ds, -1, -1, "]"); 71 | offset++; 72 | if (++badchars == 8) { 73 | badchars = 0; 74 | display_eol(ds, -1, -1); 75 | goto the_end; 76 | } 77 | } 78 | offset_start = offset; 79 | offset += 4; 80 | display_printf(ds, offset_start, offset, " [%08x] ", startcode); 81 | 82 | switch (startcode) { 83 | case SEQ_END_CODE: 84 | display_printf(ds, -1, -1, "SEQ_END"); 85 | break; 86 | case SEQ_START_CODE: 87 | display_printf(ds, -1, -1, "SEQUENCE"); 88 | break; 89 | case PICTURE_START_CODE: 90 | display_printf(ds, -1, -1, "PICTURE"); 91 | break; 92 | case GOP_START_CODE: 93 | display_printf(ds, -1, -1, "GOP"); 94 | break; 95 | case EXT_START_CODE: 96 | display_printf(ds, -1, -1, "EXT"); 97 | break; 98 | case PACK_START_CODE: 99 | display_printf(ds, -1, -1, "PACK"); 100 | break; 101 | case SYSTEM_HEADER_START_CODE: 102 | display_printf(ds, -1, -1, "SYSTEM"); 103 | break; 104 | default: 105 | if (startcode >= SLICE_MIN_START_CODE && 106 | startcode <= SLICE_MAX_START_CODE) { 107 | display_printf(ds, -1, -1, "SLICE %d", startcode & 0xff); 108 | } else { 109 | display_printf(ds, -1, -1, "UNKNOWN", startcode); 110 | } 111 | break; 112 | } 113 | 114 | display_eol(ds, -1, -1); 115 | the_end: 116 | return offset; 117 | } 118 | 119 | /* go to previous synchronization point */ 120 | static int mpeg_backward_offset(EditState *s, int offset) 121 | { 122 | unsigned char buf[4]; 123 | unsigned int startcode; 124 | int ret; 125 | 126 | for (;;) { 127 | if (offset <= 0) 128 | break; 129 | ret = eb_read(s->b, offset, buf, 4); 130 | if (ret != 4) 131 | break; 132 | startcode = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; 133 | if ((startcode & 0xffffff00) == 0x00000100) { 134 | break; 135 | } 136 | offset--; 137 | } 138 | return offset; 139 | } 140 | 141 | static int mpeg_mode_init(EditState *s, ModeSavedData *saved_data) 142 | { 143 | text_mode_init(s, saved_data); 144 | 145 | s->hex_mode = 1; 146 | s->hex_nibble = 0; 147 | s->wrap = WRAP_TRUNCATE; 148 | 149 | return 0; 150 | } 151 | 152 | static int mpeg_mode_probe(ModeDef *mode, ModeProbeData *p) 153 | { 154 | if (p->buf_size >= 4 && 155 | p->buf[0] == 0x00 && 156 | p->buf[1] == 0x00 && 157 | p->buf[2] == 0x01 && 158 | p->buf[3] >= 0xa0) 159 | return 100; 160 | else 161 | return 0; 162 | } 163 | 164 | static ModeDef mpeg_mode = { 165 | .name = "mpeg", 166 | .mode_probe = mpeg_mode_probe, 167 | .mode_init = mpeg_mode_init, 168 | .text_display = mpeg_display, 169 | .text_backward_offset = mpeg_backward_offset, 170 | .write_char = hex_write_char, 171 | }; 172 | 173 | static int mpeg_init(void) 174 | { 175 | qe_register_mode(&mpeg_mode); 176 | return 0; 177 | } 178 | 179 | qe_module_init(mpeg_init); 180 | -------------------------------------------------------------------------------- /kmap/Yiddish.kmap: -------------------------------------------------------------------------------- 1 | // Yiddish.kmap for Yudit 2 | // 2001-01-30 Raphael Finkel raphael@cs.uky.edu 3 | 4 | // These are the Yiddish letters, according to the UYIP mapping convention 5 | // I have excluded the keystrokes using the key. 6 | // I have added a few ligatures for YIVO input. 7 | 8 | "a=0x05D0 0x05b7", // HEBREW LETTER ALEF, HEBREW POINT PATAH 9 | "ay=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 10 | "A=0x05D0", // HEBREW LETTER ALEF 11 | "#=0x05D0" , // HEBREW LETTER ALEF 12 | "B=0x05D1 0x05BF", // HEBREW LETTER BET, HEBREW POINT RAFE 13 | "b=0x05D1", // HEBREW LETTER BET 14 | "c=0x05E6", // HEBREW LETTER TSADI 15 | "ts=0x05E6", // HEBREW LETTER TSADI 16 | "tsh=0x05D8 0x05E9", // HEBREW LETTER TET, SHIN 17 | 18 | "ts,=0x05E5 ," , // final form 19 | "ts.=0x05E5 ." , // final form 20 | "ts?=0x05E5 ?" , // final form 21 | "ts:=0x05E5 :" , // final form 22 | "ts!=0x05E5 !" , // final form 23 | "ts;=0x05E5 ;" , // final form 24 | "ts-=0x05E5 -" , // final form 25 | "ts)=0x05E5 )" , // final form 26 | "ts 0x0020= 0x05E5 0x0020" , // final form 27 | 28 | "C=0x05E5", // HEBREW LETTER FINAL TSADI 29 | 30 | "c,=0x05E5 ," , // final form 31 | "c.=0x05E5 ." , // final form 32 | "c?=0x05E5 ?" , // final form 33 | "c:=0x05E5 :" , // final form 34 | "c!=0x05E5 !" , // final form 35 | "c;=0x05E5 ;" , // final form 36 | "c-=0x05E5 -" , // final form 37 | "c)=0x05E5 )" , // final form 38 | "c 0x0020= 0x05E5 0x0020" , // final form 39 | 40 | "d=0x05D3", // HEBREW LETTER DALET 41 | "dj=0x05D3 0x05D6 0x05E9", // DALET, ZAYIN, SHIN 42 | "e=0x05E2", // HEBREW LETTER AYIN 43 | "E=0x05F2", // HEBREW LIGATURE YIDDISH DOUBLE YOD 44 | "ey=0x05F2", // HEBREW LIGATURE YIDDISH DOUBLE YOD 45 | "eyi=0x05F2 0x05D9 0x05B4", // DOUBLE YOD, YOD, HIRIQ 46 | "f=0x05E4 0x05BF", // HEBREW LETTER PE, HEBREW POINT RAFE 47 | "F=0x05E3", // HEBREW LETTER FINAL PE 48 | 49 | "f,=0x05E3 ," , // final form 50 | "f.=0x05E3 ." , // final form 51 | "f?=0x05E3 ?" , // final form 52 | "f:=0x05E3 :" , // final form 53 | "f!=0x05E3 !" , // final form 54 | "f;=0x05E3 ;" , // final form 55 | "f-=0x05E3 -" , // final form 56 | "f)=0x05E3 )" , // final form 57 | "f 0x0020= 0x05E3 0x0020" , // final form 58 | 59 | "g=0x05D2", // HEBREW LETTER GIMEL 60 | "h=0x05D4", // HEBREW LETTER HE 61 | "H=0x05D7", // HEBREW LETTER HET 62 | "i=0x05D9", // HEBREW LETTER YOD 63 | "ii=0x05D9 0x05D9 0x05B4", // YOD, YOD, HIRIQ 64 | "iy=0x05D9 0x05B4 0x05D9", // YOD, HIRIQ, YOD 65 | "I=0x05D9 0x05B4", // HEBREW LETTER YOD, HEBREW POINT HIRIQ 66 | "j=0x05F2", // HEBREW LIGATURE YIDDISH DOUBLE YOD 67 | "J=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 68 | "k=0x05E7", // HEBREW LETTER QOF 69 | "kh=0x05DB" , // HEBREW LETTER KAF 70 | 71 | "kh,=0x05DA ," , // final form 72 | "kh.=0x05DA ." , // final form 73 | "kh?=0x05DA ?" , // final form 74 | "kh:=0x05DA :" , // final form 75 | "kh!=0x05DA !" , // final form 76 | "kh;=0x05DA ;" , // final form 77 | "kh-=0x05DA -" , // final form 78 | "kh)=0x05DA )" , // final form 79 | "kh 0x0020= 0x05DA 0x0020" , // final form 80 | 81 | "K=0x05DB 0x05BC", // HEBREW LETTER KAF, HEBREW POINT DAGESH OR MAPIQ 82 | "l=0x05DC", // HEBREW LETTER LAMED 83 | "m=0x05DE", // HEBREW LETTER MEM 84 | "M=0x05DD", // HEBREW LETTER FINAL MEM 85 | 86 | "m,=0x05DD ," , // final form 87 | "m.=0x05DD ." , // final form 88 | "m?=0x05DD ?" , // final form 89 | "m:=0x05DD :" , // final form 90 | "m!=0x05DD !" , // final form 91 | "m;=0x05DD ;" , // final form 92 | "m-=0x05DD -" , // final form 93 | "m)=0x05DD )" , // final form 94 | "m 0x0020= 0x05DD 0x0020" , // final form 95 | 96 | "n=0x05E0", // HEBREW LETTER NUN 97 | "N=0x05DF", // HEBREW LETTER FINAL NUN 98 | 99 | "n,=0x05DF ," , // final form 100 | "n.=0x05DF ." , // final form 101 | "n?=0x05DF ?" , // final form 102 | "n:=0x05DF :" , // final form 103 | "n!=0x05DF !" , // final form 104 | "n;=0x05DF ;" , // final form 105 | "n-=0x05DF -" , // final form 106 | "n)=0x05DF )" , // final form 107 | "n 0x0020= 0x05DF 0x0020" , // final form 108 | 109 | "o=0x05D0 0x05B8", // HEBREW LETTER ALEF, HEBREW POINT QAMATS 110 | "oy=0x05F1", // HEBREW LIGATURE YIDDISH VAV YOD 111 | "O=0x05F1", // HEBREW LIGATURE YIDDISH VAV YOD 112 | "p=0x05E4 0x05BC", // HEBREW LETTER PE, HEBREW POINT DAGESH OR MAPIQ 113 | "q=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 114 | "r=0x05E8", // HEBREW LETTER RESH 115 | "s=0x05E1", // HEBREW LETTER SAMEKH 116 | "S=0x05EA", // HEBREW LETTER TAV 117 | "t=0x05D8", // HEBREW LETTER TET 118 | "T=0x05EA 0x05BC", // HEBREW LETTER TAV, HEBREW POINT DAGESH OR MAPIQ 119 | "u=0x05D5", // HEBREW LETTER VAV 120 | "ui=0x05D5 0x05D9 0x05B4", // HEBREW LETTER VAV, YOD, POINT HIRIQ 121 | "uv=0x05D5 0x05BC 0x05F0", // VAV, DAGESH, DOUBLE VAV 122 | "uu=0x05D5 0x05BC 0x05D5", // VAV, DAGESH, VAV 123 | "U=0x05D5 0x05BC", // HEBREW LETTER VAV, HEBREW POINT DAGESH OR MAPIQ 124 | "v=0x05F0", // HEBREW LIGATURE YIDDISH DOUBLE VAV 125 | "vu=0x05F0 0x05D5 0x05BC", // DOUBLE VAV, VAV, DAGESH 126 | "V=0x05D1 0x05BF", // HEBREW LETTER BET, HEBREW POINT RAFE 127 | "w=0x05E9", // HEBREW LETTER SHIN 128 | "sh=0x05E9", // HEBREW LETTER SHIN 129 | "W=0x05E9 0x05C2", // HEBREW LETTER SHIN, HEBREW POINT SIN DOT 130 | "x=0x05DB", // HEBREW LETTER KAF 131 | "X=0x05DA", // HEBREW LETTER FINAL KAF 132 | 133 | "x,=0x05DA ," , // final form 134 | "x.=0x05DA ." , // final form 135 | "x?=0x05DA ?" , // final form 136 | "x:=0x05DA :" , // final form 137 | "x!=0x05DA !" , // final form 138 | "x;=0x05DA ;" , // final form 139 | "x-=0x05DA -" , // final form 140 | "x)=0x05DA )" , // final form 141 | "x 0x0020= 0x05DA 0x0020" , // final form 142 | 143 | "y=0x05D9", // HEBREW LETTER YOD 144 | "yi=0x05D9 0x05D9 0x05B4", // YOD, YOD, HIRIQ 145 | "Y=0x05F2 0x05B7", // HEBREW LIGATURE YIDDISH DOUBLE YOD, HEBREW POINT PATAH 146 | "z=0x05D6", // HEBREW LETTER ZAYIN 147 | "zh=0x05D5 0x05E9", // ZAYIN, SHIN 148 | -------------------------------------------------------------------------------- /cutils.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Various simple C utilities 3 | * 4 | * Copyright (c) 2000, 2001, 2002 Fabrice Bellard. 5 | * Copyright (c) 2002-2008 Charlie Gordon. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #include 23 | 24 | #include "config.h" /* for CONFIG_WIN32 */ 25 | #include "cutils.h" 26 | 27 | /* these functions are duplicated from ffmpeg/libavformat/cutils.c 28 | * conflict is resolved by redefining the symbols in cutils.h 29 | */ 30 | 31 | /** 32 | * Return TRUE if val is a prefix of str. If it returns TRUE, ptr is 33 | * set to the next character in 'str' after the prefix. 34 | * 35 | * @param str input string 36 | * @param val prefix to test 37 | * @param ptr updated after the prefix in str in there is a match 38 | * @return TRUE if there is a match 39 | */ 40 | int strstart(const char *str, const char *val, const char **ptr) 41 | { 42 | const char *p, *q; 43 | p = str; 44 | q = val; 45 | while (*q != '\0') { 46 | if (*p != *q) 47 | return 0; 48 | p++; 49 | q++; 50 | } 51 | if (ptr) 52 | *ptr = p; 53 | return 1; 54 | } 55 | 56 | /** 57 | * Return TRUE if val is a suffix of str. If it returns TRUE, ptr is 58 | * set to the first character of the suffix in 'str'. 59 | * 60 | * @param str input string 61 | * @param val suffix to test 62 | * @param ptr updated to the suffix in str in there is a match 63 | * @return TRUE if there is a match 64 | */ 65 | int strend(const char *str, const char *val, const char **ptr) 66 | { 67 | int len1 = strlen(str); 68 | int len2 = strlen(val); 69 | 70 | if (len1 < len2 || memcmp(str + len1 - len2, val, len2)) { 71 | return 0; 72 | } 73 | if (ptr) 74 | *ptr = str + len1 - len2; 75 | return 1; 76 | } 77 | 78 | /** 79 | * Copy the string str to buf. If str length is bigger than buf_size - 80 | * 1 then it is clamped to buf_size - 1. 81 | * NOTE: this function does what strncpy should have done to be 82 | * useful. NEVER use strncpy. 83 | * 84 | * @param buf destination buffer 85 | * @param buf_size size of destination buffer 86 | * @param str source string 87 | */ 88 | char *pstrcpy(char *buf, int buf_size, const char *str) 89 | { 90 | int c; 91 | char *q = buf; 92 | 93 | if (buf_size <= 0) 94 | return buf; 95 | 96 | for (;;) { 97 | c = *str++; 98 | if (c == '\0' || q >= buf + buf_size - 1) 99 | break; 100 | *q++ = c; 101 | } 102 | *q = '\0'; 103 | return buf; 104 | } 105 | 106 | /* strcat and truncate. */ 107 | char *pstrcat(char *buf, int buf_size, const char *s) 108 | { 109 | int len = strlen(buf); 110 | 111 | if (len < buf_size) 112 | pstrcpy(buf + len, buf_size - len, s); 113 | return buf; 114 | } 115 | 116 | /* copy the n first char of a string and truncate it. */ 117 | char *pstrncpy(char *buf, int buf_size, const char *s, int len) 118 | { 119 | char *q; 120 | int c; 121 | 122 | if (buf_size > 0) { 123 | q = buf; 124 | if (len >= buf_size) 125 | len = buf_size - 1; 126 | while (len > 0) { 127 | c = *s++; 128 | if (c == '\0') 129 | break; 130 | *q++ = c; 131 | len--; 132 | } 133 | *q = '\0'; 134 | } 135 | return buf; 136 | } 137 | 138 | /* Get the filename portion of a path */ 139 | const char *get_basename(const char *filename) 140 | { 141 | const char *p; 142 | const char *base; 143 | 144 | base = filename; 145 | if (base) { 146 | for (p = base; *p; p++) { 147 | #ifdef CONFIG_WIN32 148 | /* Simplistic DOS/Windows filename support */ 149 | if (*p == '/' || *p == '\\' || (*p == ':' && p == filename + 1)) 150 | base = p + 1; 151 | #else 152 | if (*p == '/') 153 | base = p + 1; 154 | #endif 155 | } 156 | } 157 | return base; 158 | } 159 | 160 | /* Return the last extension in a path, ignoring leading dots */ 161 | const char *get_extension(const char *filename) 162 | { 163 | const char *p, *ext; 164 | 165 | p = get_basename(filename); 166 | ext = NULL; 167 | if (p) { 168 | while (*p == '.') 169 | p++; 170 | for (; *p; p++) { 171 | if (*p == '.') 172 | ext = p; 173 | } 174 | if (!ext) 175 | ext = p; 176 | } 177 | return ext; 178 | } 179 | 180 | /* Extract the directory portion of a path: 181 | * This leaves out the trailing slash if any. The complete path is 182 | * obtained by catenating dirname + '/' + basename. 183 | * if the original path doesn't contain anything dirname is just "." 184 | */ 185 | char *get_dirname(char *dest, int size, const char *file) 186 | { 187 | char *p; 188 | 189 | if (dest) { 190 | p = dest; 191 | if (file) { 192 | pstrcpy(dest, size, file); 193 | p = get_basename_nc(dest); 194 | if (p > dest + 1 && p[-1] != ':' && p[-2] != ':') 195 | p--; 196 | 197 | if (p == dest) 198 | *p++ = '.'; 199 | } 200 | *p = '\0'; 201 | } 202 | return dest; 203 | } 204 | -------------------------------------------------------------------------------- /cp/koi8_u.cp: -------------------------------------------------------------------------------- 1 | KOI8-U 2 | "koi8-u" 3 | # 4 | # UNIX Ukrainian (koi8-u) to UNICODE translation table 5 | # 6 | # Based on koi8u_uni.tbl from lynx 2.8.2 distribution 7 | # by porokh 8 | # 9 | 0x80 0x2500 # BOX DRAWINGS LIGHT HORIZONTAL 10 | 0x81 0x2502 # BOX DRAWINGS LIGHT VERTICAL 11 | 0x82 0x250C # BOX DRAWINGS LIGHT DOWN AND RIGHT 12 | 0x83 0x2510 # BOX DRAWINGS LIGHT DOWN AND LEFT 13 | 0x84 0x2514 # BOX DRAWINGS LIGHT UP AND RIGHT 14 | 0x85 0x2518 # BOX DRAWINGS LIGHT UP AND LEFT 15 | 0x86 0x251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT 16 | 0x87 0x2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT 17 | 0x88 0x252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL 18 | 0x89 0x2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL 19 | 0x8A 0x253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL 20 | 0x8B 0x2580 # UPPER HALF BLOCK 21 | 0x8C 0x2584 # LOWER HALF BLOCK 22 | 0x8D 0x2588 # FULL BLOCK 23 | 0x8E 0x258C # LEFT HALF BLOCK 24 | 0x8F 0x2590 # RIGHT HALF BLOCK 25 | 0x90 0x2591 # LIGHT SHADE 26 | 0x91 0x2592 # MEDIUM SHADE 27 | 0x92 0x2593 # DARK SHADE 28 | 0x93 0x2320 # TOP HALF INTEGRAL 29 | 0x94 0x25A0 # BLACK SQUARE 30 | 0x95 0x2219 # BULLET OPERATOR 31 | 0x96 0x221A # SQUARE ROOT 32 | 0x97 0x2248 # ALMOST EQUAL TO 33 | 0x98 0x2264 # LESS THAN OR EQUAL TO 34 | 0x99 0x2265 # GREATER THAN OR EQUAL TO 35 | 0x9A 0x00A0 # NO-BREAK SPACE 36 | 0x9B 0x2321 # BOTTOM HALF INTEGRAL 37 | 0x9C 0x00B0 # DEGREE SIGN 38 | 0x9D 0x00B2 # SUPERSCRIPT TWO 39 | 0x9E 0x00B7 # MIDDLE DOT 40 | 0x9F 0x00F7 # DIVISION SIGN 41 | 0xA0 0x2550 # BOX DRAWINGS DOUBLE HORIZONTAL 42 | 0xA1 0x2551 # BOX DRAWINGS DOUBLE VERTICAL 43 | 0xA2 0x2552 # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE 44 | 0xA3 0x0451 # CYRILLIC SMALL LETTER IO 45 | 0xA4 0x0454 # CYRILLIC SMALL LETTER UKRAINIAN IE 46 | 0xA5 0x2554 # BOX DRAWINGS DOUBLE DOWN AND RIGHT 47 | 0xA6 0x0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I 48 | 0xA7 0x0457 # CYRILLIC SMALL LETTER YI (UKRAINIAN) 49 | 0xA8 0x2557 # BOX DRAWINGS DOUBLE DOWN AND LEFT 50 | 0xA9 0x2558 # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE 51 | 0xAA 0x2559 # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE 52 | 0xAB 0x255A # BOX DRAWINGS DOUBLE UP AND RIGHT 53 | 0xAC 0x255B # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE 54 | 0xAD 0x0491 # CYRILLIC SMALL LETTER GHE WITH UPTURN 55 | 0xAE 0x255D # BOX DRAWINGS DOUBLE UP AND LEFT 56 | 0xAF 0x255E # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE 57 | 0xB0 0x255F # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE 58 | 0xB1 0x2560 # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT 59 | 0xB2 0x2561 # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE 60 | 0xB3 0x0401 # CYRILLIC CAPITAL LETTER IO 61 | 0xB4 0x0404 # CYRILLIC CAPITAL LETTER UKRAINIAN IE 62 | 0xB5 0x2563 # BOX DRAWINGS DOUBLE VERTICAL AND LEFT 63 | 0xB6 0x0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I 64 | 0xB7 0x0407 # CYRILLIC CAPITAL LETTER YI (UKRAINIAN) 65 | 0xB8 0x2566 # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL 66 | 0xB9 0x2567 # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE 67 | 0xBA 0x2568 # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE 68 | 0xBB 0x2569 # BOX DRAWINGS DOUBLE UP AND HORIZONTAL 69 | 0xBC 0x256A # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE 70 | 0xBD 0x0490 # CYRILLIC CAPITAL LETTER GHE WITH UPTURN 71 | 0xBE 0x256C # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL 72 | 0xBF 0x00A9 # COPYRIGHT SIGN 73 | 0xC0 0x044E # CYRILLIC SMALL LETTER YU 74 | 0xC1 0x0430 # CYRILLIC SMALL LETTER A 75 | 0xC2 0x0431 # CYRILLIC SMALL LETTER BE 76 | 0xC3 0x0446 # CYRILLIC SMALL LETTER TSE 77 | 0xC4 0x0434 # CYRILLIC SMALL LETTER DE 78 | 0xC5 0x0435 # CYRILLIC SMALL LETTER IE 79 | 0xC6 0x0444 # CYRILLIC SMALL LETTER EF 80 | 0xC7 0x0433 # CYRILLIC SMALL LETTER GHE 81 | 0xC8 0x0445 # CYRILLIC SMALL LETTER KHA 82 | 0xC9 0x0438 # CYRILLIC SMALL LETTER I 83 | 0xCA 0x0439 # CYRILLIC SMALL LETTER SHORT I 84 | 0xCB 0x043A # CYRILLIC SMALL LETTER KA 85 | 0xCC 0x043B # CYRILLIC SMALL LETTER EL 86 | 0xCD 0x043C # CYRILLIC SMALL LETTER EM 87 | 0xCE 0x043D # CYRILLIC SMALL LETTER EN 88 | 0xCF 0x043E # CYRILLIC SMALL LETTER O 89 | 0xD0 0x043F # CYRILLIC SMALL LETTER PE 90 | 0xD1 0x044F # CYRILLIC SMALL LETTER YA 91 | 0xD2 0x0440 # CYRILLIC SMALL LETTER ER 92 | 0xD3 0x0441 # CYRILLIC SMALL LETTER ES 93 | 0xD4 0x0442 # CYRILLIC SMALL LETTER TE 94 | 0xD5 0x0443 # CYRILLIC SMALL LETTER U 95 | 0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE 96 | 0xD7 0x0432 # CYRILLIC SMALL LETTER VE 97 | 0xD8 0x044C # CYRILLIC SMALL LETTER SOFT SIGN 98 | 0xD9 0x044B # CYRILLIC SMALL LETTER YERU 99 | 0xDA 0x0437 # CYRILLIC SMALL LETTER ZE 100 | 0xDB 0x0448 # CYRILLIC SMALL LETTER SHA 101 | 0xDC 0x044D # CYRILLIC SMALL LETTER E 102 | 0xDD 0x0449 # CYRILLIC SMALL LETTER SHCHA 103 | 0xDE 0x0447 # CYRILLIC SMALL LETTER CHE 104 | 0xDF 0x044A # CYRILLIC SMALL LETTER HARD SIGN 105 | 0xE0 0x042E # CYRILLIC CAPITAL LETTER YU 106 | 0xE1 0x0410 # CYRILLIC CAPITAL LETTER A 107 | 0xE2 0x0411 # CYRILLIC CAPITAL LETTER BE 108 | 0xE3 0x0426 # CYRILLIC CAPITAL LETTER TSE 109 | 0xE4 0x0414 # CYRILLIC CAPITAL LETTER DE 110 | 0xE5 0x0415 # CYRILLIC CAPITAL LETTER IE 111 | 0xE6 0x0424 # CYRILLIC CAPITAL LETTER EF 112 | 0xE7 0x0413 # CYRILLIC CAPITAL LETTER GHE 113 | 0xE8 0x0425 # CYRILLIC CAPITAL LETTER KHA 114 | 0xE9 0x0418 # CYRILLIC CAPITAL LETTER I 115 | 0xEA 0x0419 # CYRILLIC CAPITAL LETTER SHORT I 116 | 0xEB 0x041A # CYRILLIC CAPITAL LETTER KA 117 | 0xEC 0x041B # CYRILLIC CAPITAL LETTER EL 118 | 0xED 0x041C # CYRILLIC CAPITAL LETTER EM 119 | 0xEE 0x041D # CYRILLIC CAPITAL LETTER EN 120 | 0xEF 0x041E # CYRILLIC CAPITAL LETTER O 121 | 0xF0 0x041F # CYRILLIC CAPITAL LETTER PE 122 | 0xF1 0x042F # CYRILLIC CAPITAL LETTER YA 123 | 0xF2 0x0420 # CYRILLIC CAPITAL LETTER ER 124 | 0xF3 0x0421 # CYRILLIC CAPITAL LETTER ES 125 | 0xF4 0x0422 # CYRILLIC CAPITAL LETTER TE 126 | 0xF5 0x0423 # CYRILLIC CAPITAL LETTER U 127 | 0xF6 0x0416 # CYRILLIC CAPITAL LETTER ZHE 128 | 0xF7 0x0412 # CYRILLIC CAPITAL LETTER VE 129 | 0xF8 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN 130 | 0xF9 0x042B # CYRILLIC CAPITAL LETTER YERU 131 | 0xFA 0x0417 # CYRILLIC CAPITAL LETTER ZE 132 | 0xFB 0x0428 # CYRILLIC CAPITAL LETTER SHA 133 | 0xFC 0x042D # CYRILLIC CAPITAL LETTER E 134 | 0xFD 0x0429 # CYRILLIC CAPITAL LETTER SHCHA 135 | 0xFE 0x0427 # CYRILLIC CAPITAL LETTER CHE 136 | 0xFF 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN 137 | --------------------------------------------------------------------------------