VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/err/errmsg.sed@ 45733

Last change on this file since 45733 was 35811, checked in by vboxsync, 14 years ago

nit

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# $Id: errmsg.sed 35811 2011-02-01 13:12:08Z vboxsync $
2## @file
3# IPRT - SED script for converting */err.h.
4#
5
6#
7# Copyright (C) 2006-2011 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# The contents of this file may alternatively be used under the terms
18# of the Common Development and Distribution License Version 1.0
19# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20# VirtualBox OSE distribution, in which case the provisions of the
21# CDDL are applicable instead of those of the GPL.
22#
23# You may elect to license modified versions of this file under the
24# terms and conditions of either the GPL or the CDDL or both.
25#
26
27# Handle text inside the markers.
28/SED-START/,/SED-END/{
29
30# if (#define) goto defines
31/^[[:space:]]*#[[:space:]]*define/b defines
32
33# if (/**) goto description
34/\/\*\*/b description
35
36}
37
38# Everything else is deleted!
39d
40b end
41
42
43##
44# Convert the defines
45:defines
46s/^[[:space:]]*#[[:space:]]*define[[:space:]]*\([[:alnum:]_]*\)[[:space:]]*\(.*\)[[:space:]]*$/ "\1",\n \1 }, /
47b end
48
49##
50# Convert descriptive comments. /** desc */
51:description
52# arg! how to do N until end of comment?
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/\*\//!N
69/\*\//!N
70/\*\//!N
71/\*\//!N
72/\*\//!N
73/\*\//!N
74/\*\//!N
75/\*\//!N
76/\*\//!N
77/\*\//!N
78/\*\//!N
79# anything with @{ and @} is skipped
80/@[\{\}]/d
81
82# Fix double spaces
83s/[[:space:]][[:space:]]/ /g
84
85# Fix \# sequences (doxygen needs them, we don't).
86s/\\#/#/g
87
88# insert punctuation.
89s/\([^.[:space:]]\)[[:space:]]*\*\//\1. \*\//
90
91# convert /** short. more
92s/[[:space:]]*\/\*\*[[:space:]]*/ { NULL, \"/
93s/ { NULL, \"\([^.!?"]*[.!?][.!?]*\)/ { \"\1\",\n \"\1/
94
95# terminate the string
96s/[[:space:]]*\*\//\"\,/
97
98# translate empty lines into new-lines (only one, please).
99s/[[:space:]]*[[:space:]]\*[[:space:]][[:space:]]*\*[[:space:]][[:space:]]*/\\n/g
100
101# remove asterics.
102s/[[:space:]]*[[:space:]]\*[[:space:]][[:space:]]*/ /g
103b end
104
105
106# next expression
107: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