Skip to content

Commit 3c07fd2

Browse files
Modify the includes to be more standard
1 parent 45a0387 commit 3c07fd2

File tree

15 files changed

+103
-125
lines changed

15 files changed

+103
-125
lines changed

examples/gfx_tilemap/src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ void main(void) {
7070

7171
/* Draw tilemap and coords */
7272
gfx_Tilemap(&tilemap, x_offset, y_offset);
73-
gfx_FillRectangle(0,0,320,16);
74-
gfx_PrintStringXY("x offset:",48,4);
75-
gfx_PrintUInt(x_offset,4);
73+
gfx_FillRectangle(0, 0, 320, 16);
74+
gfx_PrintStringXY("x offset:", 48, 4);
75+
gfx_PrintUInt(x_offset, 4);
7676
gfx_PrintString(" y offset:");
77-
gfx_PrintUInt(y_offset,4);
77+
gfx_PrintUInt(y_offset, 4);
7878

7979
/* Do something based on the keypress */
8080
switch(key) {

examples/gfx_tilemap_compress/src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ void main(void) {
8888

8989
/* Draw tilemap and coords */
9090
gfx_Tilemap(&tilemap, x_offset, y_offset);
91-
gfx_FillRectangle(0,0,320,16);
92-
gfx_PrintStringXY("x offset:",48,4);
93-
gfx_PrintUInt(x_offset,4);
91+
gfx_FillRectangle(0, 0, 320, 16);
92+
gfx_PrintStringXY("x offset:", 48, 4);
93+
gfx_PrintUInt(x_offset, 4);
9494
gfx_PrintString(" y offset:");
95-
gfx_PrintUInt(y_offset,4);
95+
gfx_PrintUInt(y_offset, 4);
9696

9797
/* Do something based on the keypress */
9898
switch(key) {

src/std/ctype.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
/*************************************************
2-
* Copyright (C) 1999-2008 by Zilog, Inc.
3-
* All Rights Reserved
4-
*************************************************/
51
#ifndef CTYPE_H
62
#define CTYPE_H
73

8-
#define TRUE 1
4+
#define TRUE 1
95
#define FALSE 0
106

117
int isalnum(int c);

src/std/errno.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/*************************************************
1+
/*
22
* Copyright (C) 1999-2008 by Zilog, Inc.
33
* All Rights Reserved
4-
*************************************************/
4+
* Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform
5+
*/
56
#ifndef ERRNO_H
67
#define ERRNO_H
78

@@ -12,3 +13,4 @@
1213
#define ERANGE 5 /* range error */
1314
extern int errno;
1415
#endif
16+

src/std/float.h

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
/*************************************************
1+
/*
22
* Copyright (C) 1999-2008 by Zilog, Inc.
33
* All Rights Reserved
4-
*************************************************/
5-
4+
* Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform
5+
*/
66
#ifndef FLOAT_H
77
#define FLOAT_H
88

9-
#define FLT_RADIX 2 /* radix of exponent representation */
9+
#define FLT_RADIX 2 /* radix of exponent representation */
1010

11-
#define FLT_ROUNDS 0 /* addition rounds to nearest */
11+
#define FLT_ROUNDS 0 /* addition rounds to nearest */
1212

13-
/* number of base-FLT_RADIX digits in the mantissa */
13+
/* number of base-FLT_RADIX digits in the mantissa */
1414

1515
#define FLT_MANT_DIG 24
1616
#define DBL_MANT_DIG FLT_MANT_DIG
1717
#define LDBL_MANT_DIG FLT_MANT_DIG
1818

19-
/* number of decimal digits of precision */
19+
/* number of decimal digits of precision */
2020

2121
#define FLT_DIG 6
2222
#define DBL_DIG FLT_DIG
2323
#define LDBL_DIG FLT_DIG
2424

25-
/* minimum negative integer such that FLT_RADIX raised to that */
26-
/* power approximates a positive floating point number in the */
27-
/* range of representable values. */
25+
/* minimum negative integer such that FLT_RADIX raised to that */
26+
/* power approximates a positive floating point number in the */
27+
/* range of representable values. */
2828

2929
#define FLT_MIN_EXP -125
3030
#define DBL_MIN_EXP FLT_MIN_EXP
3131
#define LDBL_MIN_EXP FLT_MIN_EXP
3232

33-
/* maximum integer such that FLT_RADIX raised to that power */
34-
/* approximates a floating point number in the range of */
35-
/* representable numbers. */
33+
/* maximum integer such that FLT_RADIX raised to that power */
34+
/* approximates a floating point number in the range of */
35+
/* representable numbers. */
3636

3737
#define FLT_MAX_EXP 128
3838
#define DBL_MAX_EXP FLT_MAX_EXP
3939
#define LDBL_MAX_EXP FLT_MAX_EXP
4040

41-
/* maximum integer such that 10 raised to that power */
42-
/* approximates a floating point number in the range of */
43-
/* representable value ((int)log10(FLT_MAX),etc) */
41+
/* maximum integer such that 10 raised to that power */
42+
/* approximates a floating point number in the range of */
43+
/* representable value ((int)log10(FLT_MAX),etc) */
4444

4545
#define FLT_MAX_10_EXP +38
4646
#define DBL_MAX_10_EXP FLT_MAX_10_EXP
4747
#define LDBL_MAX_10_EXP FLT_MAX_10_EXP
4848

49-
/* minimum negative integer such that 10 raised to that power */
50-
/* approximates a positive floating point number in the range */
51-
/* of representable values ((int)log10(FLT_MIN),etc.) */
49+
/* minimum negative integer such that 10 raised to that power */
50+
/* approximates a positive floating point number in the range */
51+
/* of representable values ((int)log10(FLT_MIN),etc.) */
5252

5353
#define FLT_MIN_10_EXP -37
5454
#define DBL_MIN_10_EXP FLT_MIN_10_EXP
@@ -66,10 +66,11 @@
6666
#define DBL_EPSILON FLT_EPSILON
6767
#define LDBL_EPSILON FLT_EPSILON
6868

69-
/* minimum representable positive floating point numbers */
69+
/* minimum representable positive floating point numbers */
7070

7171
#define FLT_MIN 1.17549435E-38
7272
#define DBL_MIN FLT_MIN
7373
#define LDBL_MIN FLT_MIN
7474

7575
#endif
76+

src/std/format.h

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/*************************************************
1+
/*
22
* Copyright (C) 1999-2008 by Zilog, Inc.
33
* All Rights Reserved
4-
*************************************************/
5-
4+
* Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform
5+
*/
66
#ifndef FORMAT_H
77
#define FORMAT_H
88

@@ -19,7 +19,6 @@
1919
#define MINEXP -4
2020
#define DEFAULT_PRECISION 6
2121

22-
2322
/* format status codes */
2423
#define FMT_OK 0
2524
#define FMT_ERR 1
@@ -73,22 +72,6 @@ struct flt_info {
7372
unsigned char digits[MAXDIGITS]; /* max significant digits */
7473
};
7574

76-
#ifndef _MULTI_THREAD
77-
extern struct fmt_type __print_fmt;
78-
extern char __print_buff[];
79-
extern unsigned char __print_len;
80-
extern char __print_leading_char; // Initial +, -, or space for number
81-
extern char _PTR_ __print_out;
82-
83-
extern void __print_send();
84-
extern void __fprint_send();
85-
extern reentrant void __print_uputch(char); // Putch to uart
86-
extern reentrant void __print_sputch(char); // Putch to sprintf buffer
87-
extern void (*__print_xputch)(char);
88-
extern void __print_sendstring(char _PTR_);
89-
extern void __print_putch(char);
90-
//extern void __print_putromstring(char rom * sp);
91-
9275
extern void _u_stoa(short);
9376
extern void _u_ustoa(unsigned short);
9477
extern void _u_itoa(int);
@@ -100,28 +83,6 @@ extern int _u_scan(char _PTR_ src,char _PTR_ fmt,va_list ap);
10083
extern void _u_dtof(double);
10184
extern void _u_dtog(double);
10285

103-
#else /* _MULTI_THREAD */
104-
extern const struct fmt_type __clear_fmt_type;
105-
unsigned char __mt_print_send(char __print_leading_char,char* __print_buff,struct fmt_type* print_fmt);
106-
unsigned char __mt_sprint_send(char**dest,char __print_leading_char,char* __print_buff,struct fmt_type* print_fmt);
107-
unsigned char __mt_fprint_send(char __print_leading_char,char* __print_buff,struct fmt_type* print_fmt);
108-
unsigned char __mt_fsprint_send(char**dest,char __print_leading_char,char* __print_buff,struct fmt_type* print_fmt);
109-
unsigned char __mt_print_sendstring(char* sp,struct fmt_type* print_fmt);
110-
unsigned char __mt_sprint_sendstring(char** dest,char* sp,struct fmt_type* print_fmt);
111-
char _mt_stoa(short n,char* __print_buff,struct fmt_type* print_fmt);
112-
void _mt_ustoa(unsigned short n,char* __print_buff,struct fmt_type* print_fmt);
113-
char _mt_itoa(int n,char* __print_buff,struct fmt_type* print_fmt);
114-
void _mt_uitoa(unsigned int n,char* __print_buff,struct fmt_type* print_fmt);
115-
char _mt_ltoa(long val,char* __print_buff,struct fmt_type* print_fmt);
116-
void _mt_ultoa(unsigned long n,char* __print_buff,struct fmt_type* print_fmt);
117-
int _mt_print(char _PTR_ fmt,va_list argp);
118-
int _mt_sprint(char _PTR_ dest,char _PTR_ fmt,va_list argp);
119-
int _mt_scan(char _PTR_ fmt,va_list ap);
120-
int _mt_sscan(char _PTR_ src,char _PTR_ fmt,va_list ap);
121-
char _mt_dtof(double n,char* __print_buff,struct fmt_type* fmt);
122-
char _mt_dtog(double n,char* __print_buff,struct fmt_type* fmt);
123-
#endif
124-
12586
extern char _PTR_ _u_pscan(char _PTR_ fmt,struct fmt_type _PTR_ str, va_list _PTR_ argp);
12687
extern char _PTR_ _u_sscan (char _PTR_ fmt,struct fmt_type _PTR_ str);
12788

src/std/limits.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/*************************************************
2-
* Copyright (C) 1999-2011 by Zilog, Inc.
1+
/*
2+
* Copyright (C) 1999-2008 by Zilog, Inc.
33
* All Rights Reserved
4-
*************************************************/
4+
* Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform
5+
*/
56
#ifndef LIMITS_H
67
#define LIMITS_H
78

src/std/math.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/*************************************************
1+
/*
22
* Copyright (C) 1999-2008 by Zilog, Inc.
33
* All Rights Reserved
4-
*************************************************/
4+
* Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform
5+
*/
56
#ifndef MATH_H
67
#define MATH_H
78

src/std/setjmp.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
* Copyright (C) 1999-2008 by Zilog, Inc.
3+
* All Rights Reserved
4+
*/
15
#ifndef __SETJMP_H
26
#define __SETJMP_H
37

src/std/stdarg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/*************************************************
1+
/*
22
* Copyright (C) 1999-2008 by Zilog, Inc.
33
* All Rights Reserved
4-
*************************************************/
4+
*/
55
#ifndef STDARG_H
66
#define STDARG_H
77

0 commit comments

Comments
 (0)