recognize and store field attribute "prop()"

This commit is contained in:
Michael Davidsaver
2013-11-04 13:39:16 -05:00
parent 3d8bf34177
commit 034388f009
3 changed files with 11 additions and 2 deletions

View File

@@ -76,7 +76,8 @@ typedef struct dbFldDes{ /* field description */
short indRecordType; /*within dbRecordType.papFldDes */
short special; /*Special processing requirements */
dbfType field_type; /*Field type as defined in dbFldTypes.h */
short process_passive;/*should dbPutField process passive */
unsigned int process_passive:1;/*should dbPutField process passive */
unsigned int prop:1;/*field is a metadata, post DBE_PROPERTY on change*/
ctType base; /*base for integer to string conversions*/
short promptgroup; /*prompt, i.e. gui group */
short interest; /*interest level */

View File

@@ -580,6 +580,13 @@ static void dbRecordtypeFieldItem(char *name,char *value)
yyerrorAbort("menu not found");
return;
}
if(strcmp(name,"prop")==0) {
if(strcmp(value, "YES")==0)
pdbFldDes->prop = 1;
else
pdbFldDes->prop = 0;
return;
}
}
static void dbRecordtypeCdef(char *text) {

View File

@@ -35,7 +35,8 @@ our %field_attrs = (
base => qr/^(?:DECIMAL|HEX)$/,
size => qr/^\d+$/,
extra => qr/^.*$/,
menu => qr/^$RXident$/o
menu => qr/^$RXident$/o,
prop => qr/^(?:YES|NO)$/
);
sub new {