Some question about function StartPage() in Rastertohp.c

Zhang xin anonymous at easysw.com
Wed Nov 9 18:35:10 PST 2005


Hello evewryone!I'm a beginner for LINUX & cups,so now i try to understand it by reading sourcecode,and now i select the Rastertohp.c to read.
Now i'm puzzling in some point,so i want to look for some help from here,thanks alot:)
The version of CUPS source that i read is cups-1.2svn-r4810,the source code is Rastertohp.c in \filter,and i have some questions about StartPage() in this file:
at line 182,the code is:
   if ((!Duplex || (Page & 1)) && header->MediaPosition)
i can't understand it ,because the variable "Page" has already became nonzero when StartPage() was called(at line 799,in main() function, Page was assign to 0,and at line 807,the code is "Page ++;",so it should be a nonzero value,i think).So in this sentence, (!Duplex || (Page & 1) is always a nonzero,and at line 259, it's appear again, and there many places using it,why?

thanks alot again:)




More information about the cups-devel mailing list