Weird C syntax on Linux source code

Weird C syntax on Linux source code

Post by Thomas Cha » Mon, 13 Apr 1998 04:00:00



Firstly I would like to apologize if this question is a bit out of sync.

Recently I walked thru Linux source and discover a C syntax that I have
never seen before....could someone please clarify what it is?

unsigned dirty:16; (in include/linux/mm.h)

I try to declare such a type in a simple source that I wrote just to
test it out...but compilation fails on me..

Thanks in advance
--
Thomas Chai




 
 
 

Weird C syntax on Linux source code

Post by Alexander Vi » Mon, 13 Apr 1998 04:00:00




[snip]

Quote:>unsigned dirty:16; (in include/linux/mm.h)

>I try to declare such a type in a simple source that I wrote just to
>test it out...but compilation fails on me..

        RTFM on bitfields. Hint: it is legitimate field of structure.

 
 
 

Weird C syntax on Linux source code

Post by Keith Wrigh » Mon, 13 Apr 1998 04:00:00




> >unsigned dirty:16; (in include/linux/mm.h)

> >I try to declare such a type in a simple source that I wrote just to
> >test it out...but compilation fails on me..

>    RTFM on bitfields. Hint: it is legitimate field of structure.

The FM in this case if Kernighan and Ritchie "The C (ANSI C) Programming
Language", section 6.9 Bit-fields.

--
     --Keith

This mail message sent by GNU emacs and Linux.
Power to the people. Linux is here.
Food, Shelter, Source code.

 
 
 

Weird C syntax on Linux source code

Post by Keith Wrigh » Mon, 13 Apr 1998 04:00:00




> >unsigned dirty:16; (in include/linux/mm.h)

> >I try to declare such a type in a simple source that I wrote just to
> >test it out...but compilation fails on me..

>    RTFM on bitfields. Hint: it is legitimate field of structure.

The FM in this case if Kernighan and Ritchie "The C (ANSI C) Programming
Language", section 6.9 Bit-fields.

--
     --Keith

This mail message sent by GNU emacs and Linux.
Power to the people. Linux is here.
Food, Shelter, Source code.

 
 
 

1. Source Code printing for code reviews....

Hi all,
    Anyone know of a package which given 2 files (a modified
version of a source file from a source distribution) will
print either a colorized or fontized merged version of the
differences.  I'm looking for something which will combine
both files and show common text and the differences
in either a different color or different font.

I want to use this for code reviews.

--
Robert Angelino
High Tower Software Inc.
Director of Software Development
(949) 852-2233

2. Tekram SCSI-Controller

3. Get the source code of Code Crusader

4. New public mailing list for FlexLM and license software discussion

5. Portable code: Same C++ code source for MS-Windows and XFree86.

6. Client hostname

7. Creating web access to source code (aka OpenSolaris source browser)

8. KDE as default

9. sendmail: weird timezone syntax in Date: header

10. Unable to delete file with weird syntax

11. Weird Ping, weird FTP, weird Telnet... HELP!!!

12. Weird, weird, weird issue ....

13. Linux source code