From 61fdcd4d1c61add0e9ccd5e49ad911e90d63c79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 14 Mar 2013 18:59:06 +0000 Subject: [PATCH] qemacs: update patch * Add a shell script to convert Pe color settings to QEmacs config syntax --- .../qemacs/patches/qemacs-0.3.2dev-cvs.patch | 108 ++++++++++++++++-- 1 file changed, 98 insertions(+), 10 deletions(-) diff --git a/app-editors/qemacs/patches/qemacs-0.3.2dev-cvs.patch b/app-editors/qemacs/patches/qemacs-0.3.2dev-cvs.patch index 4c2261f07..3123689a4 100644 --- a/app-editors/qemacs/patches/qemacs-0.3.2dev-cvs.patch +++ b/app-editors/qemacs/patches/qemacs-0.3.2dev-cvs.patch @@ -4,7 +4,7 @@ RCS file: /sources/qemacs/qemacs/Makefile,v retrieving revision 1.50 diff -u -r1.50 Makefile --- Makefile 5 Jun 2008 07:14:12 -0000 1.50 -+++ Makefile 14 Mar 2013 18:45:07 -0000 ++++ Makefile 14 Mar 2013 18:56:51 -0000 @@ -63,7 +63,7 @@ endif @@ -61,7 +61,7 @@ RCS file: /sources/qemacs/qemacs/cfb.c,v retrieving revision 1.8 diff -u -r1.8 cfb.c --- cfb.c 8 Apr 2008 06:55:44 -0000 1.8 -+++ cfb.c 14 Mar 2013 18:45:07 -0000 ++++ cfb.c 14 Mar 2013 18:56:51 -0000 @@ -50,7 +50,7 @@ static void cfb16_fill_rectangle(QEditScreen *s, int x1, int y1, int w, int h, QEColor color) @@ -122,7 +122,7 @@ RCS file: /sources/qemacs/qemacs/configure,v retrieving revision 1.15 diff -u -r1.15 configure --- configure 17 Apr 2008 15:06:44 -0000 1.15 -+++ configure 14 Mar 2013 18:45:07 -0000 ++++ configure 14 Mar 2013 18:56:51 -0000 @@ -45,9 +45,11 @@ ptsname="yes" gprof="no" @@ -207,7 +207,7 @@ RCS file: /sources/qemacs/qemacs/display.h,v retrieving revision 1.11 diff -u -r1.11 display.h --- display.h 11 Jan 2008 11:29:28 -0000 1.11 -+++ display.h 14 Mar 2013 18:45:07 -0000 ++++ display.h 14 Mar 2013 18:56:52 -0000 @@ -53,7 +53,7 @@ int refcount; int ascent; @@ -232,7 +232,7 @@ RCS file: /sources/qemacs/qemacs/fbfrender.c,v retrieving revision 1.10 diff -u -r1.10 fbfrender.c --- fbfrender.c 8 Jan 2008 16:37:54 -0000 1.10 -+++ fbfrender.c 14 Mar 2013 18:45:07 -0000 ++++ fbfrender.c 14 Mar 2013 18:56:52 -0000 @@ -124,7 +124,7 @@ static GlyphCache *fbf_decode_glyph1(QEFont *font, int code) @@ -257,7 +257,7 @@ RCS file: /sources/qemacs/qemacs/html2png.c,v retrieving revision 1.12 diff -u -r1.12 html2png.c --- html2png.c 11 Jan 2008 11:29:28 -0000 1.12 -+++ html2png.c 14 Mar 2013 18:45:07 -0000 ++++ html2png.c 14 Mar 2013 18:56:52 -0000 @@ -135,7 +135,7 @@ /* realloc ppm bitmap */ static int ppm_resize(QEditScreen *s, int w, int h) @@ -319,7 +319,7 @@ RCS file: /sources/qemacs/qemacs/qe.h,v retrieving revision 1.96 diff -u -r1.96 qe.h --- qe.h 4 May 2008 15:54:39 -0000 1.96 -+++ qe.h 14 Mar 2013 18:45:11 -0000 ++++ qe.h 14 Mar 2013 18:56:53 -0000 @@ -267,11 +267,11 @@ int ustristart(const unsigned int *str, const char *val, const unsigned int **ptr); static inline unsigned int *umemmove(unsigned int *dest, @@ -340,7 +340,7 @@ RCS file: /sources/qemacs/qemacs/tty.c,v retrieving revision 1.50 diff -u -r1.50 tty.c --- tty.c 23 Apr 2008 15:30:33 -0000 1.50 -+++ tty.c 14 Mar 2013 18:45:11 -0000 ++++ tty.c 14 Mar 2013 18:56:54 -0000 @@ -118,7 +118,7 @@ tty_screen = s; @@ -436,7 +436,7 @@ RCS file: /sources/qemacs/qemacs/win32.c,v retrieving revision 1.15 diff -u -r1.15 win32.c --- win32.c 23 Apr 2008 15:29:35 -0000 1.15 -+++ win32.c 14 Mar 2013 18:45:11 -0000 ++++ win32.c 14 Mar 2013 18:56:54 -0000 @@ -139,7 +139,7 @@ if (!_hPrev) init_application(); @@ -461,7 +461,7 @@ RCS file: /sources/qemacs/qemacs/x11.c,v retrieving revision 1.28 diff -u -r1.28 x11.c --- x11.c 15 Apr 2008 23:24:04 -0000 1.28 -+++ x11.c 14 Mar 2013 18:45:12 -0000 ++++ x11.c 14 Mar 2013 18:56:54 -0000 @@ -194,7 +194,7 @@ QEStyleDef default_style; XGCValues gc_val; @@ -1400,3 +1400,91 @@ diff -u -r1.28 x11.c +} + +qe_module_init(haiku_init); +--- /dev/null 2013-03-14 16:10:28.351668000 +0100 ++++ contrib/haiku-pe2qe.sh 2013-03-14 19:17:29.552599552 +0100 +@@ -0,0 +1,85 @@ ++#!/bin/sh ++ ++pesettings=`finddir B_USER_SETTINGS_DIRECTORY`/pe/settings ++ ++fgmap=( ++"alt comment:" ++"alt error:" ++"alt keyword:" ++"alt number:" ++"alt operator:" ++"alt separator:" ++"altprocessor:" ++"attribute:" ++"char constant:html-entity" ++"comment:comment html-comment" ++"error:" ++"highlight:highlight" ++"invisibles:" ++"keyword:keyword preprocess" ++"low:window-border" ++"mark:status" ++"number:number" ++"operator:function" ++"preprocessor:" ++"selection:selection" ++"separator:" ++"string:string string-q html-string" ++"system identifier:type" ++"tag:tag" ++"tagstring:html-tag" ++"text:default mode-line minibuf" ++"user identifier:variable" ++) ++ ++bgmap=( ++"low:default" ++"selection:mode-line window-border region-hilite" ++) ++ ++map_pe_fg () { ++ for item in "${fgmap[@]}"; do ++ if [ "$1" = "${item%:*}" ]; then ++ echo "${item#*:}" ++ return ++ fi ++ done ++} ++ ++map_pe_bg () { ++ for item in "${bgmap[@]}"; do ++ if [ "$1" = "${item%:*}" ]; then ++ echo "${item#*:}" ++ return ++ fi ++ done ++} ++ ++out_style () { ++ echo "set_style(\"$1\", \"$2\", \"$3\")" ++} ++ ++echo "// map Pe settings to QEmacs" ++echo "// generated by $(basename "$0") on `date`" ++ ++while read line; do ++ token="${line%=*}" ++ value="${line#*=}" ++ case "$token" in ++ *color) ++ name="${token% color}" ++ qenames="$(map_pe_fg "$name")" ++ for qename in ${qenames}; do ++ #echo "color: $name -> $qename" >&2 ++ out_style "$qename" "color" "$value" ++ done ++ qenames="$(map_pe_bg "$name")" ++ for qename in ${qenames}; do ++ #echo "bgcolor: $name -> $qename" >&2 ++ out_style "$qename" "background-color" "$value" ++ done ++ ;; ++ *) ++ ;; ++ esac ++done < "$pesettings"