search for: ungetc

Displaying 20 results from an estimated 62 matches for "ungetc".

2004 Sep 10
2
Re: : flac and pipes problems (was: Possible bug)
...t; samples if not detected? The chances of a raw file starting: > > RIFFxxxxWAVEfmt > > Are not worth caring about. This is an old thread, but I have implemented a crude form of autodetection that should be sufficient. Basically, since the case we really care about is pipe input and ungetc only guarantees you 4 characters, it just checks for 'RIFF'. This should be enough since the usage clearly states that only WAVE files and raw are supported. Josh __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $...
2012 Sep 19
1
[PATCH 1/1] lua: Enabling io.read() in Lua.c32 with some restrictions
...ad_number() */ static int read_number (lua_State *L, FILE *f) { lua_Number d; if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) { @@ -283,8 +289,9 @@ static int read_number (lua_State *L, FILE *f) { return 0; /* read fails */ } } +#endif - +#ifndef NO_TEST_EOF /* no buffering -> no ungetc() -> no EOF test */ static int test_eof (lua_State *L, FILE *f) { int c = getc(f); ungetc(c, f); @@ -315,7 +322,6 @@ static int read_line (lua_State *L, FILE *f) { } } -#ifndef SYSLINUX /* Not used */ static int read_chars (lua_State *L, FILE *f, size_t n) {...
2009 Jul 15
0
[PATCH] gfxboot: parse TIMEOUT keyword
...or eax,eax ; timeout value (0: no timeout) - mov eax,100 ; timeout value (0: no timeout) + mov eax,[menu_timeout] ; timeout value (0: no timeout) call far [gfx_bc_input] ret @@ -786,6 +785,42 @@ do_default: .noparm: ret +do_timeout: + call skipspace + jz .eof + jc .noparm + call ungetc + push es + push di + push cs + pop es + mov di,NumBuf +.getnum: + cmp di,NumBufEnd + jae .loaded + call getc + stosb + cmp al,'-' + jnb .getnum + call ungetc + dec di +.loaded: + mov byte [di],0 + pop di + pop es + push cs + pop ds + mov si,NumBuf + push ebx + call par...
2009 Apr 05
3
[PATCH] Gfxboot COMBOOT module
...d: + call skipspace + jz .eof + jc .read + cmp al,'#' + je .nextline + or al,20h ; convert to lower case + mov di,configbuf + stosb +.read_loop: + call getc + jc .eof + cmp al,' ' + jbe .done + or al,20h ; convert to lower case + stosb + jmp .read_loop +.done: + call ungetc + + xor ax,ax + stosb +%ifdef DEBUG + mov ax,2 + mov bx, configbuf + int 22h + + mov ax,2 + mov bx, msg_crlf + int 22h +%endif + push si + push di + xor ecx,ecx + mov si,configbuf + mov di,label_keyword+1 + mov cl, byte [label_keyword] + call memcmp + pop di + pop si + jz .do_labe...
2008 Nov 22
5
[RFC][PATCH] Gfxboot COMBOOT module
...d: + call skipspace + jz .eof + jc .read + cmp al,'#' + je .nextline + or al,20h ; convert to lower case + mov di,configbuf + stosb +.read_loop: + call getc + jc .eof + cmp al,' ' + jbe .done + or al,20h ; convert to lower case + stosb + jmp .read_loop +.done: + call ungetc + + xor ax,ax + stosb +%ifdef DEBUG + mov ax,2 + mov bx, configbuf + int 22h + + mov ax,2 + mov bx, msg_crlf + int 22h +%endif + push si + push di + xor ecx,ecx + mov si,configbuf + mov di,label_keyword+1 + mov cl, byte [label_keyword] + call memcmp + pop di + pop si + jz .do_labe...
2020 Jul 25
0
[klibc:master] stdio: Add extern definition of clearerr()
...anged, 9 insertions(+), 1 deletion(-) diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild index ae5eb6dc..7929dee5 100644 --- a/usr/klibc/Kbuild +++ b/usr/klibc/Kbuild @@ -75,7 +75,7 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \ stdio/fread.o stdio/fwrite.o stdio/fflush.o \ stdio/ungetc.o stdio/fgetc.o \ stdio/fseek.o stdio/ftell.o stdio/rewind.o \ - stdio/fileno.o stdio/feof.o stdio/ferror.o + stdio/fileno.o stdio/feof.o stdio/ferror.o stdio/clearerr.o klib-$(CONFIG_KLIBC_ERRLIST) += errlist.o diff --git a/usr/klibc/stdio/clearerr.c b/usr/klibc/stdio/clearerr.c new f...
2009 Apr 09
0
[PATCH] gfxboot: parse DEFAULT keywork in syslinux config file
...ecx + mov si,configbuf + mov di,default_keyword+1 + mov cl, byte [default_keyword] + call memcmp + pop di + pop si + jz .do_default + .nextline: call skipline jmp .read @@ -723,6 +734,22 @@ parse_config: jmp .read +.do_default: + call skipspace + jz .eof + jc .noparm + call ungetc + push es + push di + push cs + pop es + mov di,dentry_buf + call getline + pop di + pop es + + jmp .read + .eof: .noparm: ret @@ -854,6 +881,7 @@ configbuf times trackbufsize db 0 ungetc_cnt db 0 ungetcdata db 0 label_keyword db 6,''label'',0 +default_keyword...
2002 Feb 28
2
isolinux source, detecting 8086 cpu
Hi, I was looking through isolinux and noticed you had trouble detecting 8086 cpu's. I have some experience with this so I thought you might like some different info. The behavior of the "push sp" instruction changed after the 8086 to pushing sp before updating it. I've included a snippet of one of my bootstraps in case you want to use it (or just want to understand better).
2014 Apr 09
0
[klibc:master] Remove obsolete enum _IO_file_flags
.../* Buffer has write data */ - _IO_FILE_FLAG_READ = 2, /* Buffer has read data */ - _IO_FILE_FLAG_LINE_BUF = 4, /* Line buffered */ - _IO_FILE_FLAG_UNBUF = 8, /* Unbuffered */ - _IO_FILE_FLAG_EOF = 16, - _IO_FILE_FLAG_ERR = 32, -}; - /* Assign this much extra to the input buffer in case of ungetc() */ #define _IO_UNGET_SLOP 32
2013 May 13
0
[klibc:sysconf] Framework and trivial implementation of sysconf(3)
...sconf.h> + #endif /* _UNISTD_H */ diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild index 2bef9ca..da1dce0 100644 --- a/usr/klibc/Kbuild +++ b/usr/klibc/Kbuild @@ -70,7 +70,8 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \ stdio/fread.o stdio/fwrite.o stdio/fflush.o \ stdio/ungetc.o stdio/fgetc.o \ stdio/fseek.o stdio/ftell.o stdio/rewind.o \ - stdio/fileno.o stdio/feof.o stdio/ferror.o + stdio/fileno.o stdio/feof.o stdio/ferror.o \ + sysconf/sysconf.o klib-$(CONFIG_KLIBC_ERRLIST) += errlist.o diff --git a/usr/klibc/sysconf/sysconf.c b/usr/klibc/sysconf/syscon...
2019 Sep 18
2
[PATCH] build: remove unused gnulib modules
...m4 /size_max.m4 /sleep.m4 /snprintf.m4 @@ -230,11 +201,8 @@ /string_h.m4 /strndup.m4 /strnlen.m4 -/strtoimax.m4 /strtoll.m4 -/strtol.m4 /strtoull.m4 -/strtoul.m4 /strtoumax.m4 /symlinkat.m4 /symlink.m4 @@ -252,8 +220,6 @@ /time_h.m4 /timespec.m4 /tls.m4 -/ttyname_r.m4 -/ulonglong.m4 /ungetc.m4 /unistd_h.m4 /unistd-safer.m4 @@ -261,7 +227,6 @@ /unlinkdir.m4 /unlink.m4 /usleep.m4 -/utimbuf.m4 /utimecmp.m4 /utime_h.m4 /utime.m4 @@ -276,20 +241,16 @@ /warnings.m4 /warn-on-use.m4 /wchar_h.m4 -/wchar.m4 /wchar_t.m4 /wcrtomb.m4 /wctob.m4 /wctomb.m4 /wctype_h.m4 -/wctype.m4 /...
2019 Sep 18
0
Re: [PATCH] build: remove unused gnulib modules
...trndup.m4 > /strnlen.m4 > -/strtoimax.m4 > /strtoll.m4 > -/strtol.m4 > /strtoull.m4 > -/strtoul.m4 > /strtoumax.m4 > /symlinkat.m4 > /symlink.m4 > @@ -252,8 +220,6 @@ > /time_h.m4 > /timespec.m4 > /tls.m4 > -/ttyname_r.m4 > -/ulonglong.m4 > /ungetc.m4 > /unistd_h.m4 > /unistd-safer.m4 > @@ -261,7 +227,6 @@ > /unlinkdir.m4 > /unlink.m4 > /usleep.m4 > -/utimbuf.m4 > /utimecmp.m4 > /utime_h.m4 > /utime.m4 > @@ -276,20 +241,16 @@ > /warnings.m4 > /warn-on-use.m4 > /wchar_h.m4 > -/wchar.m4 &g...
2019 Sep 23
0
[PATCH v2 5/5] build: remove unused gnulib modules
.../size_max.m4 /sleep.m4 /snprintf.m4 @@ -230,11 +190,8 @@ /string_h.m4 /strndup.m4 /strnlen.m4 -/strtoimax.m4 /strtoll.m4 -/strtol.m4 /strtoull.m4 -/strtoul.m4 /strtoumax.m4 /symlinkat.m4 /symlink.m4 @@ -252,16 +209,12 @@ /time_h.m4 /timespec.m4 /tls.m4 -/ttyname_r.m4 -/ulonglong.m4 -/ungetc.m4 /unistd_h.m4 /unistd-safer.m4 /unlinkat.m4 /unlinkdir.m4 /unlink.m4 /usleep.m4 -/utimbuf.m4 /utimecmp.m4 /utime_h.m4 /utime.m4 @@ -276,20 +229,15 @@ /warnings.m4 /warn-on-use.m4 /wchar_h.m4 -/wchar.m4 /wchar_t.m4 /wcrtomb.m4 /wctob.m4 /wctomb.m4 /wctype_h.m4 -/wctype.m4 /wint_t...
2007 Jan 25
5
Custom com32
Hi all I've written a basic COM32 module that checks (using the DMI example code) the product and BIOS and if the BIOS is not at the required level, is supposed to exit and boot using a DOS floppy image to flash the BIOS. The problem is that I can't work out how to call the DOS floppy image. Looking at the website, I see "Run Command" AX=0003H via int 22. The image name will
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...tc_unlocked(FILE *); __extern char *fgets(char *, int, FILE *); +__extern char *fgets_unlocked(char *, int, FILE *); #define getc(f) fgetc(f) __extern int getc_unlocked(FILE *); #define getc_unlocked(f) fgetc(f) #define getchar() fgetc(stdin) +#define getchar_unlocked() getchar() __extern int ungetc(int, FILE *); __extern int printf(const char *, ...); @@ -86,17 +93,24 @@ __extern int remove(const char *); __extern size_t _fread(void *, size_t, FILE *); __extern size_t _fwrite(const void *, size_t, FILE *); __extern int fflush(FILE *); +__extern int fflush_unlocked(FILE *); __extern s...
2012 May 31
1
klibc 2.0 release
...Greg Thelen (3): [klibc] ipconfig: check poll() return value [klibc] vsscanf: remove unused variables [klibc] nfsmount: clean up dummypmap compiler warning H. Peter Anvin (57): [klibc] Initial implementation of buffered stdio [klibc] Correct fdopen() [klibc] Add ungetc() [klibc] Saner definition for BUFSIZ [klibc] Whitespace fix Merge branch 'master' into stdio [klibc] ia64: remove obsolete <klibc/archsys.h> [klibc] Simple stdio test [klibc] Replace the stdio offset with a stdio data pointer [klibc] Bypass s...
2015 Dec 18
1
Assistance much appreciated
...restrict); extern void setbuf(FILE *restrict, char *restrict); extern int setvbuf(FILE *restrict, char *restrict, int, size_t); extern int fprintf(FILE *restrict, const char *restrict, ...); @@ -2816,9 +2809,9 @@ extern char *gets(char *); extern int puts(const char *); extern int ungetc(int, FILE *); - extern int fgetpos64(FILE *restrict, fpos_t *restrict); + extern int fgetpos(FILE *restrict, fpos_t *restrict); extern int fseek(FILE *, long int, int); - extern int fsetpos64(FILE *, const fpos_t *); + extern int fsetpos(FILE *, const fpos_t *); extern long ftell(FILE *);...
2014 Oct 31
1
[PATCH v2] launch: libvirt: Implement drive secrets (RHBZ#1159016).
Since v1: - Base64 decode the Ceph secret before passing it to libvirt. - Don't call virSecretFree (NULL) [libvirt bug?] - Small cleanups.
2017 Jun 27
0
[PATCH v3 3/5] threads: Use thread-local storage for errors.
...if (r != 0) { /* If pthread_mutex_destroy returns 16 (EBUSY), this indicates diff --git a/m4/.gitignore b/m4/.gitignore index 07960ed7b..a84b22e5c 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -248,6 +248,7 @@ /thread.m4 /time_h.m4 /timespec.m4 +/tls.m4 /ttyname_r.m4 /ulonglong.m4 /ungetc.m4 -- 2.13.0
2019 Sep 23
6
[PATCH v2 0/5] remove unused gnulib modules
This is an extended version of: https://www.redhat.com/archives/libguestfs/2019-September/msg00178.html It adds a couple of simple code changes, so it makes it possible to drop more modules. In addition, more unused modules were dropped. Pino Toscano (5): tests: switch away from xgetcwd daemon: move read_whole_file to common utils daemon: switch from read_file to read_whole_file daemon: