summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/vga256/confvga256.sh
blob: 5669e7cc5e2e1e8e2abbabaf8aac39ed8ef9397f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# $XConsortium: confvga256.sh,v 1.1 94/03/28 21:43:21 dpw Exp $
#!/bin/sh

#
# This script generates vga256Conf.c
#
# usage: confvga256.sh driver1 driver2 ...
#

VGACONF=./vga256Conf.c

cat > $VGACONF <<EOF
/*
 * This file is generated automatically -- DO NOT EDIT
 */

#include "xf86.h"
#include "vga.h"

extern vgaVideoChipRec
EOF
Args="`echo $* | tr '[a-z]' '[A-Z]'`"
set - $Args
while [ $# -gt 1 ]; do
  echo "        $1," >> $VGACONF
  shift
done
echo "        $1;" >> $VGACONF
cat >> $VGACONF <<EOF

vgaVideoChipPtr vgaDrivers[] =
{
EOF
for i in $Args; do
  echo "        &$i," >> $VGACONF
done
echo "        NULL" >> $VGACONF
echo "};" >> $VGACONF