~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to src/lib/libpsio/psio.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#define PSIO_H
3
3
 
4
4
#include <stdio.h>
5
 
#include "psio.gbl"
 
5
 
 
6
#define PSIO_OPEN_NEW 0
 
7
#define PSIO_OPEN_OLD 1
 
8
 
 
9
#define PSIO_KEYLEN 80
 
10
#define PSIO_MAXVOL 8
 
11
#define PSIO_MAXUNIT 300
 
12
#define PSIO_MAXSTR 512
 
13
#define PSIO_PAGELEN 65536
 
14
 
 
15
typedef unsigned long int ULI;  /* For convenience */
 
16
 
 
17
typedef struct {
 
18
    ULI page;   /* First page of entry */
 
19
    ULI offset; /* Starting byte offset on fpage */
 
20
} psio_address;
6
21
 
7
22
/* A convenient address initialization struct */
8
23
extern psio_address PSIO_ZERO;
9
24
 
 
25
struct psio_entry {
 
26
    char key[PSIO_KEYLEN];
 
27
    psio_address sadd;
 
28
    psio_address eadd;
 
29
    struct psio_entry *next;
 
30
    struct psio_entry *last;
 
31
};
 
32
 
 
33
typedef struct psio_entry psio_tocentry;
 
34
 
 
35
typedef struct {
 
36
    char *path;
 
37
    int stream;
 
38
} psio_vol;
 
39
 
 
40
typedef struct {
 
41
    ULI numvols;
 
42
    psio_vol vol[PSIO_MAXVOL];
 
43
    ULI toclen;
 
44
    psio_tocentry *toc;
 
45
} psio_ud;
 
46
 
 
47
extern psio_ud *psio_unit;
 
48
 
 
49
#define PSIO_ERROR_INIT       1
 
50
#define PSIO_ERROR_DONE       2
 
51
#define PSIO_ERROR_MAXVOL     3
 
52
#define PSIO_ERROR_NOVOLPATH  4
 
53
#define PSIO_ERROR_OPEN       5
 
54
#define PSIO_ERROR_REOPEN     6
 
55
#define PSIO_ERROR_CLOSE      7
 
56
#define PSIO_ERROR_RECLOSE    8
 
57
#define PSIO_ERROR_OSTAT      9
 
58
#define PSIO_ERROR_LSEEK     10
 
59
#define PSIO_ERROR_READ      11
 
60
#define PSIO_ERROR_WRITE     12
 
61
#define PSIO_ERROR_NOTOCENT  13
 
62
#define PSIO_ERROR_TOCENTSZ  14
 
63
#define PSIO_ERROR_KEYLEN    15
 
64
#define PSIO_ERROR_BLKSIZ    16
 
65
#define PSIO_ERROR_BLKSTART  17
 
66
#define PSIO_ERROR_BLKEND    18
 
67
#define PSIO_ERROR_IDENTVOLPATH 19
 
68
#define PSIO_ERROR_MAXUNIT   20
 
69
 
10
70
#ifdef PSIO_STATS
11
71
extern ULI *psio_readlen;
12
72
extern ULI *psio_writlen;
56
116
 
57
117
int psio_open_check(unsigned int unit);
58
118
 
 
119
ULI psio_rd_toclen(unsigned int unit);
 
120
void psio_wt_toclen(unsigned int unit, ULI toclen);
59
121
 
60
122
#endif    /* #ifndef PSIO_H */