~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to routines/X11/Xaw/genlist.sh

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
tmp=/tmp/gl.$$
 
4
nm $* | egrep '(Widget|Obj|Object)Class' | \
 
5
awk '{ if ($2 == "D" || $2 == "G") print $3; }' | sed -e 's/^_//' | \
 
6
(cat - ; echo "objectClass") | sort -u | egrep -v 'ClassRec$' | \
 
7
egrep -v 'vPanedWidgetClass$' | \
 
8
egrep -v 'ascii(Disk|String)WidgetClass$' | \
 
9
awk '
 
10
{
 
11
    printf "extern WidgetClass %s;\n", $1;
 
12
    printf "{ \"%s\", &%s },\n", $1, $1;
 
13
}' | sed -e 's/WidgetClass"/"/' -e 's/ObjClass"/"/' \
 
14
         -e 's/ObjectClass"/"/' -e 's/objectClass"/object"/' \
 
15
         -e 's/widgetClass"/widget"/' >$tmp
 
16
 
 
17
cat <<EOF
 
18
/*
 
19
 * This file is generated by the genlist.sh script and contains an array of
 
20
 * all the widgets in Athena widget set.
 
21
 *
 
22
 * \$XConsortium\$
 
23
 */
 
24
#include <X11/IntrinsicP.h>
 
25
#include <X11/Xmu/WidgetNode.h>
 
26
 
 
27
EOF
 
28
egrep '^extern WidgetClass' $tmp
 
29
echo ""
 
30
cat <<EOF
 
31
XmuWidgetNode XawWidgetArray[] = {
 
32
EOF
 
33
egrep '^{' $tmp
 
34
cat <<EOF
 
35
};
 
36
 
 
37
int XawWidgetCount = XtNumber(XawWidgetArray);
 
38
 
 
39
EOF
 
40
 
 
41
rm $tmp