plptools
Loading...
Searching...
No Matches
sistypes.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 2002 Daniel Brahneborg <basic.chello@se>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef _SISTYPES_H
21#define _SISTYPES_H
22
23#include <stdint.h>
24#include <sys/types.h>
25
29enum SisRC {
30 SIS_OK = 0,
40};
41
42extern uint16_t read16(uint8_t* p);
43
44extern uint32_t read32(uint8_t* p);
45
46extern void write16(uint8_t* p, int val);
47
48extern void createCRCTable();
49
50extern uint16_t updateCrc(uint16_t crc, uint8_t value);
51
52extern int logLevel;
53
59{
60 uint16_t m_no;
61 char m_code[3];
62 const char* m_name;
63};
64
66
67#endif
void createCRCTable()
Definition: sistypes.cpp:27
SisRC
Return Codes.
Definition: sistypes.h:29
@ SIS_OK
Definition: sistypes.h:30
@ SIS_ABORTED
Definition: sistypes.h:35
@ SIS_TRUNCATEDDATA
Definition: sistypes.h:32
@ SIS_VER_EARLIER
Definition: sistypes.h:37
@ SIS_DIFFERENT_APP
Definition: sistypes.h:36
@ SIS_TRUNCATED
Definition: sistypes.h:31
@ SIS_CORRUPTED
Definition: sistypes.h:33
@ SIS_FAILED
Definition: sistypes.h:34
@ SIS_SAME_OR_LATER
Definition: sistypes.h:38
@ SIS_OTHER_VARIANT
Definition: sistypes.h:39
uint16_t updateCrc(uint16_t crc, uint8_t value)
Definition: sistypes.cpp:41
LangTableEntry langTable[]
Definition: sistypes.cpp:73
uint32_t read32(uint8_t *p)
Definition: sistypes.cpp:62
void write16(uint8_t *p, int val)
Definition: sistypes.cpp:67
int logLevel
Definition: sistypes.cpp:25
uint16_t read16(uint8_t *p)
Definition: sistypes.cpp:57
Holder of a language entry, translating from language numbers to names.
Definition: sistypes.h:59
const char * m_name
Definition: sistypes.h:62
uint16_t m_no
Definition: sistypes.h:60
char m_code[3]
Definition: sistypes.h:61