⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 generrs

📁 The main purpose of this project is to add a new scheduling algorithm to GeekOS and to implement a s
💻
字号:
#! /usr/bin/perl# Script to process include/geekos/errno.h to produce a table# of error description strings that can be compiled and# linked into libc.use strict qw(refs vars);my @errs = ();my @syms = ();$errs[0] = 'No error';while (<>) {	if (m,^#define\s*(\S+)\s*(-\d+)\s*/\*\s*(.*\S)\s*\*/\s*$,) {		$errs[- $2] = $3;		$syms[- $2] = $1;	}}print "const char *__strerrTable[] = {\n";for (my $i = 0; $i < scalar(@errs); $i++) {	print "    \"", $errs[$i], "\", /* ", $syms[$i], " */\n";}print "};\n";print "const int __strerrTableSize = sizeof(__strerrTable) / sizeof(const char *);\n";# vim:ts=4

⌨️ 快捷键说明

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