Re: GCC problem



On Wed, 18 Jul 2007 07:19:17 +0000, westymatt wrote:

I switched my code over to using what I believe to be the K&R style
function definitions.

63 /*pcap_loop callback routine*/
64 void
65 capture_callback(buffer, packet_header, data)
66 u_char *buffer, const struct pcap_pkthdr
*packet_header, u_char *data;
67 {
68 total_captured_packets++;
69 if (display == true)
70 {
71 fprintf(stdout, "Received packet %d\n");
72 }
73 if (cache_packets == true)
74 {
75 struct packetCache *pc;
76 if ((pc = malloc(sizeof *pc + packet_header->len)) ==
NULL)
77 {
78 fprintf(stderr, "Memory Allocation Error!\n");
79 fprintf(stderr, "Turning off caching\n");
80 cache_packets = false;
"packman.c" 230L, 5444C written
sysadmin@devbox:~/projects/packet_capture$ gcc -c packman.c
packman.c: In function âcapture_callbackâ:
packman.c:66: error: expected identifier or â(â before âconstâ
packman.c:76: error: invalid type argument of â->â

You should buy the second edition before doing that.

--
Mike McGinn
"more kidneys than eyes!"
.



Relevant Pages

  • [PATCH 2.6.17.13] display: Driver ks0108 and cfag12864b
    ... Adds support for additional "display" devices, like small LCD screens. ... +void cfag12864b_E(unsigned char _State) ... +void cfag12864b_CS1 ...
    (Linux-Kernel)
  • Re: Paint issues
    ... One text is displayed centered just before to display the virtual keyboard and the other is the message displayed centered when taking in account the keyboard. ... void CxStatic::PreSubclassWindow ... LOGFONT lf; ... void CxStatic::Format(LPCTSTR szFmt, ...) ...
    (microsoft.public.vc.mfc)
  • Re: Paint issues
    ... I use this CStatic as m_ctlText to display a text VERTICALLY CENTERED ... void CxStatic::PreSubclassWindow ... LOGFONT lf; ... void CxStatic::Format(LPCTSTR szFmt, ...) ...
    (microsoft.public.vc.mfc)
  • Paint issues
    ... One text is displayed centered just before to display the virtual keyboard and the other is the message displayed centered when taking in account the keyboard. ... void CxStatic::PreSubclassWindow ... BOOL CxStatic::SetBitmap(UINT nIDResource, ImageSize Emode, COLORREF rgbTransparent) ... void CxStatic::Format(LPCTSTR szFmt, ...) ...
    (microsoft.public.vc.mfc)
  • [PATCH 2/2] display: Driver ks0108 and cfag12864b
    ... Adds support for additional "display" devices, ... +static const unsigned int FirstMinor = 0; ... +void cfag12864b_E(unsigned char _State) ... +void cfag12864b_CS1 ...
    (Linux-Kernel)