VirtualBox

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

Last change on this file since 2705 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1# $Id: errmsg.sed 1 1970-01-01 00:00:00Z vboxsync $
2## @file
3# InnoTek Portable Runtime - SED script for converting */err.h.
4#
5
6# Copyright (C) 2006 InnoTek Systemberatung 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# If you received this file as part of a commercial VirtualBox
17# distribution, then only the terms of your commercial VirtualBox
18# license agreement apply instead of the previous paragraph.
19#
20
21# Handle text inside the markers.
22/SED-START/,/SED-END/{
23
24# if (#define) goto defines
25/^[[:space:]]*#[[:space:]]*define/b defines
26
27# if (/**) goto description
28/\/\*\*/b description
29
30}
31
32# Everything else is deleted!
33d
34b end
35
36
37##
38# Convert the defines
39:defines
40s/^[[:space:]]*#[[:space:]]*define[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*\(.*\)[[:space:]]*$/ "\1",\n \1 }, /
41b end
42
43##
44# Convert descriptive comments. /** desc */
45:description
46# arg! how to do N until end of comment?
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/\*\//!N
69/\*\//!N
70/\*\//!N
71/\*\//!N
72/\*\//!N
73# anything with @{ and @} is skipped
74/@[\{\}]/d
75
76# Fix double spaces
77s/[[:space:]][[:space:]]/ /g
78
79# Fix \# sequences (doxygen needs them, we don't).
80s/\\#/#/g
81
82# insert punctuation.
83s/\([^.[:space:]]\)[[:space:]]*\*\//\1. \*\//
84
85# convert /** short. more
86s/[[:space:]]*\/\*\*[[:space:]]*/ { NULL, \"/
87s/ { NULL, \"\([^.!?"]*[.!?][.!?]*\)/ { \"\1\",\n \"\1/
88
89# terminate the string
90s/[[:space:]]*\*\//\"\,/
91s/[[:space:]]*[[:space:]]\*[[:space:]][[:space:]]*/ /g
92b end
93
94
95# next expression
96: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