Flash Gordon wrote:
samuabreu wrote:
I'm currently developing an API of Twain for Java. As Twain is
implemented in C (and in fact Im writing and calling C methods from the
app) I couldn't find a better group to search for twain development
related issues.
You can't be very good at searching. It took me under 30 seconds to find
the mailing lists over on twain.org.
Here's my question:
Does anyone know why when I negociate the capabilities ICAP_XRESOLUTION
<snip>
All completely off topic here. We only deal with programming in C, not
the billions of pieces of software and libraries that other people have
written in C.
"My toaster has a microcontroler that was programmed in C and it's
burning toast. How do I make it stop toasting before the toast is burnt?"
You can use toast.h, a non-standard C library i just invented:
#include <toast.h>
#include <stdio.h>
#define TOAST_AS_I_LIKE_IT_MINS 3
int main( int iargc, char *cargv[] ){
//We first initialize the toaster.
if( Toaster_Init( TOASTER_GENERIC ) == FALSE )
printf( "\nNo toast for u today :(~" );
return 0;
}
//Check bread ready... :P
if( Toaster_Bread_Or_Other_Toastable_Item_Insert() == TRUE ){
//.... Looking good ....
if( Toaster_Begin_Toast_Op( TOAST_AS_I_LIKE_IT_MINS ) == FALSE ){
printf( "\nNearly had it that time, bugger!" );
return 0;
}
//Don't forget to pop the bread...
if( Toaster_Pop_Bread_Or_Other_Toastable_Item() == FALSE ){
printf( "\nFuck, bread burning, quick nimwit get a knife!" );
return 0;
}
//Always inform the user.
printf( "\nToasting complete, enjoy!" );
}
else{
//Insert bread msg.
printf( "\nNo toastable item inserted into tray %i", Toaster_Tray());
return 0;
}
//Good job.
return 1;
}
P.S. I'm releasing this under GPL.