Hi,<br>I am recently reading the GMX src-code for some need. I notice there are many 'enum' typy defination in the 'enums.h' file. They are just like this:<br><br>...<br>enum {<br> epbcXYZ, epbcNONE, epbcXY, epbcSCREW, epbcNR<br>
};<br><br>enum {<br> etcNO, etcBERENDSEN, etcNOSEHOOVER, etcYES, etcANDERSEN, etcANDERSENINTERVAL, etcVRESCALE, etcNR<br>};<br>...<br><br>However in the standard C, enum type should be defined like ' enum enumtypename { Sum, Mon,...,Sat } enumname1 ' . <br>
For the GMX code above I don't understand how it is work?<br><br>I also notice there is a note ' /* note: these enums should correspond to the names in gmxlib/names.c */' , <br>...<br>const char *epbc_names[epbcNR+1]=<br>
{<br> "xyz", "no", "xy", "screw", NULL<br>};<br><br>const char *ens_names[ensNR+1]=<br>{<br> "Grid","Simple", NULL<br>};<br>... <br>I just don't know how the two files are matched <span class="enfont">automatically. Is any suggestion about this?</span><br>
<br><br><br><br>