Hi,

I am afraid I don't have the time to show you the ropes... However, I can point 
you to the right direction.

#defines are preprocessor directives. They wreak havoc with the debugger (you 
cannot step through) and I do not understand them that well either. They are 
mostly legacy and are kept around to preserve compactness and style with 
previous code. Some of them are more functional, by giving a certain 
object-oriented style, or forcing several function prototypes and wrappers.

You can see what they are doing by using:

gcc <options> -E > progE.c

where <options> is the output from the make command for the file you are 
interested in (skipping the -c -o output part). The output progE.c can be 
compiled under kannel like the regular initial file.

There are plenty of tutorials and how-tos in the web on using the preprocessor 
in C.

BR,
Nikos
  ----- Original Message ----- 
  From: 张 
  To: [email protected] 
  Sent: Tuesday, January 12, 2010 8:40 AM
  Subject: waiting for help about to understanding the wap/wsp/wtp/wtls 
sourcecodes


        .I have read the protocol specifications doc such as wap-wtp-wtls 
downloaded from the wapforum,and understand how it works,but when i am reading 
the source codes of the wap/wsp/wtp/wtls,i'm very much puzzled,because they 
were defined in a very mysterious or magical way: los of struct/enum/union with 
( #define/"include...") in them,and also i can not understand how the 
definitions in the *def works,the styles of them looks like the overloading 
functions of C++,but i have never seen such styles in C before------.....Can 
someone teach me how to understand theirs Working principle??? thanks a lot...
                                                                                
               ZH   from  China
       


------------------------------------------------------------------------------
  ε¥½ηŽ©θ΄Ίε΅η­‰δ½ ε‘οΌŒι‚®η®±θ΄Ίε΅ε…¨ζ–°δΈŠηΊΏοΌ

Reply via email to