Gregory Nutt
b54ffe858a
Standardization of some function headers.
2018-03-13 09:52:27 -06:00
Gregory Nutt
de6b13b3ab
Per OpenGroup.org, syslog -- and, hence, nonstandard vsyslog, and debug wrappers -- does not return a value. Rename _vsyslog to nx_vsyslog. Use internal nx_vsyslog in the few cases where a return value is required.
2018-03-04 08:07:07 -06:00
Gregory Nutt
1567b82429
Make sure that labeling is used consistently in all function headers (part 2).
2018-02-01 12:03:55 -06:00
Gregory Nutt
7cf88d7dbd
Make sure that labeling is used consistently in all function headers.
2018-02-01 10:00:02 -06:00
Gregory Nutt
e93cb86903
libc/stdio: in dtoa(), up_interrupt_context() is used in a debug assertion. up_interrupt_context() is not available in the user-mode phase of the PROTECTED or KERNEL build configurations. In those configurations, enabling libc floating point support and debug assertions will result in an undefined reference to up_interrupt_context().
2018-02-01 07:37:16 -06:00
Gregory Nutt
3521aaf944
Squashed commit of the following:
...
binfmt/, configs/, grahics/, libc/, mm/, net/, sched/: OS references to the errno variable should always use the set_errno(), get_errno() macros
arch/arm/src/stm32 and stm32f7: Architecture-specific code is not permitted to modify the errno variable. drivers/ and libc/: OS references to the errno variable should always use the set_errno(), get_errno() macros
2018-01-30 17:57:36 -06:00
Gregory Nutt
30dbae2dbe
reopen should return NULL when oflags is less than 0, not equal to 0.
...
Because negative value is returned on failure of lib_mode2offlags which converts the mode string into file open mode flag.
2017-12-21 12:04:17 -06:00
Oleg Evseev
d55e44b2ea
Fix sscanf character conversion (%c): do not add '\0' at the end as for strings, cause, for example, parsing one character will fill two bytes: character itself and zero one '\0' after it, so will overflow one byte variable argument and corrupt memory for variables allocated after it.
2017-11-19 13:33:46 -06:00
Gregory Nutt
181875f3ba
fs/vfs: Add new internal OS interface nx_read(). nx_read() is functionally equivalent to read() except that it does not modify the errno variable and it is not a cancellation point. Changed all references to read() in the OS to nx_read().
2017-10-11 12:13:41 -06:00
Gregory Nutt
a00d8e16a1
Adds OS internal function nx_write() which is functionally equivalent to write() except that it does not set the errno variable and do not cause cancellation points.
2017-10-11 10:18:30 -06:00
Gregory Nutt
cd417249c9
configs/z80sim: Fix a naming problem. Also, don't try to build the serial driver if CONFIG_NFILE_DESCRIPTOR=0.
2017-10-08 09:47:06 -06:00
Julien Lecoeur
f26e83d0a1
Fix -Werror=implicit-fallthrough on gcc7
2017-06-28 17:48:04 +02:00
Daniel Agar
30ab574060
libfflush remove extra semicolon
2017-06-04 12:20:48 -04:00
Gregory Nutt
d5207efb5a
Be consistent... Use Name: consistent in function headers vs Function:
2017-04-21 16:33:14 -06:00
Jussi Kivilinna
acec5e3199
vsnprintf(): If size is zero, then vsnprintf() should return the size of the required buffer without writing anything. This is same fix that was done for snprintf in 2014 by commit 59846a8fe9
.
2017-03-17 17:34:56 -06:00
Jussi Kivilinna
ac0d957f26
libc: printf: fix precision for string formatting. Fixes use of format precision to truncate input string.
2017-03-17 17:32:44 -06:00
Gregory Nutt
f97a99e051
C library: Remove unused static global from lib_dtoa.c
2017-02-26 18:17:08 -06:00
Gregory Nutt
1ca0437909
libc/Kconfig: Remove source'ing file twice. Use cleaner dependencies in some menus.
2017-02-10 10:28:34 -06:00
Gregory Nutt
67feda60b2
libc/Kconfig: Use menus vs. comments to better organize the C library menus
2017-02-10 10:04:56 -06:00
Gregory Nutt
de1b68dc4e
libc/Kconfig: Break big Kconfig up into separate Kconfig files in each libc subdirectory.
2017-02-10 09:32:55 -06:00
Gregory Nutt
9946969c6c
libc/stdio/Make.defs: the no-flush stubs now need to be built unconditionally
2017-02-09 16:37:17 -06:00
Gregory Nutt
98d072a1f7
Apparently setvbuf() size can be nonzero with _IONBF. That makes no sense, but is necessary if setbuf() is to work as it is defined at OpenGroup.org.
2017-02-09 15:39:33 -06:00
Gregory Nutt
c19aa094e1
C Library: Add setbuf() which is a trivial wrapper around setvbuf().
2017-02-09 15:04:53 -06:00
Gregory Nutt
889ff4b01e
setvbuf: Fix some compile errors in first build of logic to enable/disable buffering.
2017-02-09 09:53:50 -06:00
Gregory Nutt
1d290c2b37
setvbuf: Add support for disabling I/O buffering. Initially cut; untested.
2017-02-09 09:24:44 -06:00
Gregory Nutt
f126cd9d46
Remove comment about being based on a Newlib implementation. That is not true. This is an original work.
2017-02-08 14:17:25 -06:00
Gregory Nutt
a92887c63d
setvbuf: Correct some errors detected by code review.
2017-02-08 14:06:29 -06:00
Gregory Nutt
1393061400
Update some comments
2017-02-08 11:47:12 -06:00
Gregory Nutt
9f859774a1
setvbuf: Add support for configuration of line buffering.
2017-02-08 11:28:24 -06:00
Gregory Nutt
51a14c9b2f
C Library: Add a very limited, first step implementation of setvbuf(). This is a collaborative effort. Alan Carvalho de Assis did the initial prototype.
2017-02-08 10:33:18 -06:00
Gregory Nutt
4700499b59
C library: Remove comments blocks before empty sections
2017-02-08 07:55:37 -06:00
Gregory Nutt
ba2b345990
Remove a few remaining use of the obsolteted 'Compilation Switches' program section
2017-01-22 08:57:18 -06:00
Gregory Nutt
e3a535f66f
Fix verboten C99/C11 construct in sscanf()
2017-01-09 11:23:05 -06:00
Gregory Nutt
81712be04e
sscanf: Backs out logic of ca1150ce6c
2017-01-09 10:35:28 -06:00
Gregory Nutt
7fbc3ba1e1
Comments should begin with uppercase letters.
2017-01-09 09:22:46 -06:00
Gregory Nutt
07e832340f
dtoa: More white space
2017-01-07 15:13:48 -06:00
Gregory Nutt
e568253eb3
Update README, some comments, and fix some spacing.
2017-01-07 10:36:18 -06:00
Pierre-noel Bouteville
562fa6b400
Add debug assertion in libdtoa to catch attempts to use floating point output formats from within an interrupt handler. That will cause assertions or crashes downstream because __dtoa will attempt to allocate memory.
2017-01-06 15:45:03 -06:00
Gregory Nutt
8ce1fdaab0
Add an attribution to the scanset addition to sscanf()
2016-12-17 16:18:04 -06:00
Author: Aleksandr Vyhovanec
7be1b86a81
Add scansets to the scanf function. Enabled CONFIG_LIBC_SCANSET option.
2016-12-17 14:39:19 -06:00
Gregory Nutt
c83da3c48f
Remove minnsh configurations and support logic: up_getc() and lowinstream.
...
This was an interesting exercise to see just how small you could get NuttX, but otherwise it was not useful: (1) the NSH code violated the OS interface layer by callup up_getc and up_putc directly, and (2) while waiting for character input, NSH would call up_getc() which would hog all of the CPU. NOt a reasonably solution other than as a proof of concept.
2016-12-13 18:01:23 -06:00
Gregory Nutt
177239feae
sscanf: Use strtof() instead of strtod() if a short floating point value was requested. The should help performance with MCUs with 32-bit FPU support
2016-10-22 13:42:43 -06:00
Alan Carvalho de Assis
402b876869
Include wchar.h to lib_libvsprintf.c to fix compilation error
2016-10-18 13:32:03 -06:00
David Sidrane
7ee82c0168
Fixes sscan %sn where strlen(data) < n
2016-10-15 06:31:35 -10:00
Sebastien Lorquet
aed8a602b8
stdio: Add support for remove()
2016-08-25 08:40:34 -06:00
Gregory Nutt
0e35bad987
Update some comments
2016-08-11 10:12:04 -06:00
Gregory Nutt
f9d4b50207
If there are no streams, let printf() fall back to use syslog() for output.
2016-07-11 13:52:21 -06:00
Gregory Nutt
505ca542e8
Remove some last traces of lowvsyslog that were missed; Add a SYSLOG emergency channel for handling assertion output more cleanly
2016-06-20 16:11:50 -06:00
Gregory Nutt
4f97f15b5e
graphics/, libc/: Change some err() ERRORS to warn() WARNINGS or info()
2016-06-12 11:11:57 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00