+++ /dev/null
-diff -x '*P*' -Nru dfbiterm-0.1.old/src/dfbiterm.c dfbiterm-0.1/src/dfbiterm.c
---- dfbiterm-0.1.old/src/dfbiterm.c 2006-02-11 18:25:02.000000000 +0100
-+++ dfbiterm-0.1/src/dfbiterm.c 2006-03-16 12:33:13.209021000 +0100
-@@ -36,6 +36,7 @@
- {
- pIterm->buffer->Release(pIterm->buffer);
- pIterm->font->Release(pIterm->font);
-+ pIterm->boldFont->Release(pIterm->boldFont);
- pIterm->window->Release(pIterm->window);
- pIterm->layer->Release(pIterm->layer);
- pIterm->surface->Release(pIterm->surface);
-@@ -54,10 +55,11 @@
- static void
- dfbiterm_usage (void)
- {
-- fprintf (stdout, "Usage: iterm [ -a <fontfile> ] [ -H <height> ] [ - W <width> ] [ -n ] [ -v ]\n\
-+ fprintf (stdout, "Usage: dfbiterm [ -a <fontfile> ] [ -b <bold fontfile> ] [ -H <height> ] [ - W <width> ] [ -n ] [ -v ]\n\
- \n\
- options:\n\
- -a <fontfile>\tascii text font\n\
-+ -b <fontfile>\tbold font\n\
- -H <height>\theight of the character cell\n\
- -W <width>\twidth of the character cell\n\
- -v\t\tprint version information and exit\n\
-@@ -70,7 +72,7 @@
- int
- main (int argc, char *argv[])
- {
-- unsigned char buf[BUFSIZ + 1], *ascfontname, *mbfontname;
-+ unsigned char buf[BUFSIZ + 1], *ascfontname, *boldfontname;
- int i;
- DFBFontDescription font_dsc;
- DFBSurfaceDescription dsc;
-@@ -89,11 +91,12 @@
- exit (1);
- }
- ascfontname = DefaultFont;
-+ boldfontname = DefaultFont;
-
- font_dsc.height = 16;
- font_dsc.width = 8;
-
-- while ((i = getopt (argc, argv, "a:H:W:nhv")) != EOF)
-+ while ((i = getopt (argc, argv, "a:b:H:W:nhv")) != EOF)
- switch (i) {
- case 'a':
- if (optarg != NULL)
-@@ -101,6 +104,12 @@
- else
- ascfontname = DefaultFont;
- break;
-+ case 'b':
-+ if (optarg != NULL)
-+ boldfontname = optarg;
-+ else
-+ boldfontname = DefaultFont;
-+ break;
- case 'H':
- if (optarg) {
- font_dsc.height = atoi(optarg);
-@@ -118,7 +127,7 @@
- }
- break;
- case 'v':
-- fprintf (stdout, "fbiterm %s\n", DFBITERM_VERSION);
-+ fprintf (stdout, "dfbiterm %s\n", DFBITERM_VERSION);
- exit (0);
- break;
- case 'n':
-@@ -146,6 +155,7 @@
- DFBCHECK (pIterm->surface->Clear(pIterm->surface, 0, 0, 0, 0xff));
- DFBCHECK (pIterm->surface->GetSize (pIterm->surface, &pIterm->screen_width, &pIterm->screen_height));
- DFBCHECK (pIterm->dfb->CreateFont (pIterm->dfb, ascfontname, &font_dsc, &pIterm->font));
-+ DFBCHECK (pIterm->dfb->CreateFont (pIterm->dfb, boldfontname, &font_dsc, &pIterm->boldFont));
- DFBCHECK (pIterm->surface->SetFont(pIterm->surface, pIterm->font));
- DFBCHECK (pIterm->font->GetHeight(pIterm->font, &pIterm->cell_height));
-
-diff -x '*P*' -Nru dfbiterm-0.1.old/src/dfbiterm.h dfbiterm-0.1/src/dfbiterm.h
---- dfbiterm-0.1.old/src/dfbiterm.h 2006-02-11 18:31:35.000000000 +0100
-+++ dfbiterm-0.1/src/dfbiterm.h 2006-03-16 12:24:51.203211000 +0100
-@@ -58,6 +58,7 @@
- IDirectFB *dfb; /* DirectFB */
- IDirectFBSurface *surface;
- IDirectFBFont *font;
-+ IDirectFBFont *boldFont;
- IDirectFBPalette *palette;
- IDirectFBWindow *window;
- IDirectFBDisplayLayer *layer;
-diff -x '*P*' -Nru dfbiterm-0.1.old/src/VTScreenView.c dfbiterm-0.1/src/VTScreenView.c
---- dfbiterm-0.1.old/src/VTScreenView.c 2006-03-16 12:37:24.620733250 +0100
-+++ dfbiterm-0.1/src/VTScreenView.c 2006-03-16 12:24:16.937069500 +0100
-@@ -83,7 +83,12 @@
- pIterm->foreground = foreground;
- pIterm->background = background;
- pIterm->underline = underline;
-- pIterm->bold = bold;
-+ if (pIterm->bold != bold) {
-+ pIterm->bold = bold;
-+ if (bold) pIterm->surface->SetFont(pIterm->surface, pIterm->boldFont);
-+ else pIterm->surface->SetFont(pIterm->surface, pIterm->font);
-+ }
-+
- if (inverse) {
- pIterm->background = foreground;
- pIterm->foreground = background;
---- /dev/null 2005-12-16 15:50:26.000000000 +0100
-+++ dfbiterm-0.1/przeczytajto.txt 2006-03-16 18:18:21.787424500 +0100
-@@ -0,0 +1,10 @@
-+dfbiterm przyjmuje nastêpuj±ce parametry:
-+-a font - normalna czcionka
-+-b boldfont - czcionka pogrubiona
-+-H wysoko¶æ - wysoko¶æ fontu, nale¿y j± podaæ, gdy inna ni¿ 16
-+-W szeroko¶æ - szeroko¶æ fontu, nale¿y j± podaæ, gdy ró¿na ni¿ 8
-+
-+Nale¿y wybraæ fonty o jednakowej wysoko¶ci i szeroko¶ci.
-+
-+Przyk³ad:
-+$ dfbiterm -a /usr/share/fonts/misc/8x13.pcf.gz -b /usr/share/fonts/misc/8x13B.pcf.gz -H 13
+++ /dev/null
-diff -x '*~' -Nru dfbiterm-0.1/src/keyboard.c dfbiterm-0.1.new/src/keyboard.c
---- dfbiterm-0.1/src/keyboard.c 2006-02-11 18:32:14.000000000 +0100
-+++ dfbiterm-0.1.new/src/keyboard.c 2006-02-14 15:30:42.849133000 +0100
-@@ -5,8 +5,8 @@
- #include "dfbiterm.h"
- #include <directfb.h>
-
--/* remapping table for function keys 5-12 */
--static const unsigned char f5_f12_remap[] = {15,17,18,19,20,21,23,24};
-+/* remapping table for function keys 1-12 */
-+static const unsigned char f1_f12_remap[] = {11,12,13,14,15,17,18,19,20,21,23,24};
-
- void
- term_handle_key(DFBWindowEvent *evt)
-@@ -46,11 +46,15 @@
- case '-':
- write(pIterm->fd, "\037", 1);
- break;
-+ case '\r':
-+ write(pIterm->fd, "\033\r", 2);
-+ break;
- default:
- write(pIterm->fd, &c, 1);
- break;
- }
-- }
-+ } else if ((evt->modifiers & DIMM_ALT) && evt->key_symbol == '\r')
-+ write(pIterm->fd, "\033\r", 2);
- else
- write(pIterm->fd, &c, 1);
- }
-@@ -94,10 +98,10 @@
- }
- break;
- case DIKS_HOME:
-- write(pIterm->fd, "\033OH", 3);
-+ write(pIterm->fd, "\033[1~", 4);
- break;
- case DIKS_END:
-- write(pIterm->fd, "\033OF", 3);
-+ write(pIterm->fd, "\033[4~", 4);
- break;
- case DIKS_PAGE_UP:
- if (evt->modifiers & DIMM_SHIFT) {
-@@ -113,23 +117,11 @@
- } else
- write(pIterm->fd, "\033[6~", 4);
- break;
-- case DIKS_F1:
-- write(pIterm->fd, "\033OP", 3);
-- break;
-- case DIKS_F2:
-- write(pIterm->fd, "\033OQ", 3);
-- break;
-- case DIKS_F3:
-- write(pIterm->fd, "\033OR", 3);
-- break;
-- case DIKS_F4:
-- write(pIterm->fd, "\033OS", 3);
-- break;
-- case DIKS_F5 ... DIKS_F12:
-+ case DIKS_F1 ... DIKS_F12:
- {
- char buf[6];
-
-- sprintf (buf, "\033[%d~", f5_f12_remap[evt->key_symbol - DIKS_F5]);
-+ sprintf (buf, "\033[%d~", f1_f12_remap[evt->key_symbol - DIKS_F1]);
- write(pIterm->fd, buf, strlen(buf));
- }
- break;
-diff -x '*~' -Nru dfbiterm-0.1/src/vt.c dfbiterm-0.1.new/src/vt.c
---- dfbiterm-0.1/src/vt.c 2006-02-11 18:31:53.000000000 +0100
-+++ dfbiterm-0.1.new/src/vt.c 2006-02-14 14:35:19.035163250 +0100
-@@ -12,7 +12,7 @@
- char *shell;
- char *program[] = { defaultShell, NULL };
-
-- putenv("TERM=xterm");
-+ putenv("TERM=iterm");
- shell = getenv ("SHELL");
- if (shell != NULL && shell[0] != '\0')
- program[0] = shell;
-diff -x '*~' -Nru dfbiterm-0.1/src/VTScreenView.c dfbiterm-0.1.new/src/VTScreenView.c
---- dfbiterm-0.1/src/VTScreenView.c 2006-02-11 18:25:02.000000000 +0100
-+++ dfbiterm-0.1.new/src/VTScreenView.c 2006-02-14 14:34:27.647951750 +0100
-@@ -10,18 +10,28 @@
- VTScreenView_draw_text(VTScreenView * view, int col, int row,
- unsigned char *mbstring, int length, int width)
- {
-- int x, y, h, w, i;
-+ int x, y, h, w, i, xs, foreground, background;
-
- if (pIterm->lock) return;
-
-- x = col * pIterm->cell_width;
-+ xs = x = col * pIterm->cell_width;
- y = row * pIterm->cell_height;
- w = pIterm->cell_width * width;
- h = pIterm->cell_height;
-
-- pIterm->surface->SetColor(pIterm->surface, red[pIterm->background], green[pIterm->background], blue[pIterm->background], 0xff);
-+ foreground = pIterm->foreground;
-+ background = pIterm->background;
-+
-+ if (pIterm->indexed)
-+ pIterm->surface->SetColorIndex(pIterm->surface, background);
-+ else
-+ pIterm->surface->SetColor(pIterm->surface, red[background], green[background], blue[background], 0xff);
- pIterm->surface->FillRectangle(pIterm->surface, x, y, w, h);
-- pIterm->surface->SetColor(pIterm->surface, red[pIterm->foreground], green[pIterm->foreground], blue[pIterm->foreground], 0xff);
-+
-+ if (pIterm->indexed)
-+ pIterm->surface->SetColorIndex(pIterm->surface, foreground);
-+ else
-+ pIterm->surface->SetColor(pIterm->surface, red[foreground], green[foreground], blue[foreground], 0xff);
- if (pIterm->charset == SPECIAL_GRAPHICS) {
- for (i = 0; i < length; i++) {
- if (0x5E <mbstring[i] && mbstring[i] < 0x7F) {
-@@ -38,6 +48,7 @@
- pIterm->surface->DrawGlyph(pIterm->surface, indeks, x, y, DSTF_TOPLEFT);
- x += pIterm->cell_width;
- }
-+ if (pIterm->underline) pIterm->surface->DrawLine(pIterm->surface, xs, y + pIterm->cell_height - 1, x - 1, y + pIterm->cell_height - 1);
- }
-
- static void
-@@ -52,68 +63,20 @@
- w = (e_col - s_col) * pIterm->cell_width;
- h = (e_row - s_row) * pIterm->cell_height;
-
-- pIterm->surface->SetColor(pIterm->surface, red[pIterm->background], green[pIterm->background], blue[pIterm->background], 0xff);
-+ if (pIterm->indexed)
-+ pIterm->surface->SetColorIndex(pIterm->surface, 0);
-+ else
-+ pIterm->surface->SetColor(pIterm->surface, red[0], green[0], blue[0], 0xff);
- pIterm->surface->FillRectangle(pIterm->surface, x, y, w, h);
- }
-
- static void
--VTScreenView_draw_text8(VTScreenView * view, int col, int row,
-- unsigned char *mbstring, int length, int width)
--{
-- int x, y, w, i, h;
--
-- if (pIterm->lock) return;
--
-- x = col * pIterm->cell_width;
-- y = row * pIterm->cell_height;
-- w = pIterm->cell_width * width;
-- h = pIterm->cell_height;
--
-- if (pIterm->charset == SPECIAL_GRAPHICS) {
-- for (i = 0; i < length; i++) {
-- if (0x5E <mbstring[i] && mbstring[i] < 0x7F) {
-- mbstring[i] = ((mbstring[i]==0x5F)? 0x7F : mbstring[i]-0x5F);
-- }
-- }
-- }
-- pIterm->surface->SetColorIndex(pIterm->surface, pIterm->background);
-- pIterm->surface->FillRectangle(pIterm->surface, x, y, w, h);
-- pIterm->surface->SetColorIndex(pIterm->surface, pIterm->foreground);
-- for (i = 0; i < length; i++) {
-- unsigned int indeks = mbstring[i];
--
-- if (indeks > 0x7f) {
-- indeks = btowc(indeks);
-- }
-- pIterm->surface->DrawGlyph(pIterm->surface, indeks, x, y, DSTF_TOPLEFT);
-- x += pIterm->cell_width;
-- }
--}
--
--static void
--VTScreenView_clear_rect8(VTScreenView * view, int s_col, int s_row,
-- int e_col, int e_row)
--{
-- int x, y, w, h;
-- if (pIterm->lock) return;
--
-- x = s_col * pIterm->cell_width;
-- y = s_row * pIterm->cell_height;
-- w = (e_col - s_col) * pIterm->cell_width;
-- h = (e_row - s_row) * pIterm->cell_height;
--
-- pIterm->surface->SetColorIndex(pIterm->surface, pIterm->background);
-- pIterm->surface->FillRectangle(pIterm->surface, x, y, w, h);
--}
--
--static void
- VTScreenView_set_rendition (VTScreenView * view, int bold, int blink,
- int inverse, int underline,
- int foreground, int background, char charset)
- {
--/* pIterm->fb->set_rendition (bold, blink, inverse, underline, foreground,
-- background, charset); */
- if (pIterm->lock) return;
-+
- if (!background && !foreground) {
- foreground = 7;
- }
-@@ -171,14 +134,10 @@
- }
-
- VTScreenView_init(view);
-- if (pIterm->indexed) {
-- set_palette();
-- view->draw_text = VTScreenView_draw_text8;
-- view->clear_rect = VTScreenView_clear_rect8;
-- } else {
-- view->draw_text = VTScreenView_draw_text;
-- view->clear_rect = VTScreenView_clear_rect;
-- }
-+ if (pIterm->indexed) set_palette();
-+ pIterm->foreground = 7;
-+ view->draw_text = VTScreenView_draw_text;
-+ view->clear_rect = VTScreenView_clear_rect;
- view->set_rendition = VTScreenView_set_rendition;
- view->scroll_view = VTScreenView_scroll_view;
- return view;