bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6341: 23.2; font-lock-mode not work properly for certain C file cont


From: Michael Jin
Subject: bug#6341: 23.2; font-lock-mode not work properly for certain C file content
Date: Thu, 3 Jun 2010 09:32:29 -0400

Sorry, that description only applies for version 21.3. For 23.2, it seems to have been fixed ( but I did observe it happened once for that file with full content rather than the provided snippet) .

Michael

 

 

From: Michael Jin
Sent: Thursday, June 03, 2010 8:59 AM
To: 'address@hidden'
Subject: 23.2; font-lock-mode not work properly for certain C file content

 

*** E-Mail body has been placed on clipboard, please paste it here! ***

--=-=-=

Content-Type: text

Content-Disposition: inline; filename=a.c

Content-Description: a piece of C code that will trigger malfunction of

 font-lock-mode

 

 

 

/*

DESCRIPTION

This library provides additional APIs offered by the Network Protocol

Toolkit (NPT) architecture.  These APIs extend the original release of

the MUX interface.

 

A NPT driver is an enhanced END but retains all of the END's functionality.

NPT also introduces the term "network service sublayer" or simply "service

sublayer" which is the component that interfaces between the network service

(or network protocol) and the MUX.  This service sublayer may be built in

to the network service or protocol rather than being a separate component.

 

INTERNAL

 

muxTkBind() should be used when the protocol uses callbacks (e.g. receive

routine, TX restart routine, etc.), of the NPT style.

muxBind() should be used when the protocol uses pre-NPT style callbacks.

 

While muxTkBind() may be used to bind to an END driver device, some protocols

may choose to call muxBind() instead for such  END (non-NPT) style drivers,

in order to avoid the wrapper receive function which would intermediate between

the END driver's receive callback (muxReceive()) and the NPT-style protocol

receive routine which would be used if the protocol bound with muxTkBind().

 

It is recommended that protocols call muxTkPollSend() and muxTkPollReceive()

instead of muxPollSend() and muxPollReceive().

 

 

INCLUDE FILES: vxWorks.h, taskLib.h, stdio.h, errno.herrnoLib.h, lstlib.h,

logLib.h, string.h, m2Lib.h, net/if.h, bufLib.h, semlib.h, end.h, muxLib.h,

muxTkLib.h, netinet/if_ether.h, net/mbuf.h

*/

 

/* includes */

 

#include <osdep.h>

#include <stdio.h>

#include <stdlib.h>

#include <errnoLib.h>

#include <logLib.h>

#include <tor22port.h>

#include <machdep.h>

 

#include <m2Lib.h>

#include <net/if.h>             /* Needed for IFF_LOAN flag. */

#include <end.h>

#include <endLib.h>

#if 0

#include <end.h>                    /* Necessary for any END as well as the MUX */

#include <endLib.h>

#include <muxLib.h>

#endif

#include <private/muxLibP.h>

#include <muxTkLib.h>

#include <netinet/in.h>    /* Needed for in_addr used in if_ether.h */

#include <netinet/if_ether.h>

#include <net/mbuf.h>

#include <syslog.h>

 

#ifdef VIRTUAL_STACK

#include <netinet/vsLib.h>

#include <netinet/vsData.h>

#endif /* VIRTUAL_STACK */

 

/* defines */

 

#define STREQ(A, B) (strcmp ( (A), (B)) == 0)

 

/* globals */

 

int muxTkDebug = 0;

 

/* locals */

 

LOCAL UINT32 _muxAnonProtoCount = 1;

 

/* forward declarations */

 

LOCAL int muxEndRcvRtn (void *, long, M_BLK_ID, LL_HDR_INFO *, void *);

LOCAL int muxEndSnarfRcvRtn (void *, long, M_BLK_ID, LL_HDR_INFO *, void *);

 

/*****************************************************************************

*

* muxTkLibInit - initialize NPT extensions to MUX

*

* This placeholder routine initializes NPT extensions to the MUX.

*

* RETURNS: OK

*

* SEE ALSO: muxInit()

*/

 

STATUS muxTkLibInit (void)

    {

    return OK;

    }

 

/*****************************************************************************

*

* muxTkDrvCheck - checks if the device is an NPT or an END interface

*

* This function returns 1 if the driver indicated by <pDevName> is of the

* Toolkit (NPT) paradigm, and 0 (zero) if it is an END.  This routine is

* called by the network service sublayer so that it can discover the driver

* type before it binds to it via the MUX.

*

* INTERNAL:

* All network drivers having the same device name but different unit numbers

* are assumed to be of the same type (NPT or END), so passing just the

* device name as an argument is sufficient

*

* We should return a new code for MULTI style drivers, but for backwards

* compatibility, we return either 1 or 0. 1 is returned for MULTI style

* drivers as for NPT, since MULTI-style drivers are required to provide

* an EIOCGNPT ioctl returning OK.

*

* .IP <pDevName>

* Expects a pointer to a string containing the name of the device

*

* RETURNS: 1 for an NPT driver, 0 for an END or other driver, or ERROR (-1)

* if no device is found with the given name

*

* SEE ALSO: muxTkBind(), muxBind()

*/

 

int muxTkDrvCheck

    (

    char * pDevName   /* device name */

    )

    {

    int result = ERROR;

    END_OBJ *    pEnd = NULL;    /* Pointer to the END_OBJ structure */

    int (*ioctlRtn) (END_OBJ*, int, caddr_t);

 

    pEnd = endFirstUnitFind (pDevName);

 

    if (pEnd == NULL)

        return (ERROR);

 

    result = END_STYLE_END;

 

    if (pEnd->pFuncTable != NULL &&

      (ioctlRtn = pEnd->pFuncTable->ioctl) != NULL &&

      /* ioctlRtn (pEnd, EIOCGSTYLE, (caddr_t)&result) != OK && */

      ioctlRtn (pEnd, EIOCGNPT, NULL) == OK)

      {

      result = END_STYLE_NPT;

      }

 

    return (result);

    }

 

/******************************************************************************

*

* muxTkBind - bind an NPT protocol to a driver

*

* A network protocol, network service, or service sublayer uses this routine

* to bind to a specific driver.  This bind routine is valid both for END and

* NPT drivers, but the specified stack routine parameters must use the NPT

* function prototypes, which are somewhat different from those used with

* muxBind().

*

* The driver is specified by the <pName> and <unit> arguments, (for example,

* ln and 0, ln and 1, or ei and 0).

*

* .IP <pName> 20

* Expects a pointer to a character string that contains the name of the

* device that this network service wants to use to send and receive packets.

* .IP <unit>

* Expects the unit number of the device of the type indicated by <pName>.

* .IP <stackRcvRtn>

* Expects a pointer to the function that the MUX will call when it

* wants to pass a packet up to the network service. 

* .IP <stackShutdownRtn>

* Expects a pointer to the function that the MUX will call to

* shutdown the network service.  For a description of how to write such

* a routine, see the section

* .I Network Protocol Toolkit Programmer's Guide: Shutting Down an Interface

* .IP <stackTxRestartRtn>

* Expects a pointer to the function that the MUX will call after packet

* transmission has been suspended, to tell the network service that it can

* continue transmitting packets.  For a description of how to write this

* routine, see the section

* .I Network Protocol Toolkit Programmer's Guide: Flow Control

* .IP <stackErrorRtn>

* Expects a pointer to the function that the MUX will call to give errors

* to the network service.  For a description of how to write this routine,

* see the section

* .I Network Protocol Toolkit Programmer's Guide: Error Reporting

* .IP <type>

* Expects a value that indicates the protocol type.  The MUX uses this type

* to prioritize a network service as well as to modify its capabilities.  For

* example, a network service of type MUX_PROTO_SNARF has the highest priority

* (see the description of protocol prioritizing provided in

* .I Network Protocol Toolkit Programmer's Guide: The Bind Phase)

* Aside from MUX_PROTO_SNARF and MUX_PROTO_PROMISC, valid network service

* types include any of the values specified in RFC 1700, or can be

* user-defined. Within each group (snarf, typed, or promiscuous), protocols

* bound earlier have priority over protocols bound later.

*

* IMPORTANT NOTE:

* Though this API can be used to bind to both END and NPT devices, the

* prototypes for the four protocol functions being registered are always

* the NPT style ones, as shown below.

*

* NPT protocol callbaks:

*   BOOL   (*stackRcvRtn) (void*, long, M_BLK_ID, void *),

*   STATUS (*stackShutdownRtn) (void *),

*   STATUS (*stackTxRestartRtn) (void *)

*   void   (*stackErrorRtn) (void*, END_ERR*)

*

* This API does not perform any type checking, so it is up to the caller

* to make sure the appropriate callback prototypes are present.

*

* The <stackRcvRtn> is called whenever the MUX has a packet of the specified

* type.  If the type is MUX_PROTO_PROMISC, the protocol is considered

* promiscuous and will get all of the packets that have not been consumed

* by any other protocol.  If the type is MUX_PROTO_SNARF, it will get all of

* the packets that the MUX sees not consumed by a previous MUX_PROTO_SNARF

* protocol.

*

* If the type is MUX_PROTO_OUTPUT, this network service is an output protocol

* and all packets that are to be output on this device are first passed to

* <stackRcvRtn> routine rather than being sent to the device.  This can be

* used by a network service

 

--=-=-=

 

 

 

 

In GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600)

 of 2010-05-08 on G41R2F1

Windowing system distributor `Microsoft Corp.', version 5.1.2600

configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/xpm/include'

 

Important settings:

  value of $LC_ALL: nil

  value of $LC_COLLATE: nil

  value of $LC_CTYPE: nil

  value of $LC_MESSAGES: nil

  value of $LC_MONETARY: nil

  value of $LC_NUMERIC: nil

  value of $LC_TIME: nil

  value of $LANG: ENU

  value of $XMODIFIERS: nil

  locale-coding-system: cp1252

  default enable-multibyte-characters: t

 

Major mode: C/l

 

Minor modes in effect:

  diff-auto-refine-mode: t

  show-paren-mode: t

  tooltip-mode: t

  mouse-wheel-mode: t

  tool-bar-mode: t

  menu-bar-mode: t

  file-name-shadow-mode: t

  global-font-lock-mode: t

  font-lock-mode: t

  blink-cursor-mode: t

  auto-encryption-mode: t

  auto-compression-mode: t

  column-number-mode: t

  line-number-mode: t

  transient-mark-mode: t

  abbrev-mode: t

 

Recent input:

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1>

<wheel-down> <double-wheel-down> <triple-wheel-down>

<wheel-up> <help-echo> <help-echo> <wheel-down> <double-wheel-down>

<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>

<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>

<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>

<send-emacs-bug-report>

 

Recent messages:

Loading c:/nxml-mode-20041004/rng-auto.el (source)...done

For information about GNU Emacs and the GNU system, type C-h C-a.

Keep current list of tags tables also? (y or n)  [2 times]

Loading vc-cvs...done

Mark set [2 times]

byte-code: Beginning of buffer [7 times]

Mark set

byte-code: End of buffer [3 times]

Mark set

Auto-saving...done

 

Load-path shadows:

c:/nxml-mode-20041004/xsd-regexp hides c:/emacs-23.2/lisp/nxml/xsd-regexp

c:/nxml-mode-20041004/xmltok hides c:/emacs-23.2/lisp/nxml/xmltok

c:/nxml-mode-20041004/rng-xsd hides c:/emacs-23.2/lisp/nxml/rng-xsd

c:/nxml-mode-20041004/rng-valid hides c:/emacs-23.2/lisp/nxml/rng-valid

c:/nxml-mode-20041004/rng-util hides c:/emacs-23.2/lisp/nxml/rng-util

c:/nxml-mode-20041004/rng-uri hides c:/emacs-23.2/lisp/nxml/rng-uri

c:/nxml-mode-20041004/rng-pttrn hides c:/emacs-23.2/lisp/nxml/rng-pttrn

c:/nxml-mode-20041004/rng-parse hides c:/emacs-23.2/lisp/nxml/rng-parse

c:/nxml-mode-20041004/rng-nxml hides c:/emacs-23.2/lisp/nxml/rng-nxml

c:/nxml-mode-20041004/rng-match hides c:/emacs-23.2/lisp/nxml/rng-match

c:/nxml-mode-20041004/rng-maint hides c:/emacs-23.2/lisp/nxml/rng-maint

c:/nxml-mode-20041004/rng-loc hides c:/emacs-23.2/lisp/nxml/rng-loc

c:/nxml-mode-20041004/rng-dt hides c:/emacs-23.2/lisp/nxml/rng-dt

c:/nxml-mode-20041004/rng-cmpct hides c:/emacs-23.2/lisp/nxml/rng-cmpct

c:/nxml-mode-20041004/nxml-util hides c:/emacs-23.2/lisp/nxml/nxml-util

c:/nxml-mode-20041004/nxml-uchnm hides c:/emacs-23.2/lisp/nxml/nxml-uchnm

c:/nxml-mode-20041004/nxml-rap hides c:/emacs-23.2/lisp/nxml/nxml-rap

c:/nxml-mode-20041004/nxml-parse hides c:/emacs-23.2/lisp/nxml/nxml-parse

c:/nxml-mode-20041004/nxml-outln hides c:/emacs-23.2/lisp/nxml/nxml-outln

c:/nxml-mode-20041004/nxml-ns hides c:/emacs-23.2/lisp/nxml/nxml-ns

c:/nxml-mode-20041004/nxml-mode hides c:/emacs-23.2/lisp/nxml/nxml-mode

c:/nxml-mode-20041004/nxml-maint hides c:/emacs-23.2/lisp/nxml/nxml-maint

c:/nxml-mode-20041004/nxml-glyph hides c:/emacs-23.2/lisp/nxml/nxml-glyph

c:/nxml-mode-20041004/nxml-enc hides c:/emacs-23.2/lisp/nxml/nxml-enc

 

Features:

(shadow sort mail-extr message ecomplete rfc822 mml mml-sec

password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231

rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc

time-date mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util

hashcash mail-utils emacsbug parse-time cc-mode cc-fonts cc-menus

cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs vc-cvs regexp-opt

etags nxml-enc psvn wid-edit cl cl-19 log-edit ring pcvs-util add-log

diff-mode easy-mmode easymenu saveplace paren cus-start cus-load tooltip

ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp

w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register

page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock

font-lock syntax facemenu font-core frame cham georgian utf-8-lang

misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew

greek romanian slovak czech european ethiopic indian cyrillic chinese

case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button

minibuffer faces cus-face files text-properties overlay md5 base64

format env code-pages mule custom widget hashtable-print-readable

backquote make-network-process multi-tty emacs)

 

--=-=-=--


IMPORTANT NOTICE: This message is intended only for the use of the individual or entity to which it is addressed. The message may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify Redline immediately by email at
address@hidden.

Thank you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]