VirtualBox

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

Last change on this file since 18117 was 18117, checked in by vboxsync, 16 years ago

sed(1): make these locale independent by using [:alnum:] and friends.
See also #3743: “tstAsmStructsAsm-lst.sed locale sensitive”

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# $Id: errmsg.sed 18117 2009-03-20 13:33:58Z vboxsync $
2## @file
3# IPRT - SED script for converting */err.h.
4#
5
6# Copyright (C) 2006-2009 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
26# Clara, CA 95054 USA or visit http://www.sun.com if you need
27# additional information or have any questions.
28#
29
30# Handle text inside the markers.
31/SED-START/,/SED-END/{
32
33# if (#define) goto defines
34/^[[:space:]]*#[[:space:]]*define/b defines
35
36# if (/**) goto description
37/\/\*\*/b description
38
39}
40
41# Everything else is deleted!
42d
43b end
44
45
46##
47# Convert the defines
48:defines
49s/^[[:space:]]*#[[:space:]]*define[[:space:]]*\([[:alnum:]_]*\)[[:space:]]*\(.*\)[[:space:]]*$/ "\1",\n \1 }, /
50b end
51
52##
53# Convert descriptive comments. /** desc */
54:description
55# arg! how to do N until end of comment?
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/\*\//!N
80/\*\//!N
81/\*\//!N
82# anything with @{ and @} is skipped
83/@[\{\}]/d
84
85# Fix double spaces
86s/[[:space:]][[:space:]]/ /g
87
88# Fix \# sequences (doxygen needs them, we don't).
89s/\\#/#/g
90
91# insert punctuation.
92s/\([^.[:space:]]\)[[:space:]]*\*\//\1. \*\//
93
94# convert /** short. more
95s/[[:space:]]*\/\*\*[[:space:]]*/ { NULL, \"/
96s/ { NULL, \"\([^.!?"]*[.!?][.!?]*\)/ { \"\1\",\n \"\1/
97
98# terminate the string
99s/[[:space:]]*\*\//\"\,/
100s/[[:space:]]*[[:space:]]\*[[:space:]][[:space:]]*/ /g
101b end
102
103
104# next expression
105: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