search for: getc

Displaying 20 results from an estimated 45 matches for "getc".

Did you mean: get
2015 Aug 21
2
[PATCH 2/2] core/graphics: fix lss16 parsing
...der_t LSSHeader; +static uint16_t buffer_empty = 1; +static int buffer; + #define LSSMagic LSSHeader.LSSMagic #define GraphXSize LSSHeader.GraphXSize #define GraphYSize LSSHeader.GraphYSize @@ -114,15 +117,17 @@ static int vgasetmode(void) static inline char getnybble(void) { - char data = getc(fd); - - if (data & 0x10) { - data &= 0x0F; - return data; + if (buffer_empty) { + buffer_empty = 0; + buffer = getc(fd); + if (buffer == -1) + printf("EOF!\n"); + } else { + buffer >>= 4; + buffer_empty = 1; } - data = getc(fd); - return (data & 0x0F); + re...
2006 Oct 31
0
6266832 UNIX98/UNIX03: getc(), getchar(), putc(), putchar() did not set stream to byte orientation
Author: muffin Repository: /hg/zfs-crypto/gate Revision: fecd74c42540dbb707f29987c4b4e10ecff69818 Log message: 6266832 UNIX98/UNIX03: getc(), getchar(), putc(), putchar() did not set stream to byte orientation Files: update: usr/src/head/iso/stdio_iso.h
2015 Aug 20
4
boot logo via boot.txt
We recently have upgraded syslinux and have noticed that the boot logo code via boot.txt no longer works. I have a couple patches that get it close to working but I appear to be having trouble with color maps. Is there someone would want to help me finish figuring this out? Any interest in the patches I have to fix the rle decoder?
2001 Jul 29
1
2.2.19/0.0.7a: bonnie -> VM problems
...ve no dma errors. I had to adjust 2 rejects of 0.0.7a by hand (posted about these on the list), so you can say the problem is me and not ext3 :-). See at the end of this email. PROBLEM: I tried bonnie -d /path/to/3rd_ext3_HD -s 200 VM started killing processes when bonnie was at "Reading with getc()..." Happened twice, then I stopped testing. 8 bonnie runs at -s 128 -> 1 failure (at the 7th try) 1 bonnie run at -s 200 -> 1 failure (increased to 200 to put more stress) bonnie said something like: Reading with getc()...Bonnie: drastic I/O error (getc(3)): No such file or direc tor...
2012 Feb 04
3
the ^ and % operators in context
The % is modulus (remainder) operator and ^ is bitwise. In this context, we take a file, and go through each character and encrypt it. But why are the ^ and % operators used here: def encrypt(reader, writer) key_index = 0 while not reader.eof? clear_char = reader.getc encrypted_char = clear_char ^ @key[key_index] writer.putc(encrypted_char) key_index = (key_index + 1) % @key.size end end thanks for response -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to thi...
2005 Mar 17
1
ocfs seek-performance
...File '/tmp/ocfstest/Bonnie.7166', size: 1073741824, volumes: 1 Using O_DIRECT for block based I/O Writing with putc()... done: 10816 kB/s 59.1 %CPU Rewriting... done: 15607 kB/s 2.2 %CPU Writing intelligently... done: 18442 kB/s 2.1 %CPU Reading with getc()... done: 20908 kB/s 60.6 %CPU Reading intelligently... done: 45169 kB/s 4.4 %CPU Seeker 1...start 'em...done... ---Sequential Output (nosync)--- ---Sequential Input-- --Rnd Seek- -Per Char- -DIOBlock- -DRewrite- -Per Char- -DIOBlock- --04k (01)...
2014 Oct 30
0
Display graphic from filename broken?
> Hi, > > the display of LSS16 files from a DISPLAY file (as documented in > http://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:) > seems heavily broken since syslinux has been converted from assembler to > C. I already discovered one bug in core/include/graphics.h (and > core/graphics.c): the pointer VGAFilePtr is of type uint16_t*, but > should
2006 Jan 06
2
DO NOT REPLY [Bug 3382] New: hang in read() in exclude.test of testsuite
...ff800da6d4 in __filbuf(...) in /usr/shlib/libc.so (ladebug) up >3 0x120023574 in parse_filter_file(listp=0x140000010, fname=Info: no allocation applies for symbol fname at the current PC <no value>, mflags=1024, xflags=1) "exclude.c":999 999 if ((ch = getc(fp)) == EOF) { (ladebug) list $curline - 10 : 20 989 exit_cleanup(RERR_FILEIO); 990 } 991 return; 992 } 993 dirbuf[dirbuf_len] = '\0'; 994 995 while (1) { 996 cha...
2014 Oct 30
3
Display graphic from filename broken?
Hi, the display of LSS16 files from a DISPLAY file (as documented in http://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:) seems heavily broken since syslinux has been converted from assembler to C. I already discovered one bug in core/include/graphics.h (and core/graphics.c): the pointer VGAFilePtr is of type uint16_t*, but should be plain char*. This bug causes the
2008 Nov 22
5
[RFC][PATCH] Gfxboot COMBOOT module
...+ cmp eax,1 + jz exit + + cmp eax,2 + jz boot + + jmp input + +boot: + call far [gfx_bc_done] + mov ax,cs + mov es,ax + mov bx,command_line + mov ax,3 + int 22h +exit: + call far [gfx_bc_done] +error: + ret + +cb_table dw cb_status ; 0 + dw cb_fopen ; 1 + dw cb_fread ; 2 + dw cb_getcwd ; 3 + dw cb_chdir ; 4 + dw cb_readsector ; 5 +cb_len equ ($-cb_table)/2 + +gfx_cb: + push cs + pop ds + + cmp al,cb_len + jae gfx_cb_error + + movzx bx,al + add bx,bx + call word [bx+cb_table] + jmp gfx_cb_end +gfx_cb_error: + mov al,0ffh +gfx_cb_end: + retf + +; Return status info...
2015 Aug 22
0
[PATCH 2/2] core/graphics: fix lss16 parsing
...<3chas3 at gmail.com> <<<< I think this change is also already included in the patch quoted previously by Ady http://www.syslinux.org/archives/2015-July/023835.html -static inline char getnybble(void) +static inline char getnybble(uint8_t* last_nybble) { - char data = getc(fd); - if (data & 0x10) { - data &= 0x0F; - return data; - } + char data; + + if (*last_nybble & 0x10) + { + *last_nybble &= 0x0F; + return *last_nybble; +...
2009 Jan 31
1
"UI" keyword, pc_default and getline
...skipped in this case. This could be fixed by converting "skipline" to a function and calling it from "pc_default". - Sebastian diff --git a/core/parsecmd.inc b/core/parsecmd.inc index edca0b7..27e115f 100644 --- a/core/parsecmd.inc +++ b/core/parsecmd.inc @@ -97,12 +97,18 @@ getcommand: .eof: stc ret -.skipline: cmp al,10 ; Search for LF +.skipline: call skipline je .find - call getc jc .eof jmp short .skipline +skipline: cmp al,10 ; Search for...
2003 Nov 10
1
INCLUDE config command?
...main_config label l1 DEFAULT l2 kernel vmlinux ------------------------------- append some_options label l2 kernel vmlinux append some_different_options ------------------------------- I've had a look at getc.inc and presume that "Only one simultaneous use is supported" is the sticking point for nested config files? Regards, Jonathan -- Jonathan Sambrook Software Developer Designer Servers
2009 Apr 05
3
[PATCH] Gfxboot COMBOOT module
...+ cmp eax,1 + jz exit + + cmp eax,2 + jz boot + + jmp input + +boot: + call far [gfx_bc_done] + mov ax,cs + mov es,ax + mov bx,command_line + mov ax,3 + int 22h +exit: + call far [gfx_bc_done] +error: + ret + +cb_table dw cb_status ; 0 + dw cb_fopen ; 1 + dw cb_fread ; 2 + dw cb_getcwd ; 3 + dw cb_chdir ; 4 + dw cb_readsector ; 5 +cb_len equ ($-cb_table)/2 + +gfx_cb: + push cs + pop ds + + cmp al,cb_len + jae gfx_cb_error + + movzx bx,al + add bx,bx + call word [bx+cb_table] + jmp gfx_cb_end +gfx_cb_error: + mov al,0ffh +gfx_cb_end: + retf + +; Return status info...
2010 May 04
1
[PATCH] cat.c32: check if filename exists
...ntf(stderr, "Usage: cat.c32 filename\n"); + return 1; } printf("File = %s\n", argv[1]); f = fopen(argv[1], "r"); + if (!f) { + fprintf(stderr, "File name \"%s\" does not exist.\n", argv[1]); + return 1; + } + while ((ch = getc(f)) != EOF) putchar(ch); -- 1.6.0.4
2015 May 07
2
[LLVMdev] llvm cross compilation and simplescalar simulation for ARM
...iletype=asm susan.bc -o susan.s arm-linux-gcc -static -L/arm-toolchain/lib/path susan.s -lm -o susan.out or: clang -static -gcc-toolchain /arm-toolchain/path -target arm-linux -sysroot=/arm-toolchain/sysroot/path susan.c -o susan.out -lm but I encounter the problem about ‘uclibc’. There is no ‘_IO_getc’ in libc.a of uclibc, but clang&llc compile ‘getc’ in C source to ‘_IO_getc’ in assembler. I tried to use newer version of buildroot which support ‘glibc’ (like 'buildroot-2014.11'), but the newer version doesn’t support to set the ’Target ABI’ to ‘OABI’, someone says OABI rather EABI i...
2010 Mar 18
1
argv[0] doesn't contain module name and cat.c32 hangs with Syslinux 4.00-pre36
...ntf(stderr, "Usage: cat.c32 filename\n"); + return 1; } printf("File = %s\n", argv[1]); f = fopen(argv[1], "r"); + if (!f) { + fprintf(stderr, "File name \"%s\" does not exist.\n", argv[1]); + return 1; + } + while ((ch = getc(f)) != EOF) putchar(ch); Also a true cat.c32 module would be nice to have. So a cat.c32 module that doesn't display this part: =================================================== argv = 0x001e1e48 argv[0] = 0x07fdffbf = "?" argv[1] = 0x001e1e38 = "extlinux.conf" argv[2]...
2003 Jan 07
1
klibc-0.72 released
This adds [f]getc() and fgets() for parsing config files. Probably hard to avoid. Still trying to decide if I actually want to add system() or not. -hpa
2008 Mar 01
0
SYSLINUX 3.62 released
...nu: support sha256 and sha512 passwords Working on version 3.62 comboot: guarantee at least 256 shuffle descriptors Handle arbitrary numbers of shuffle descriptors Document changes shuffle: avoid computing block lists that will never converge Remove last users of getcbuf; reclaim the address space Change command line limit to 2047 characters simple menu: extend command line size to 2047 characters NEWS: document longer command line limit. getc: don't clobber AH; return CF=1, AL=0 on end of file Switch the display file and graphi...
2012 Sep 19
1
[PATCH 1/1] lua: Enabling io.read() in Lua.c32 with some restrictions
..._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) {...