...

Text file src/cmd/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh

Documentation: cmd/vendor/golang.org/x/sys/plan9

     1#!/bin/sh
     2# Copyright 2009 The Go Authors. All rights reserved.
     3# Use of this source code is governed by a BSD-style
     4# license that can be found in the LICENSE file.
     5
     6COMMAND="mksysnum_plan9.sh $@"
     7
     8cat <<EOF
     9// $COMMAND
    10// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
    11
    12package plan9
    13
    14const(
    15EOF
    16
    17SP='[ 	]' # space or tab
    18sed "s/^#define${SP}\\([A-Z0-9_][A-Z0-9_]*\\)${SP}${SP}*\\([0-9][0-9]*\\)/SYS_\\1=\\2/g" \
    19	< $1 | grep -v SYS__
    20
    21cat <<EOF
    22)
    23EOF

View as plain text