VirtualBox

source: vbox/trunk/src/VBox/Runtime/errmsg.sed@ 5031

Last change on this file since 5031 was 4071, checked in by vboxsync, 17 years ago

Biggest check-in ever. New source code headers for all (C) innotek files.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1# $Id: errmsg.sed 4071 2007-08-07 17:07:59Z vboxsync $
2## @file
3# innotek Portable Runtime - SED script for converting */err.h.
4#
5
6# Copyright (C) 2006-2007 innotek GmbH
7#
8# This file is part of VirtualBox Open Source Edition (OSE), as
9# available from http://www.virtualbox.org. This file is free software;
10# you can redistribute it and/or modify it under the terms of the GNU
11# General Public License as published by the Free Software Foundation,
12# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13# distribution. VirtualBox OSE is distributed in the hope that it will
14# be useful, but WITHOUT ANY WARRANTY of any kind.
15
16# Handle text inside the markers.
17/SED-START/,/SED-END/{
18
19# if (#define) goto defines
20/^[[:space:]]*#[[:space:]]*define/b defines
21
22# if (/**) goto description
23/\/\*\*/b description
24
25}
26
27# Everything else is deleted!
28d
29b end
30
31
32##
33# Convert the defines
34:defines
35s/^[[:space:]]*#[[:space:]]*define[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*\(.*\)[[:space:]]*$/ "\1",\n \1 }, /
36b end
37
38##
39# Convert descriptive comments. /** desc */
40:description
41# arg! how to do N until end of comment?
42/\*\//!N
43/\*\//!N
44/\*\//!N
45/\*\//!N
46/\*\//!N
47/\*\//!N
48/\*\//!N
49/\*\//!N
50/\*\//!N
51/\*\//!N
52/\*\//!N
53/\*\//!N
54/\*\//!N
55/\*\//!N
56/\*\//!N
57/\*\//!N
58/\*\//!N
59/\*\//!N
60/\*\//!N
61/\*\//!N
62/\*\//!N
63/\*\//!N
64/\*\//!N
65/\*\//!N
66/\*\//!N
67/\*\//!N
68# anything with @{ and @} is skipped
69/@[\{\}]/d
70
71# Fix double spaces
72s/[[:space:]][[:space:]]/ /g
73
74# Fix \# sequences (doxygen needs them, we don't).
75s/\\#/#/g
76
77# insert punctuation.
78s/\([^.[:space:]]\)[[:space:]]*\*\//\1. \*\//
79
80# convert /** short. more
81s/[[:space:]]*\/\*\*[[:space:]]*/ { NULL, \"/
82s/ { NULL, \"\([^.!?"]*[.!?][.!?]*\)/ { \"\1\",\n \"\1/
83
84# terminate the string
85s/[[:space:]]*\*\//\"\,/
86s/[[:space:]]*[[:space:]]\*[[:space:]][[:space:]]*/ /g
87b end
88
89
90# next expression
91:end
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette