VirtualBox

source: vbox/trunk/src/VBox/Runtime/errmsgxpcom.sed@ 5285

Last change on this file since 5285 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.1 KB
Line 
1# $Id: errmsgxpcom.sed 4774 2007-09-13 14:28:34Z vboxsync $
2## @file
3# innotek Portable Runtime - SED script for converting XPCOM errors
4#
5
6#
7# Copyright (C) 2006-2007 innotek GmbH
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License as published by the Free Software Foundation,
13# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14# distribution. VirtualBox OSE is distributed in the hope that it will
15# be useful, but WITHOUT ANY WARRANTY of any kind.
16
17# no comments
18/\*/b skip
19# we want NS_ERROR_* defines, but not all!
20/\#define NS_ERROR_SEVERITY_/b skip
21/\#define NS_ERROR_BASE/b skip
22/\#define NS_ERROR_MODULE_/b skip
23/\#define NS_ERROR_GET_/b skip
24/\#define NS_ERROR_GENERATE/b skip
25/\#define NS_ERROR_/b nserror
26d
27b end
28
29:skip
30# Everything else is deleted!
31d
32b end
33
34
35#
36# A good error definition
37#
38:nserror
39{
40 # remove DOS <CR>.
41 s/\r//g
42 # remove '#define'
43 s/\#define //
44 # output C array entry
45 s/\([a-zA-Z0-9_]*\)[\t ]*\(.*\)[\t ]*$/{ "\1", \1 }, /
46}
47b end
48
49# next expression
50: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