VirtualBox

source: vbox/trunk/src/VBox/Runtime/errmsgcom.sed@ 4953

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

Forced LF (Unix) EOL for common SED and ACPI scripts mode to make it possible to build on both dos and linux platforms from the same shared source tree (linux versions of SED and iasl tools trap on CRLF).

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1# $Id: errmsgcom.sed 4774 2007-09-13 14:28:34Z vboxsync $
2## @file
3# innotek Portable Runtime - SED script for converting COM errors
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 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# we only care about message definitions
17\/\/ MessageId: /b messageid
18d
19b end
20
21
22# Everything else is deleted!
23d
24b end
25
26
27#
28# A message ID we care about
29#
30:messageid
31# concatenate the next four lines to the string
32N
33N
34N
35N
36{
37 # remove DOS <CR>.
38 s/\r//g
39 # remove the message ID
40 s/\/\/ MessageId: //g
41 # remove the stuff in between
42 s/\/\/\n\/\/ MessageText:\n\/\/\n\/\/ //g
43 # backslashes have to be escaped
44 s/\\/\\\\/g
45 # double quotes have to be escaped, too
46 s/"/\\"/g
47 # output C array entry
48 s/\([a-zA-Z0-9_]*\)[\t ]*\n\(.*\)[\t ]*$/{ "\2", "\1", \1 }, /
49}
50b end
51
52# next expression
53: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