forked from uqzzhao/Hodogram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutil.h
56 lines (34 loc) · 1.23 KB
/
util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef UTIL_H
#define UTIL_H
#include <QString>
#include <QVector>
typedef unsigned char byte;
void ibm2ieee(float* input, int swap);
void toibm (long *addr, int ll);
unsigned char ebasc(unsigned char ascii);
void ebasd(unsigned char* ascii, unsigned char* ebcd);
void asebd(char* ebcd, char* ascii);
char asebc(char ascii);
int setswap(int swap);
int i4(char* buf, int nbyte);
short i2(char* buf, int nbyte);
char i1(char* buf, int nbyte);
void f4(char *buf,int nbute);
void si4(char* buf, int nbyte, int i);
void si2(char* buf,int nbyte, short i);
void si1(char* buf, int nbyte, char i);
int swapi4(int x);
float swapf4(float x);
short swapi2(short x);
int swap (int x, int type);
float s4(char *buf,int nbyte);
void swapCh4(char *);
void swapCh2(char *);
unsigned char AsciiToEbcdic(unsigned char in_ebcdic_int);
unsigned char EbcdicToAscii(unsigned char in_ascii_int);
void float_to_ibm(int from[], int to[], int n, int endian);
QString getStringFromUnsignedChar( unsigned char *str, const int len );
void findMaxMin(float a[], int n, float &max, float &min);
void GetVectorMax(QVector<double> vector, double &m_Max);
void qString2ConstChar(QString str, char (&absFilePath)[200]);
#endif // UTIL_H