mkerrtags.sh

来自「Sun Solaris 10 中的 DTrace 组件的源代码。请参看: htt」· Shell 代码 · 共 45 行

SH
45
字号
#!/bin/sh## Copyright 2005 Sun Microsystems, Inc.  All rights reserved.## The contents of this file are subject to the terms of the# Common Development and Distribution License, Version 1.0 only.# See the file usr/src/LICENSING.NOTICE in this distribution or# http://www.opensolaris.org/license/ for details.##ident	"@(#)mkerrtags.sh	1.1	03/09/02 SMI"echo "\/*\n\ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.\n\ *\n\ * The contents of this file are subject to the terms of the\n\ * Common Development and Distribution License, Version 1.0 only.\n\ * See the file usr/src/LICENSING.NOTICE in this distribution or\n\ * http://www.opensolaris.org/license/ for details.\n\ */\n\\n\#pragma ident\t\"@(#)mkerrtags.sh\t1.1\t03/09/02 SMI\"\n\\n\#include <dt_errtags.h>\n\static const char *const _dt_errtags[] = {"pattern='^	\(D_[A-Z0-9_]*\),*'replace='	"\1",'sed -n "s/$pattern/$replace/p" || exit 1echo "\};\n\\n\static const int _dt_ntag = sizeof (_dt_errtags) / sizeof (_dt_errtags[0]);\n\\n\const char *dt_errtag(dt_errtag_t tag){	return (_dt_errtags[(tag > 0 && tag < _dt_ntag) ? tag : 0]);}"exit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?