Hi, I just downloaded & compiled pup v1.1 on linux
kernel 2.4.14. I like the program a lot. Thanks Matt.
In order to make the printer readback work, I had to up
the value of rTIMELIMIT in qqtimer() [settings.c]
It seems like opening the input file descriptor (i.e.
calling get_settings()) before the printer has
responded prevents me from seeing the response. I'm
not sure why this is. It seems like bad behavior on
the part of the parallel port to me. Anyhow, I'll put
a diff at the end of this post to illustrate what I
changed.
Possibly there's a typo in the (normally commented out)
debug code of proutines.c? The line
printf("zero at i=%d\n", i);
gets executed for every character of the readback
string. I'll put another diff at the end of this post.
Finally, while I was goofing around with the code, I
got tired of waiting for the compiles to complete, so I
respectfully suggest the following changes to the makefile.
Thanks again,
David
################# Makefile diffs ###################
diff -c Makefile Makefile.orig
*** Makefile Thu Dec 13 11:10:18 2001
--- Makefile.orig Thu Dec 13 11:07:24 2001
***************
*** 34,51 ****
lexgaugepop.c \
lexhand.c
- OBJS= $(SRCS:.c=.o)
-
- .SUFFIXES: .c .o
-
all: pup
@echo Done.
! pup: $(OBJS)
! $(CC) $(OBJS) `gtk-config --cflags` `gtk-config
--libs` -lz -o $@
!
! .c.o:
! $(CC) $< `gtk-config --cflags` -c -o $@
install: pup
install -d $(BINDIR)
--- 34,44 ----
lexgaugepop.c \
lexhand.c
all: pup
@echo Done.
! pup: $(SRCS)
! $(CC) $(SRCS) `gtk-config --cflags` `gtk-config
--libs` -lz -o $@
install: pup
install -d $(BINDIR)
################# settings.c diffs ###################
diff -c settings.c settings.c.orig
*** settings.c Thu Dec 13 12:54:50 2001
--- settings.c.orig Thu Dec 13 13:06:46 2001
***************
*** 352,359 ****
-------------------------------------------------------------------------
*/
gint qqtimer(io_struct *io)
{
! /* int rTIMELIMIT = 1; */ /* this is units of 100 ms */
! int rTIMELIMIT = 50;
put_query_message(&(io->msgbox), "Querying Printer");
/* note io->count is used by more than 1 timer (the
timers are only
--- 352,358 ----
-------------------------------------------------------------------------
*/
gint qqtimer(io_struct *io)
{
! int rTIMELIMIT = 1; /* this is units of 100 ms */
put_query_message(&(io->msgbox), "Querying Printer");
/* note io->count is used by more than 1 timer (the
timers are only
################# proutines.c diffs ###################
diff -c proutines.c proutines.c.orig
*** proutines.c Thu Dec 13 12:53:51 2001
--- proutines.c.orig Thu Dec 13 11:31:05 2001
***************
*** 303,313 ****
{
if(io->query[i] == '\n')
printf("|\n");
! else
printf("%c", io->query[i]);
}
- printf("zero at i=%d\n", i);
- fflush(stdout);
*/
/*
----------------------------------------------------------
*/
if(io->command == 3)
--- 303,312 ----
{
if(io->query[i] == '\n')
printf("|\n");
! else
printf("%c", io->query[i]);
+ printf("zero at i=%d\n", i);
}
*/
/*
----------------------------------------------------------
*/
if(io->command == 3)
Un-linewrapped version of original post
Logged In: YES
user_id=401298
Ack! Capricious line wrapping has damaged the diffs in this
post. I'll try to upload an un-damaged version as a text file.