Overview
Comment:Restrict scope of variables to file (static).
Warn GCC that variables may be unused.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 7ca6ba6731a598efd04a2583aa3bdea73aa66a72dee40b2250ae4097501d6b69
User & Date: geraint@users.sourceforge.net on 2001-02-05 13:03:19.000
Other Links: branch diff | manifest | tags
Context
2001-02-05
17:17:09
New state format
Sets initial capacitor displacement to unity
check-in: 80bdcfc444 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:03:19
Restrict scope of variables to file (static).
Warn GCC that variables may be unused.
check-in: 7ca6ba6731 user: geraint@users.sourceforge.net tags: origin/master, trunk
12:57:13
Removed unnecessary files. check-in: b2a4527a43 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes
1
2
3






4
5
6
7
8
9
10
#! /bin/sh
# $Id$
# $Log$






# Revision 1.5  2000/12/05 12:44:55  peterg
# Changed $() to ``
#
# Revision 1.4  2000/12/05 12:16:02  peterg
# Changed function name to name()
#
# Revision 1.3  2000/12/04 11:05:01  peterg



>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/sh
# $Id$
# $Log$
# Revision 1.7  2001/01/09 15:43:50  geraint
# Warn gcc that variables may be unused.
#
# Revision 1.6  2001/01/08 05:47:56  geraint
# Restrict scope of variables to file (static)
#
# Revision 1.5  2000/12/05 12:44:55  peterg
# Changed $() to ``
#
# Revision 1.4  2000/12/05 12:16:02  peterg
# Changed function name to name()
#
# Revision 1.3  2000/12/04 11:05:01  peterg
︙︙
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57











58
59
60
TMP_VAR_NAMES="mtt_tmp mtt_o $*"

IN=${SYS}_sympar.txt
OUT=${SYS}_sympar.h

declare_sys_param ()
{
cat ${IN} | awk '{printf ("double %s;\t// %s\n", $1, $2)}'
}

declare_temp_vars ()
{
for name in ${TMP_VAR_NAMES}
do
    echo ""
    i=0
    while [ ${i} -le ${NUM_OF_TMP_VAR} ]
    do
	echo "double ${name}${i};"
	i=`expr ${i} + 1`
    done
done
}

echo Creating ${OUT}











declare_sys_param	>  ${OUT}
declare_temp_vars	>> ${OUT}








|










|






>
>
>
>
>
>
>
>
>
>
>
|


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
TMP_VAR_NAMES="mtt_tmp mtt_o $*"

IN=${SYS}_sympar.txt
OUT=${SYS}_sympar.h

declare_sys_param ()
{
cat ${IN} | awk '{printf ("static double %s MTT_UNUSED;\t// %s\n", $1, $2)}'
}

declare_temp_vars ()
{
for name in ${TMP_VAR_NAMES}
do
    echo ""
    i=0
    while [ ${i} -le ${NUM_OF_TMP_VAR} ]
    do
	echo "static double ${name}${i} MTT_UNUSED;"
	i=`expr ${i} + 1`
    done
done
}

echo Creating ${OUT}
cat <<EOF > ${OUT}
#ifndef MTT_UNUSED
#ifdef __GNUC__
#define MTT_UNUSED __attribute__ ((__unused__))
#else
#define MTT_UNUSED
#endif
#endif

EOF

declare_sys_param	>> ${OUT}
declare_temp_vars	>> ${OUT}


MTT: Model Transformation Tools
[ GitHub | SourceHut | Sourceforge | Fossil RSS ]