~ubuntu-branches/ubuntu/hardy/gnome-commander/hardy

« back to all changes in this revision

Viewing changes to src/libgviewer/gvtypes.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2006-06-13 15:39:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060613153948-gvrt3mb2ddk5u62o
Tags: 1.2.0-3
added --disable-scrollkeeper on build

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    LibGViewer - GTK+ File Viewer library 
 
3
    Copyright (C) 2006 Assaf Gordon
 
4
    
 
5
    Part of
 
6
        GNOME Commander - A GNOME based file manager
 
7
        Copyright (C) 2001-2006 Marcus Bjurman
 
8
 
 
9
    This program is free software; you can redistribute it and/or modify
 
10
    it under the terms of the GNU General Public License as published by
 
11
    the Free Software Foundation; either version 2 of the License, or
 
12
    (at your option) any later version.
 
13
 
 
14
    This program is distributed in the hope that it will be useful,
 
15
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
    GNU General Public License for more details.
 
18
 
 
19
    You should have received a copy of the GNU General Public License
 
20
    along with this program; if not, write to the Free Software
 
21
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
22
*/
 
23
#ifndef __LIBGVIEWER_TYPES_H__
 
24
#define __LIBGVIEWER_TYPES_H__
 
25
 
 
26
/* TODO: Change these for Big-Endian machines */
 
27
 
 
28
#define is_displayable(c) (((c) >= 0x20) && ((c) < 0x7f))
 
29
 
 
30
#define GV_FIRST_BYTE(x)  ((unsigned char)(x)&0xFF)
 
31
#define GV_SECOND_BYTE(x) ((unsigned char)((x)>>8)&0xFF)
 
32
#define GV_THIRD_BYTE(x)  ((unsigned char)((x)>>16)&0xFF)
 
33
#define GV_FOURTH_BYTE(x) ((unsigned char)((x)>>24)&0xFF)
 
34
 
 
35
/*
 
36
 Note:
 
37
 UTF-8 encoding supports up to 6 (six) bytes per single character.
 
38
 We use only 32bits (4 bytes) to hold a UTF-8 data.
 
39
 This means some exotic UTF-8 characters are NOT supported...
 
40
*/
 
41
typedef guint32  char_type ;
 
42
#define INVALID_CHAR ((char_type) -1)
 
43
/*
 
44
 Note:
 
45
 Currently on files<2GB are supported (even though this is unsigned)
 
46
*/
 
47
typedef unsigned long offset_type;
 
48
#define INVALID_OFFSET ((offset_type) -1)
 
49
 
 
50
 
 
51
#endif