5
Last change
on this file since 0e16fa45 was
9b4422a2,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24
|
Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.
+ remove occurrences of two blank comment lines
next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
contain CVS Ids
+ If the processing left a blank line at the top of
a file, it was removed.
|
-
Property mode set to
100644
|
File size:
742 bytes
|
Line | |
---|
1 | This program should print out the default attribute settings for a |
---|
2 | POSIX message queue. |
---|
3 | |
---|
4 | #include <mqueue.h> |
---|
5 | #include <stdio.h> |
---|
6 | |
---|
7 | main() |
---|
8 | { |
---|
9 | mqd_t mqfd; |
---|
10 | struct mq_attr mqstat; |
---|
11 | int status; |
---|
12 | |
---|
13 | /* this should create it */ |
---|
14 | mqfd = mq_open("myipc",O_WRONLY|O_CREAT,NULL); |
---|
15 | if ( (int)mqfd == -1 ) { |
---|
16 | perror( "Unable to open message queue" ); |
---|
17 | exit( 1 ); |
---|
18 | } |
---|
19 | |
---|
20 | status = mq_getattr(mqfd, &mqstat); |
---|
21 | if ( !status ) { |
---|
22 | printf( "mq_maxmsg: %d\n", mqstat.mq_maxmsg ); |
---|
23 | printf( "mq_msgsize: %d\n", mqstat.mq_msgsize ); |
---|
24 | printf( "mq_curmsgs: %d\n", mqstat.mq_curmsgs ); |
---|
25 | } else { |
---|
26 | perror( "Unable to get attributes on message queue" ); |
---|
27 | exit( 1 ); |
---|
28 | } |
---|
29 | |
---|
30 | /* this should delete it */ |
---|
31 | (void) mq_close( mqfd ); |
---|
32 | exit( 0 ); |
---|
33 | } |
---|
34 | |
---|
Note: See
TracBrowser
for help on using the repository browser.