2002-10-01 18:25:56

by Petr Vandrovec

[permalink] [raw]
Subject: Re: Stupid luser question

On 1 Oct 02 at 19:14, [email protected] wrote:

> Just wondering, what is the purpose of the comment /* { */ which is found in various seemingly random places in the kernel:
>
> # grep -F -r "/* { */" *
>
> drivers/video/font_acorn_8x8.c:/* 7B */ 0x0C, 0x18, 0x18, 0x70, 0x18, 0x18, 0x0C, 0x00, /* { */

Body of character "{"...

> drivers/scsi/scsi_syms.c:#if defined(CONFIG_SCSI_LOGGING) /* { */
> drivers/scsi/scsi.c:#ifdef CONFIG_SCSI_LOGGING /* { */
> drivers/scsi/scsi.c:#ifdef CONFIG_SCSI_LOGGING /* { */
> drivers/message/fusion/mptbase.h:#ifdef __KERNEL__ /* { */
> drivers/message/fusion/mptscsih.c:#ifndef MPT_SCSI_USE_NEW_EH /* { */
> drivers/message/fusion/mptscsih.c:#ifdef MPT_SCSI_USE_NEW_EH /* { */
> drivers/message/fusion/mptscsih.c:#if 0 /* { */
> drivers/message/fusion/mptbase.c:#ifdef CONFIG_PROC_FS /* { */

All these are for cooperation with editors which find matching
brace/bracket/... for you:

#ifdef __KERNEL__ /* { */
...
#endif /* } __KERNEL__ */

and then you can quickly jump from ifdef to endif and back even in
editor which does not know about #if/ifdef/else/elif/ifndef/endif...
Best regards,
Petr Vandrovec
[email protected]