c

info about intel Cos embedded i86 os

I've got some old Intel printer (Etherexpress XL ) print servers and they seem to be running an Intel OS called Cos aka Intel Client Os i86 I've found out that much just looking in the update files from Intel. It was at least partly written in C. How do I make a custom software image Intel Cos's boot loader will understand ? I know ...

How to skip the first line when fscanning a .txt file ?

Hello there, I am using C and my knowledge is very basic. I want to scan a file and get the contents after the first or second line only ... I tried : fscanf(pointer,"\n",&(*struct).test[i][j]); But this syntax simply starts from the first line =\ How is this possible ? Thanks. ...

windows keydown listeners in C

I am having a very hard time finding resources that talk about the windows message system. Mainly the keydown constant variables. I need to know what const varibles I need to listen for all keypress especially the arrow keys for C ...

x86-64 long double precision

hello. What is the actual precision of long double on Intel 64-bit platforms? is it 80 bits padded to 128 or actual 128 bit? if former, besides going gmp, is there another option to achieve true 128 precision? ...

One row is skipped each time the program scans a matrix from file !

Hello there, I had this code working yesterday, but it seems like I edited it a bit and lost the working version. I cant get this to work anymore. I basically want to scan a matrix from a .txt file. But each time it scans the first row, the second one is skipped, and it reads the third instead :( Here is my code : for(i=0;i<=test->ro...

lua c api: how to push a string with a null character in the middle?

normally, I would just use lua_pushstring(lua_State* L, const char* s); however, the string I want to push might have a null character in it. How do I make that work? ...

Is compiler able to do a procedural integration of functions imported from dll?

I know, that modern compilers can do procedural integration not only with functions defined inline, but also with functions residing in object files. But is this also true when you compile your program against shared library (especially dll)? Roughly speaking: will function code be copied into executable from dll, if that's desirable? ...

Design patterns commonly used for RTOS (VXworks)

Hi, Can anyone help me on design patterns commonly used for RTOS? In VXworks, which pattern is more preferable? ...

converting an array of characters to a const gchar*

I've got an array of characters which contains a string: char buf[MAXBUFLEN]; buf[0] = 'f'; buf[1] = 'o'; buf[2] = 'o'; buf[3] = '\0'; I'm looking to pass this string as an argument to the gtk_text_buffer_insert function in order to insert it into a GtkTextBuffer. What I can't figure out is how to convert it to a const gchar *, which ...

How do I get the file size of a large (> 4 GB) file?

How can I get the file size of a file in C when the file size is greater than 4gb? ftell returns a 4 byte signed long, limiting it to two bytes. stat has a variable of type off_t which is also 4 bytes (not sure of sign), so at most it can tell me the size of a 4gb file. What if the file is larger than 4 gb? ...

c arrays: setting size dynamically?

Hello, I am new to C programming. I am trying to set the size of the array using a variable but I am getting an error: Storage size of 'array' isn't constant !! 01 int bound = bound*4; 02 static GLubyte vertsArray[bound]; I have noticed that when I replace bounds (within the brackets on line 02) with the number say '20', the program...

how to reverse fill each entity of byte array?

i want to prepare a byte buffer as a upd packet i want to fill each value in reverse order how can i do so in ansi c i have to do this on windows system, ...

Bitwise Operations -- Arithmetic Operations..

Can you please explain the below lines, with some good examples. A left arithmetic shift by n is equivalent to multiplying by 2n (provided the value does not overflow). And: A right arithmetic shift by n of a two's complement value is equivalent to dividing by 2n and rounding toward negative infinity. If the bina...

Query Regarding Character Operations..

Hi, Please explain the following piece of code.. printf("%c\n",0+'0'); --> returns 0 printf("%c\n",1+'0'); --> returns 1 printf("%c\n",0+'1'); --> returns 1 printf("%c\n",1+'1'); --> returns 2 Thanx. ...

Linking LAPACK/BLAS libraries

Background: I am working on a project written in a mix of C and Fortran 77 and now need to link the LAPACK/BLAS libraries to the project (all in a Linux environment). The LAPACK in question is version 3.2.1 (including BLAS) from netlib.org. The libraries were compiled using the top level Makefile (make lapacklib and make blaslib). Probl...

Disable debug output in libxml2 and xmlsec

Hi, In my software, I use libxml2 and xmlsec to manipulate (obviously) XML data structures. I mainly use XSD schema validation and so far, it works well. When the data structure input by the client doesn't match the XSD schema, libxml2 (or xmlsec) output some debug strings to the console. Here is an example: Entity: line 1: parser er...

Embedding Ruby, calling a function from C

Hi, I'm writing an app that calls ruby code from c. I am having a little difficulty and wondered if anyone could point me in the rite direction. I currently have in my C. #include ruby.h main() { ruby_init(); rb_require("myRubyFile"); rb_funcall(rb_module_new(), rb_intern("RubyFunction"), 0, NULL); } My ruby file is in the sam...

What's the best framework for mobile phone apps in C And what's the best simulator for various mobile phones out there?

I'm just getting started with this field, so any information is appreciated! ...

How do I modify a HTTP response packet with winpcap?

There are two problems here: What if content is encoded:gzip... Do I also need to change the header part to make the HTTP packet valid(checksums if any?) UPDATE Can someone with actual experience elaborate the steps involved? I'm using winpcap and bpf tcp and src port 80 to filter the traffic,so my job lies in this callback functio...

Eclipse CDT printing selected C code snippets/functions

Is there a quick and dirty way to print(to dead trees) selected code (C in this case) snippets? In particular, I wanted to print about 200 lines worth of code, but print dialog only offers printing of particular pages or all pages, but not selected text! Of course, one can copy and paste into another editor, but that seems rather harsh...