VirtualBox

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

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

The Giant CDDL Dual-License Header Change.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: errmsg.sed 5999 2007-12-07 15:05:06Z 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 (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:]]*\([a-zA-Z0-9_]*\)[[: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:]]*\*\//\"\,/
96s/[[:space:]]*[[:space:]]\*[[:space:]][[:space:]]*/ /g
97b end
98
99
100# next expression
101: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