Commit graph

61 commits

Author SHA1 Message Date
zik.saleeba 235736ed93 Fixed some problems with getc() not removing EOL as it should.
git-svn-id: http://picoc.googlecode.com/svn/trunk@512 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 02:42:17 +00:00
zik.saleeba 15d5600c83 Fixed a problem with clibrary.c BUILTIN_MINI_STDLIB PlatformExit() not following the new function prototype. Fixes issue 107.
git-svn-id: http://picoc.googlecode.com/svn/trunk@481 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-08-08 11:42:18 +00:00
zik.saleeba e977f325ae Now has the ability to use GNU readline for input editing
git-svn-id: http://picoc.googlecode.com/svn/trunk@461 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-05 19:53:34 +00:00
zik.saleeba ff7aadcc11 Fixed a little bit-rot in clibrary.c
git-svn-id: http://picoc.googlecode.com/svn/trunk@455 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 17:00:54 +00:00
zik.saleeba 5efb924e6a Fixed a problem with declarations for libraries not being compatible with
some C90 compilers.


git-svn-id: http://picoc.googlecode.com/svn/trunk@449 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-01 19:48:04 +00:00
zik.saleeba 907f2b26d9 Changed "NativePointer" to "Pointer" for brevity
git-svn-id: http://picoc.googlecode.com/svn/trunk@437 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-13 14:41:03 +00:00
zik.saleeba 40e338b823 Added printf() and variants to stdio
git-svn-id: http://picoc.googlecode.com/svn/trunk@424 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-11 17:12:49 +00:00
zik.saleeba ea10e1a369 Added function prototypes as requested in issue #74
git-svn-id: http://picoc.googlecode.com/svn/trunk@410 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-03-01 20:39:08 +00:00
zik.saleeba a4f2345811 Fix for bug #73 - printing zero with field width was incorrect
git-svn-id: http://picoc.googlecode.com/svn/trunk@406 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-02-25 20:10:51 +00:00
zik.saleeba 5e6ddfa7ff Fixed a bug which was causing sprintf() to crash.
Added a test for it.
Issue #66


git-svn-id: http://picoc.googlecode.com/svn/trunk@401 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-14 11:11:38 +00:00
zik.saleeba d09e156558 Fixes for Surveyor SRV-1 platform
git-svn-id: http://picoc.googlecode.com/svn/trunk@398 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-08 19:23:50 +00:00
zik.saleeba 5a4161261e Now using our own versions of string functions so we're not relying on the
system to provide them for us.


git-svn-id: http://picoc.googlecode.com/svn/trunk@394 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-08 11:41:00 +00:00
zik.saleeba fcc6fd6846 Fixed printing of longs
git-svn-id: http://picoc.googlecode.com/svn/trunk@393 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 21:12:12 +00:00
zik.saleeba c3dcac1812 Added long and unsigned long data types
git-svn-id: http://picoc.googlecode.com/svn/trunk@392 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 21:05:15 +00:00
zik.saleeba 31bfd34e9e Now works for Opteron 64-bit
git-svn-id: http://picoc.googlecode.com/svn/trunk@383 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 13:44:08 +00:00
zik.saleeba aea16db269 Made strcmp() results more consistent for testing
git-svn-id: http://picoc.googlecode.com/svn/trunk@376 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-04 20:45:32 +00:00
zik.saleeba e75518e139 Changed the way that arrays are represented to a simpler one without
the extra level of indirection.
Fixed various array-related problems, including array assignment
which is issue #49.


git-svn-id: http://picoc.googlecode.com/svn/trunk@373 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-04 02:02:37 +00:00
zik.saleeba 274f21fdbc Removed "unsigned char" - now all chars are unsigned again.
git-svn-id: http://picoc.googlecode.com/svn/trunk@370 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:16:19 +00:00
zik.saleeba f1aeadb077 Removed redundant "struct ArrayValue"
git-svn-id: http://picoc.googlecode.com/svn/trunk@369 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:10:48 +00:00
zik.saleeba 18acb6dc1a Removed old pointer system. Now it's "native pointers" all the way.
git-svn-id: http://picoc.googlecode.com/svn/trunk@368 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:02:31 +00:00
zik.saleeba 24ec7290ee Removed incorrect header
git-svn-id: http://picoc.googlecode.com/svn/trunk@360 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-31 14:15:57 +00:00
zik.saleeba b7eb4bee92 Fixed a couple of problems with floating point number printing.
Numbers outside the range 0 - 1e7 wouldn't print correct values.


git-svn-id: http://picoc.googlecode.com/svn/trunk@356 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-29 21:43:36 +00:00
zik.saleeba 50b45890bc Fixed array indexing issue.
Fixed problem in index() and rindex() NULL pointer returns.
Nicer handling of printing NULL pointers.
New test suite for strings.


git-svn-id: http://picoc.googlecode.com/svn/trunk@353 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-28 21:34:51 +00:00
zik.saleeba b0c74d8c00 Fixed a bug in pointer coercion which was breaking string functions.
git-svn-id: http://picoc.googlecode.com/svn/trunk@350 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-26 20:00:01 +00:00
zik.saleeba 1239d6d8a8 Added some more string functions
git-svn-id: http://picoc.googlecode.com/svn/trunk@349 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 21:12:06 +00:00
zik.saleeba e577555218 Added string and memory functions to the C library.
git-svn-id: http://picoc.googlecode.com/svn/trunk@348 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 21:04:03 +00:00
zik.saleeba 24a601271a malloc() and free() implemented.
git-svn-id: http://picoc.googlecode.com/svn/trunk@346 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 20:50:56 +00:00
zik.saleeba c6d483ee6f Unsigned types now exist. They're probably not handled quite correctly in expressions yet though.
git-svn-id: http://picoc.googlecode.com/svn/trunk@345 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 11:54:34 +00:00
zik.saleeba 8c7434424d Native pointers no longer carry their size with them.
git-svn-id: http://picoc.googlecode.com/svn/trunk@344 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-23 19:01:32 +00:00
zik.saleeba 196331d6ba 'short' data type added
git-svn-id: http://picoc.googlecode.com/svn/trunk@340 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-11 11:09:07 +00:00
zik.saleeba 7d135bbdd5 Doing some work on casts and sizeof
git-svn-id: http://picoc.googlecode.com/svn/trunk@337 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-10 14:49:49 +00:00
zik.saleeba 902aac9a94 Added support for '%x', '%u' and '%b' in printf formatting
git-svn-id: http://picoc.googlecode.com/svn/trunk@333 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-15 15:08:05 +00:00
zik.saleeba 93713ed830 Removed asinh(), acosh(), atanh() as unnecessary.
Added exit().

git-svn-id: http://picoc.googlecode.com/svn/trunk@332 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-15 14:33:21 +00:00
zik.saleeba 32727cc365 Native pointers feature added
git-svn-id: http://picoc.googlecode.com/svn/trunk@331 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-05 00:55:54 +00:00
zik.saleeba 3a1e39f9d3 New fancy error reporting feature makes nice error messages
git-svn-id: http://picoc.googlecode.com/svn/trunk@330 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-04 07:41:06 +00:00
zik.saleeba 2a69c48777 Fixed a bug in parsing "while ()" and "do..while()". I tried to be too clever. Bad idea.
git-svn-id: http://picoc.googlecode.com/svn/trunk@329 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-04 00:18:28 +00:00
zik.saleeba 390ff153a1 printf() now handles various formats of strings
git-svn-id: http://picoc.googlecode.com/svn/trunk@328 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-03 08:40:30 +00:00
zik.saleeba eb6f323f06 HeapAlloc() changed to HeapAllocMem() to avoid clash with win32 namespace.
git-svn-id: http://picoc.googlecode.com/svn/trunk@321 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 08:00:02 +00:00
zik.saleeba bb0d19a733 Now conforms fully to the ISO C90 standard
git-svn-id: http://picoc.googlecode.com/svn/trunk@320 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 07:50:46 +00:00
zik.saleeba 4bc228c439 Fixed bogus references to native math library
git-svn-id: http://picoc.googlecode.com/svn/trunk@306 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-29 00:21:58 +00:00
zik.saleeba a38afda0ab Limited decimal printing to sane precision.
Made C library able to access new math library.
UNIX compile defaults to using new math library.
Changed name of new math library to math.library.c
Added defines for new math library.
Renamed new soft floating point library to softfloat_library.c

git-svn-id: http://picoc.googlecode.com/svn/trunk@304 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-29 00:12:12 +00:00
zik.saleeba 11e56d378c Added some extra math library functions.
The beginnings of support for soft float and math library. Not working yet.


git-svn-id: http://picoc.googlecode.com/svn/trunk@303 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-28 08:22:24 +00:00
zik.saleeba d1d1b7e84e Fixed a problem with type coercion on parameter passing.
Added a handy feature for better-than-C type coercion in printf().
Added a regression test for all sorts of type coercion.

git-svn-id: http://picoc.googlecode.com/svn/trunk@298 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 23:54:22 +00:00
zik.saleeba 4949ad046a Added type coercion to floating point from numeric types in parameters.
git-svn-id: http://picoc.googlecode.com/svn/trunk@295 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 05:03:48 +00:00
zik.saleeba 83d6b9a6d3 Added a new math library.
Fixed printing of floating point 0.0.


git-svn-id: http://picoc.googlecode.com/svn/trunk@294 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 04:55:44 +00:00
zik.saleeba 8092d67c70 Fixed a problem with printing negative floating point numbers
git-svn-id: http://picoc.googlecode.com/svn/trunk@292 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 03:43:37 +00:00
zik.saleeba eac072593c Nicer formatting of '.0'
git-svn-id: http://picoc.googlecode.com/svn/trunk@287 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-26 23:23:39 +00:00
zik.saleeba 758955fc11 A slightly better fix for the FP printing problem
git-svn-id: http://picoc.googlecode.com/svn/trunk@286 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-26 22:42:38 +00:00
zik.saleeba b9df205e6a Fixed a bug in floating point printing
git-svn-id: http://picoc.googlecode.com/svn/trunk@285 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-26 22:31:42 +00:00
zik.saleeba a76fc34881 By popular demand I'm adding support for native pointers. It's a work in progress - not working yet.
git-svn-id: http://picoc.googlecode.com/svn/trunk@277 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-06 00:25:09 +00:00