Kevin Ballard
a4059d3e60
Support wide characters in printf %c
2014-09-21 23:22:43 -07:00
Konrad Borowski
e0b78f7f2a
Disallow Unicode conversion specifications.
...
This stops fish from accessing the `bool ok[UCHAR_MAX + 1]` table
beyond allocated space potentially accessing memory that doesn't
belong to fish, and crashing.
2013-11-27 21:16:34 +01:00
Konrad Borowski
1eb09f3eb2
Fix compilation failures under Intel C compiler.
...
It appears that Intel C compiler doesn't recognize unsigned wchar_t,
however it doesn't appear to be important (the conversion function is
unused, and in other cases it doesn't appear to be needed).
2013-11-27 21:10:28 +01:00
ridiculousfish
cf766b55cc
Fix formatting
2013-10-26 15:27:39 -07:00
Konrad Borowski
4726221d18
Merge pull request #915 from GlitchMr/fix-printf
...
printf '\0' now works. Fixes #908 .
2013-07-19 00:17:37 -07:00
Konrad Borowski
91a04c7638
printf '\0' now works. Fixes #908 .
2013-07-17 15:24:23 +02:00
ridiculousfish
c522c0833a
Fix warnings about array subscript in builtin_printf.cpp
2013-07-16 13:38:15 -07:00
ridiculousfish
d3bb2a718a
Make printf support \e as the escape character
...
https://github.com/fish-shell/fish-shell/issues/910
2013-07-16 13:25:42 -07:00
ridiculousfish
2da81b0ae7
Formatting and style updates
2013-05-05 02:33:17 -07:00
ridiculousfish
bcab703e31
Fix a comment
2013-04-10 00:12:55 -07:00
ridiculousfish
5ed5d637b8
Fix %s format specifier for printf. No more elpfor at login.
2013-04-04 15:56:58 -07:00
ridiculousfish
e23a60a6bb
Another attempt to fix the printf tests on 32 bit Linux
2013-04-03 18:23:31 -07:00
ridiculousfish
11a444e914
Replace a formatted string with just a character copy
2013-04-03 13:30:45 -07:00
Siteshwar Vashisht
46e92e998e
Fixed compilation caused by misplaced '}' in builtin_printf.cpp
2013-03-29 12:02:50 +05:30
ridiculousfish
77dfd7b783
Fix printf's Unicode support
...
https://github.com/fish-shell/fish-shell/issues/625
2013-03-28 17:45:49 -07:00
ridiculousfish
37140d5e10
Fix builtin_printf compilation on FreeBSD 8.x
...
https://github.com/fish-shell/fish-shell/issues/626
2013-03-27 11:35:30 -07:00
ridiculousfish
40c0c5a298
Fix for errno-style error reporting in printf
2013-03-24 15:58:24 -07:00
ridiculousfish
3a475a99fc
Fix gettext macro to stop casting everything to wchar_t * (oops)
2013-03-24 15:58:24 -07:00
ridiculousfish
9394583f96
Implement actual error handling for builtin_printf. Fix the tests.
2013-03-24 15:58:24 -07:00
ridiculousfish
3b4f4c5f59
remove a variable length stack allocated array and simplify builtin printf
2013-03-24 15:58:24 -07:00
ridiculousfish
1d93e89eed
Replace some append_format with push_back
2013-03-21 22:36:21 -07:00
ridiculousfish
e0e0bcdc1e
Update code formatting
2013-03-21 17:44:51 -07:00
ridiculousfish
1ed8af2ee8
Some cleanup of builtin_printf. Eliminate global variables and a nasty macro.
2013-03-21 17:40:12 -07:00
Siteshwar Vashisht
5dbda6cd95
Fixed some case statements in hextobin function
2013-03-17 00:43:06 +05:30
Siteshwar Vashisht
d8dbdc83c0
Cleaned up some code in printf builtin
2013-03-17 00:28:12 +05:30
Siteshwar Vashisht
359a7cebde
Use wcstoimax and wcstoumax instead of strtoimax and strtoumax in printf builtin
2013-03-17 00:20:02 +05:30
Siteshwar Vashisht
490ead52eb
Changed octtobin, hextobin and isodigit macros into functions
2013-03-17 00:04:11 +05:30
Siteshwar Vashisht
a5a7a32447
Use fixed value "lld" instead of PRIdMAX
2013-03-16 23:32:26 +05:30
Siteshwar Vashisht
42be7733fe
Return EXIT_FAILURE in printf builtin if conversion to number fails
2013-03-04 23:25:14 +05:30
Siteshwar Vashisht
97c9c9c9d1
Use wmemcpy instead of mempcpy in printf builtin
2013-03-03 16:22:26 +05:30
Siteshwar Vashisht
ab52469fbb
Changed type of ok array in builtin_printf.cpp to bool
2013-03-03 15:32:32 +05:30
Siteshwar Vashisht
fba984272a
Fixed indentation in builtin_printf.cpp
2013-03-03 15:16:18 +05:30
Siteshwar Vashisht
be7d02ebdd
Added test cases for printf builtin
2013-03-03 00:45:34 +05:30
Siteshwar Vashisht
b989978dd3
Fixed code to support field width and precision
2013-03-02 20:54:12 +05:30
Siteshwar Vashisht
d9c9760aac
Initial version of printf builtin
2013-03-02 20:54:12 +05:30