Skip to content

Commit d8666b8

Browse files
committed
Merge pull request #79 from pettarin/master
Fixed issue with symlinks in Windows
2 parents 2d7c18d + ce22d05 commit d8666b8

11 files changed

+959
-11
lines changed

aeneas/cdtw/cint.c

-1
This file was deleted.

aeneas/cdtw/cint.c

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*
2+
3+
Portable fixed-size int definitions for the other Python C extensions.
4+
5+
__author__ = "Alberto Pettarin"
6+
__copyright__ = """
7+
Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
8+
Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
9+
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
10+
"""
11+
__license__ = "GNU AGPL v3"
12+
__version__ = "1.5.0"
13+
__email__ = "[email protected]"
14+
__status__ = "Production"
15+
16+
*/
17+
18+
#include "cint.h"
19+
20+
uint8_t le_u8_to_cpu(const unsigned char *buf) {
21+
return (uint8_t)buf[0];
22+
}
23+
uint8_t be_u8_to_cpu(const unsigned char *buf) {
24+
return (uint8_t)buf[0];
25+
}
26+
uint16_t le_u16_to_cpu(const unsigned char *buf) {
27+
return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
28+
}
29+
uint16_t be_u16_to_cpu(const unsigned char *buf) {
30+
return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
31+
}
32+
uint32_t le_u32_to_cpu(const unsigned char *buf) {
33+
return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
34+
}
35+
uint32_t be_u32_to_cpu(const unsigned char *buf) {
36+
return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
37+
}
38+
39+
int8_t le_s8_to_cpu(const unsigned char *buf) {
40+
return (uint8_t)buf[0];
41+
}
42+
int8_t be_s8_to_cpu(const unsigned char *buf) {
43+
return (uint8_t)buf[0];
44+
}
45+
int16_t le_s16_to_cpu(const unsigned char *buf) {
46+
return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
47+
}
48+
int16_t be_s16_to_cpu(const unsigned char *buf) {
49+
return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
50+
}
51+
int32_t le_s32_to_cpu(const unsigned char *buf) {
52+
return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
53+
}
54+
int32_t be_s32_to_cpu(const unsigned char *buf) {
55+
return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
56+
}
57+
58+
void cpu_to_le_u8(unsigned char *buf, uint8_t val) {
59+
buf[0] = (val & 0xFF);
60+
}
61+
void cpu_to_be_u8(uint8_t *buf, uint8_t val) {
62+
buf[0] = (val & 0xFF);
63+
}
64+
void cpu_to_le_u16(unsigned char *buf, uint16_t val) {
65+
buf[0] = (val & 0x00FF);
66+
buf[1] = (val & 0xFF00) >> 8;
67+
}
68+
void cpu_to_be_u16(uint8_t *buf, uint16_t val) {
69+
buf[0] = (val & 0xFF00) >> 8;
70+
buf[1] = (val & 0x00FF);
71+
}
72+
void cpu_to_le_u32(unsigned char *buf, uint32_t val) {
73+
buf[0] = (val & 0x000000FF);
74+
buf[1] = (val & 0x0000FF00) >> 8;
75+
buf[2] = (val & 0x00FF0000) >> 16;
76+
buf[3] = (val & 0xFF000000) >> 24;
77+
}
78+
void cpu_to_be_u32(uint8_t *buf, uint32_t val) {
79+
buf[0] = (val & 0xFF000000) >> 24;
80+
buf[1] = (val & 0x00FF0000) >> 16;
81+
buf[2] = (val & 0x0000FF00) >> 8;
82+
buf[3] = (val & 0x000000FF);
83+
}
84+
85+
void cpu_to_le_s8(unsigned char *buf, int8_t val) {
86+
buf[0] = (val & 0xFF);
87+
}
88+
void cpu_to_be_s8(uint8_t *buf, int8_t val) {
89+
buf[0] = (val & 0xFF);
90+
}
91+
void cpu_to_le_s16(unsigned char *buf, int16_t val) {
92+
buf[0] = (val & 0x00FF);
93+
buf[1] = (val & 0xFF00) >> 8;
94+
}
95+
void cpu_to_be_s16(uint8_t *buf, int16_t val) {
96+
buf[0] = (val & 0xFF00) >> 8;
97+
buf[1] = (val & 0x00FF);
98+
}
99+
void cpu_to_le_s32(unsigned char *buf, int32_t val) {
100+
buf[0] = (val & 0x000000FF);
101+
buf[1] = (val & 0x0000FF00) >> 8;
102+
buf[2] = (val & 0x00FF0000) >> 16;
103+
buf[3] = (val & 0xFF000000) >> 24;
104+
}
105+
void cpu_to_be_s32(uint8_t *buf, int32_t val) {
106+
buf[0] = (val & 0xFF000000) >> 24;
107+
buf[1] = (val & 0x00FF0000) >> 16;
108+
buf[2] = (val & 0x0000FF00) >> 8;
109+
buf[3] = (val & 0x000000FF);
110+
}
111+

aeneas/cdtw/cint.h

-1
This file was deleted.

aeneas/cdtw/cint.h

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
3+
Portable fixed-size int definitions for the other Python C extensions.
4+
5+
__author__ = "Alberto Pettarin"
6+
__copyright__ = """
7+
Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
8+
Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
9+
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
10+
"""
11+
__license__ = "GNU AGPL v3"
12+
__version__ = "1.5.0"
13+
__email__ = "[email protected]"
14+
__status__ = "Production"
15+
16+
*/
17+
18+
#ifdef _MSC_VER
19+
typedef __int8 int8_t;
20+
typedef __int16 int16_t;
21+
typedef __int32 int32_t;
22+
typedef __int64 int64_t;
23+
typedef unsigned __int8 uint8_t;
24+
typedef unsigned __int16 uint16_t;
25+
typedef unsigned __int32 uint32_t;
26+
typedef unsigned __int64 uint64_t;
27+
#else
28+
#include <stdint.h>
29+
#endif
30+
31+
uint8_t le_u8_to_cpu(const unsigned char *buf);
32+
uint8_t be_u8_to_cpu(const unsigned char *buf);
33+
uint16_t le_u16_to_cpu(const unsigned char *buf);
34+
uint16_t be_u16_to_cpu(const unsigned char *buf);
35+
uint32_t le_u32_to_cpu(const unsigned char *buf);
36+
uint32_t be_u32_to_cpu(const unsigned char *buf);
37+
38+
int8_t le_s8_to_cpu(const unsigned char *buf);
39+
int8_t be_s8_to_cpu(const unsigned char *buf);
40+
int16_t le_s16_to_cpu(const unsigned char *buf);
41+
int16_t be_s16_to_cpu(const unsigned char *buf);
42+
int32_t le_s32_to_cpu(const unsigned char *buf);
43+
int32_t be_s32_to_cpu(const unsigned char *buf);
44+
45+
void cpu_to_le_u8(unsigned char *buf, uint8_t val);
46+
void cpu_to_be_u8(unsigned char *buf, uint8_t val);
47+
void cpu_to_le_u16(unsigned char *buf, uint16_t val);
48+
void cpu_to_be_u16(unsigned char *buf, uint16_t val);
49+
void cpu_to_le_u32(unsigned char *buf, uint32_t val);
50+
void cpu_to_be_u32(unsigned char *buf, uint32_t val);
51+
52+
void cpu_to_le_s8(unsigned char *buf, int8_t val);
53+
void cpu_to_be_s8(unsigned char *buf, int8_t val);
54+
void cpu_to_le_s16(unsigned char *buf, int16_t val);
55+
void cpu_to_be_s16(unsigned char *buf, int16_t val);
56+
void cpu_to_le_s32(unsigned char *buf, int32_t val);
57+
void cpu_to_be_s32(unsigned char *buf, int32_t val);
58+

aeneas/cmfcc/cint.c

-1
This file was deleted.

aeneas/cmfcc/cint.c

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*
2+
3+
Portable fixed-size int definitions for the other Python C extensions.
4+
5+
__author__ = "Alberto Pettarin"
6+
__copyright__ = """
7+
Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
8+
Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
9+
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
10+
"""
11+
__license__ = "GNU AGPL v3"
12+
__version__ = "1.5.0"
13+
__email__ = "[email protected]"
14+
__status__ = "Production"
15+
16+
*/
17+
18+
#include "cint.h"
19+
20+
uint8_t le_u8_to_cpu(const unsigned char *buf) {
21+
return (uint8_t)buf[0];
22+
}
23+
uint8_t be_u8_to_cpu(const unsigned char *buf) {
24+
return (uint8_t)buf[0];
25+
}
26+
uint16_t le_u16_to_cpu(const unsigned char *buf) {
27+
return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
28+
}
29+
uint16_t be_u16_to_cpu(const unsigned char *buf) {
30+
return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
31+
}
32+
uint32_t le_u32_to_cpu(const unsigned char *buf) {
33+
return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
34+
}
35+
uint32_t be_u32_to_cpu(const unsigned char *buf) {
36+
return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
37+
}
38+
39+
int8_t le_s8_to_cpu(const unsigned char *buf) {
40+
return (uint8_t)buf[0];
41+
}
42+
int8_t be_s8_to_cpu(const unsigned char *buf) {
43+
return (uint8_t)buf[0];
44+
}
45+
int16_t le_s16_to_cpu(const unsigned char *buf) {
46+
return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
47+
}
48+
int16_t be_s16_to_cpu(const unsigned char *buf) {
49+
return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
50+
}
51+
int32_t le_s32_to_cpu(const unsigned char *buf) {
52+
return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
53+
}
54+
int32_t be_s32_to_cpu(const unsigned char *buf) {
55+
return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
56+
}
57+
58+
void cpu_to_le_u8(unsigned char *buf, uint8_t val) {
59+
buf[0] = (val & 0xFF);
60+
}
61+
void cpu_to_be_u8(uint8_t *buf, uint8_t val) {
62+
buf[0] = (val & 0xFF);
63+
}
64+
void cpu_to_le_u16(unsigned char *buf, uint16_t val) {
65+
buf[0] = (val & 0x00FF);
66+
buf[1] = (val & 0xFF00) >> 8;
67+
}
68+
void cpu_to_be_u16(uint8_t *buf, uint16_t val) {
69+
buf[0] = (val & 0xFF00) >> 8;
70+
buf[1] = (val & 0x00FF);
71+
}
72+
void cpu_to_le_u32(unsigned char *buf, uint32_t val) {
73+
buf[0] = (val & 0x000000FF);
74+
buf[1] = (val & 0x0000FF00) >> 8;
75+
buf[2] = (val & 0x00FF0000) >> 16;
76+
buf[3] = (val & 0xFF000000) >> 24;
77+
}
78+
void cpu_to_be_u32(uint8_t *buf, uint32_t val) {
79+
buf[0] = (val & 0xFF000000) >> 24;
80+
buf[1] = (val & 0x00FF0000) >> 16;
81+
buf[2] = (val & 0x0000FF00) >> 8;
82+
buf[3] = (val & 0x000000FF);
83+
}
84+
85+
void cpu_to_le_s8(unsigned char *buf, int8_t val) {
86+
buf[0] = (val & 0xFF);
87+
}
88+
void cpu_to_be_s8(uint8_t *buf, int8_t val) {
89+
buf[0] = (val & 0xFF);
90+
}
91+
void cpu_to_le_s16(unsigned char *buf, int16_t val) {
92+
buf[0] = (val & 0x00FF);
93+
buf[1] = (val & 0xFF00) >> 8;
94+
}
95+
void cpu_to_be_s16(uint8_t *buf, int16_t val) {
96+
buf[0] = (val & 0xFF00) >> 8;
97+
buf[1] = (val & 0x00FF);
98+
}
99+
void cpu_to_le_s32(unsigned char *buf, int32_t val) {
100+
buf[0] = (val & 0x000000FF);
101+
buf[1] = (val & 0x0000FF00) >> 8;
102+
buf[2] = (val & 0x00FF0000) >> 16;
103+
buf[3] = (val & 0xFF000000) >> 24;
104+
}
105+
void cpu_to_be_s32(uint8_t *buf, int32_t val) {
106+
buf[0] = (val & 0xFF000000) >> 24;
107+
buf[1] = (val & 0x00FF0000) >> 16;
108+
buf[2] = (val & 0x0000FF00) >> 8;
109+
buf[3] = (val & 0x000000FF);
110+
}
111+

aeneas/cmfcc/cint.h

-1
This file was deleted.

aeneas/cmfcc/cint.h

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
3+
Portable fixed-size int definitions for the other Python C extensions.
4+
5+
__author__ = "Alberto Pettarin"
6+
__copyright__ = """
7+
Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
8+
Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
9+
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
10+
"""
11+
__license__ = "GNU AGPL v3"
12+
__version__ = "1.5.0"
13+
__email__ = "[email protected]"
14+
__status__ = "Production"
15+
16+
*/
17+
18+
#ifdef _MSC_VER
19+
typedef __int8 int8_t;
20+
typedef __int16 int16_t;
21+
typedef __int32 int32_t;
22+
typedef __int64 int64_t;
23+
typedef unsigned __int8 uint8_t;
24+
typedef unsigned __int16 uint16_t;
25+
typedef unsigned __int32 uint32_t;
26+
typedef unsigned __int64 uint64_t;
27+
#else
28+
#include <stdint.h>
29+
#endif
30+
31+
uint8_t le_u8_to_cpu(const unsigned char *buf);
32+
uint8_t be_u8_to_cpu(const unsigned char *buf);
33+
uint16_t le_u16_to_cpu(const unsigned char *buf);
34+
uint16_t be_u16_to_cpu(const unsigned char *buf);
35+
uint32_t le_u32_to_cpu(const unsigned char *buf);
36+
uint32_t be_u32_to_cpu(const unsigned char *buf);
37+
38+
int8_t le_s8_to_cpu(const unsigned char *buf);
39+
int8_t be_s8_to_cpu(const unsigned char *buf);
40+
int16_t le_s16_to_cpu(const unsigned char *buf);
41+
int16_t be_s16_to_cpu(const unsigned char *buf);
42+
int32_t le_s32_to_cpu(const unsigned char *buf);
43+
int32_t be_s32_to_cpu(const unsigned char *buf);
44+
45+
void cpu_to_le_u8(unsigned char *buf, uint8_t val);
46+
void cpu_to_be_u8(unsigned char *buf, uint8_t val);
47+
void cpu_to_le_u16(unsigned char *buf, uint16_t val);
48+
void cpu_to_be_u16(unsigned char *buf, uint16_t val);
49+
void cpu_to_le_u32(unsigned char *buf, uint32_t val);
50+
void cpu_to_be_u32(unsigned char *buf, uint32_t val);
51+
52+
void cpu_to_le_s8(unsigned char *buf, int8_t val);
53+
void cpu_to_be_s8(unsigned char *buf, int8_t val);
54+
void cpu_to_le_s16(unsigned char *buf, int16_t val);
55+
void cpu_to_be_s16(unsigned char *buf, int16_t val);
56+
void cpu_to_le_s32(unsigned char *buf, int32_t val);
57+
void cpu_to_be_s32(unsigned char *buf, int32_t val);
58+

aeneas/cmfcc/cwave_func.c

-1
This file was deleted.

0 commit comments

Comments
 (0)