ext2sim: gratuitous constification of localvars, struct members, prototypes
Feel free to undo variables as necessary in the future as requirements change.
This commit is contained in:
parent
7c3df3ce22
commit
49115d7d06
|
|
@ -171,7 +171,7 @@ int esDevsMerged;
|
||||||
/* cache list used to find parallel devs */
|
/* cache list used to find parallel devs */
|
||||||
typedef struct _devMerge {
|
typedef struct _devMerge {
|
||||||
int l, w;
|
int l, w;
|
||||||
EFNode *g, *s, *d, *b;
|
const EFNode *g, *s, *d, *b;
|
||||||
Dev * dev;
|
Dev * dev;
|
||||||
int esFMIndex;
|
int esFMIndex;
|
||||||
const HierName *hierName;
|
const HierName *hierName;
|
||||||
|
|
@ -1024,7 +1024,8 @@ simdevVisit(
|
||||||
ClientData cdata) /* unused */
|
ClientData cdata) /* unused */
|
||||||
{
|
{
|
||||||
const DevTerm *gate, *source, *drain, *term;
|
const DevTerm *gate, *source, *drain, *term;
|
||||||
EFNode *subnode, *snode, *dnode;
|
const EFNode *subnode;
|
||||||
|
EFNode *snode, *dnode;
|
||||||
int l, w;
|
int l, w;
|
||||||
Rect r;
|
Rect r;
|
||||||
char name[12];
|
char name[12];
|
||||||
|
|
@ -1336,7 +1337,7 @@ simdevSubstrate(
|
||||||
FILE *outf)
|
FILE *outf)
|
||||||
{
|
{
|
||||||
HashEntry *he;
|
HashEntry *he;
|
||||||
EFNodeName *nn;
|
const EFNodeName *nn;
|
||||||
char *suf;
|
char *suf;
|
||||||
int l;
|
int l;
|
||||||
EFNode *subnode;
|
EFNode *subnode;
|
||||||
|
|
@ -1359,7 +1360,7 @@ simdevSubstrate(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* Canonical name */
|
/* Canonical name */
|
||||||
nn = (EFNodeName *) HashGetValue(he);
|
nn = (const EFNodeName *) HashGetValue(he);
|
||||||
subnode = nn->efnn_node;
|
subnode = nn->efnn_node;
|
||||||
if ( esFormat == SU ) {
|
if ( esFormat == SU ) {
|
||||||
if ( doAP ) {
|
if ( doAP ) {
|
||||||
|
|
@ -1484,7 +1485,7 @@ simdevOutNode(
|
||||||
FILE *outf)
|
FILE *outf)
|
||||||
{
|
{
|
||||||
HashEntry *he;
|
HashEntry *he;
|
||||||
EFNodeName *nn;
|
const EFNodeName *nn;
|
||||||
|
|
||||||
he = EFHNConcatLook(prefix, suffix, name);
|
he = EFHNConcatLook(prefix, suffix, name);
|
||||||
if (he == NULL)
|
if (he == NULL)
|
||||||
|
|
@ -1494,7 +1495,7 @@ simdevOutNode(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Canonical name */
|
/* Canonical name */
|
||||||
nn = (EFNodeName *) HashGetValue(he);
|
nn = (const EFNodeName *) HashGetValue(he);
|
||||||
(void) putc(' ', outf);
|
(void) putc(' ', outf);
|
||||||
EFHNOut(nn->efnn_node->efnode_name->efnn_hier, outf);
|
EFHNOut(nn->efnn_node->efnode_name->efnn_hier, outf);
|
||||||
if ( nn->efnn_node->efnode_client == PTR2CD(NULL) )
|
if ( nn->efnn_node->efnode_client == PTR2CD(NULL) )
|
||||||
|
|
@ -1618,11 +1619,11 @@ simnodeVisit(
|
||||||
double cap,
|
double cap,
|
||||||
ClientData cdata) /* unused */
|
ClientData cdata) /* unused */
|
||||||
{
|
{
|
||||||
EFNodeName *nn;
|
const EFNodeName *nn;
|
||||||
const HierName *hierName;
|
const HierName *hierName;
|
||||||
bool isGlob;
|
bool isGlob;
|
||||||
const char *fmt;
|
const char *fmt;
|
||||||
EFAttr *ap;
|
const EFAttr *ap;
|
||||||
|
|
||||||
if (esDevNodesOnly && node->efnode_client == PTR2CD(NULL))
|
if (esDevNodesOnly && node->efnode_client == PTR2CD(NULL))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1712,10 +1713,10 @@ devMerge *
|
||||||
simmkDevMerge(
|
simmkDevMerge(
|
||||||
int l,
|
int l,
|
||||||
int w,
|
int w,
|
||||||
EFNode *g,
|
const EFNode *g,
|
||||||
EFNode *s,
|
const EFNode *s,
|
||||||
EFNode *d,
|
const EFNode *d,
|
||||||
EFNode *b,
|
const EFNode *b,
|
||||||
const HierName *hn,
|
const HierName *hn,
|
||||||
Dev *dev)
|
Dev *dev)
|
||||||
{
|
{
|
||||||
|
|
@ -1790,10 +1791,10 @@ simmergeVisit(
|
||||||
Transform *trans, /* Coordinate transform (not used) */
|
Transform *trans, /* Coordinate transform (not used) */
|
||||||
ClientData cdata) /* unused */
|
ClientData cdata) /* unused */
|
||||||
{
|
{
|
||||||
DevTerm *gate, *source, *drain;
|
const DevTerm *gate, *source, *drain;
|
||||||
Dev *cf;
|
Dev *cf;
|
||||||
DevTerm *cg, *cs, *cd;
|
const DevTerm *cg, *cs, *cd;
|
||||||
EFNode *subnode, *snode, *dnode, *gnode;
|
const EFNode *subnode, *snode, *dnode, *gnode;
|
||||||
int pmode, l, w;
|
int pmode, l, w;
|
||||||
float m;
|
float m;
|
||||||
devMerge *fp, *cfp;
|
devMerge *fp, *cfp;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue