VirtualBox

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

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

VMM: Replace most VERR_VERSION_MISMATCH by more specific error statuses. Translating the errors returned by device, driver and USB device constructors into specific ones for the benefit of old extension pack and misc use of the status.

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