- if(strcmp("format",token))in->error(in,"format was expected");
- getEqual(in);
- token = getQuotedString(in);
- return token;
+/**************************************************************************
+ * Function :
+ * getFacilityAttributes
+ * Description :
+ * Read the attribute from the input file.
+ *
+ * Parameters :
+ * in , input file handle.
+ * fac , the facility to fill.
+ *
+ **************************************************************************/
+
+void getFacilityAttributes(parse_file_t *in, facility_t *fac)
+{
+ char * token;
+ char car;
+
+ fac->name = NULL;
+
+ while(1) {
+ token = getToken(in);
+ if(strcmp("/",token) == 0 || strcmp(">",token) == 0){
+ ungetToken(in);
+ break;
+ }
+
+ if(!strcmp("name",token)) {
+ getEqual(in);
+ car = seekNextChar(in);
+ if(car == EOF) in->error(in,"name was expected");
+ else if(car == '\"') fac->name = allocAndCopy(getQuotedString(in));
+ else fac->name = allocAndCopy(getName(in));
+ }
+ }