~z88dk-team/z88dk-pkg/trunk

« back to all changes in this revision

Viewing changes to libsrc/graphics/x11/_xfputc.c

  • Committer: Bazaar Package Importer
  • Author(s): Krystian Wlosek, Krystian Wlosek
  • Date: 2008-03-25 11:46:11 UTC
  • mfrom: (1.1.2 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080325114611-u89smn2ccknl8avt
Tags: 1.8.ds1-2
[ Krystian Wlosek ]
* Enable 64bit architecture.
* Added '-m32' switch to CFLAGS and LDFLAGS for 64bit machines.
* Changed Architecture: to `any' in z88dk and z88dk-bin package.
* Added gcc-multilib to Build-Depends: for 64bit
* Fixed problem with x11.lib
  - created symlink from include/x11 to include/X11
  - improved Makefile for x11.lib
    patch debian/patches/03_libsrc_graphics_x11_Makefile.diff
* Fixed library ozansi.lib
  - patch debian/patches/03_libsrc_oz_ozinput_Makefile.diff
* Changed Copyright notice.
* Fixed gcc warnings:
  - in src/appmake dir - debian/patches/04_src_appmake.diff
  - in src/zcc/zcc.c - debian/patches/04_src_zcc_zcc.c.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
        Minimal Xlib port - Internal functions
 
3
        Proportional printing
 
4
        Stefano Bodrato, 5/3/2007
 
5
        
 
6
        $Id: _xfputc.c,v 1.1 2007/12/21 08:04:23 stefano Exp $
 
7
*/
 
8
 
 
9
#define _BUILDING_X
 
10
#include <X11/Xlib.h>
 
11
 
 
12
#include <graphics.h>
 
13
 
 
14
 
 
15
void _xfputc (char c, char *font, Bool bold)
 
16
{
 
17
 
 
18
 
 
19
    if (c==12) {
 
20
        clg();
 
21
        _x_proportional = _y_proportional = 0;
 
22
        return;
 
23
    }
 
24
 
 
25
    if (c==13) {
 
26
        _x_proportional = 0;
 
27
        //_y_proportional += 8; // compact
 
28
        _y_proportional += 9; // normal line spacing
 
29
        return;
 
30
    }
 
31
    if ((_xchar_proportional = _xfindchar( (char) (c - 32), (char *) font)) == -1) return;
 
32
 
 
33
    if (_x_proportional + _xchar_proportional[0] >= DisplayWidth(0, 0)) _xfputc (13, font, bold);
 
34
 
 
35
    putsprite (SPR_OR, _x_proportional, _y_proportional, _xchar_proportional);
 
36
    if (bold) putsprite (SPR_OR, ++_x_proportional, _y_proportional, _xchar_proportional);
 
37
 
 
38
    _x_proportional += _xchar_proportional[0];
 
39
 
 
40
}
 
41