projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove a printf statement
[lttv.git]
/
ltt
/
branches
/
poly
/
ltt
/
parser.c
diff --git
a/ltt/branches/poly/ltt/parser.c
b/ltt/branches/poly/ltt/parser.c
index 1ab1b73bf7bf256ac23f468d95482c31584cfc33..ab24a6c2e0030898d11c8141edff00c2ec8cd0c4 100644
(file)
--- a/
ltt/branches/poly/ltt/parser.c
+++ b/
ltt/branches/poly/ltt/parser.c
@@
-97,7
+97,7
@@
int getSizeindex(unsigned int value)
unsigned long long int getSize(parse_file_t *in)
{
char *token, *token2;
unsigned long long int getSize(parse_file_t *in)
{
char *token, *token2;
-
unsigned long long int ret;
+ unsigned long long int ret;
token = getToken(in);
token = getToken(in);
@@
-198,7
+198,7
@@
void getTypeAttributes(parse_file_t *in, type_descriptor_t *t,
sequence_t * unnamed_types, table_t * named_types)
{
char * token;
sequence_t * unnamed_types, table_t * named_types)
{
char * token;
-
char
car;
+
int
car;
t->fmt = NULL;
t->size = 0;
t->fmt = NULL;
t->size = 0;
@@
-263,7
+263,7
@@
void getTypeAttributes(parse_file_t *in, type_descriptor_t *t,
void getEventAttributes(parse_file_t *in, event_t *ev)
{
char * token;
void getEventAttributes(parse_file_t *in, event_t *ev)
{
char * token;
-
char
car;
+
int
car;
ev->name = NULL;
ev->per_trace = 0;
ev->name = NULL;
ev->per_trace = 0;
@@
-326,7
+326,7
@@
void getEventAttributes(parse_file_t *in, event_t *ev)
void getFacilityAttributes(parse_file_t *in, facility_t *fac)
{
char * token;
void getFacilityAttributes(parse_file_t *in, facility_t *fac)
{
char * token;
-
char
car;
+
int
car;
fac->name = NULL;
fac->arch = NULL;
fac->name = NULL;
fac->arch = NULL;
@@
-371,7
+371,7
@@
void getFacilityAttributes(parse_file_t *in, facility_t *fac)
void getFieldAttributes(parse_file_t *in, field_t *f)
{
char * token;
void getFieldAttributes(parse_file_t *in, field_t *f)
{
char * token;
-
char
car;
+
int
car;
f->name = NULL;
f->name = NULL;
@@
-396,7
+396,7
@@
char *getNameAttribute(parse_file_t *in)
{
char * token;
char *name = NULL;
{
char * token;
char *name = NULL;
-
char
car;
+
int
car;
while(1) {
token = getToken(in);
while(1) {
token = getToken(in);
@@
-459,7
+459,8
@@
error:
char * getDescription(parse_file_t *in)
{
long int pos;
char * getDescription(parse_file_t *in)
{
long int pos;
- char * token, car, *str;
+ char * token, *str;
+ int car;
pos = ftell(in->fp);
pos = ftell(in->fp);
@@
-749,8
+750,10
@@
type_descriptor_t *parseType(parse_file_t *in, type_descriptor_t *inType,
//getLAnglebracket(in); //<subtype>
/* subfield */
//getLAnglebracket(in); //<subtype>
/* subfield */
- f = (field_t *)memAlloc(sizeof(field_t));
- sequence_push(&(t->fields),f);
+ f = (field_t *)memAlloc(sizeof(field_t));
+
+ f->name = NULL;
+ sequence_push(&(t->fields),f);
parseFields(in, f, unnamed_types, named_types, 0);
//getLAnglebracket(in); //<type struct>
parseFields(in, f, unnamed_types, named_types, 0);
//getLAnglebracket(in); //<type struct>
@@
-771,14
+774,16
@@
type_descriptor_t *parseType(parse_file_t *in, type_descriptor_t *inType,
//getLAnglebracket(in); //<sequence size type>
/* subfield */
//getLAnglebracket(in); //<sequence size type>
/* subfield */
- f = (field_t *)memAlloc(sizeof(field_t));
- sequence_push(&(t->fields),f);
+ f = (field_t *)memAlloc(sizeof(field_t));
+ f->name = NULL;
+ sequence_push(&(t->fields),f);
parseFields(in, f, unnamed_types, named_types, 0);
//getLAnglebracket(in); //<subtype>
/* subfield */
parseFields(in, f, unnamed_types, named_types, 0);
//getLAnglebracket(in); //<subtype>
/* subfield */
- f = (field_t *)memAlloc(sizeof(field_t));
- sequence_push(&(t->fields),f);
+ f = (field_t *)memAlloc(sizeof(field_t));
+ f->name = NULL;
+ sequence_push(&(t->fields),f);
parseFields(in, f, unnamed_types, named_types, 0);
//getLAnglebracket(in); //<type sequence>
parseFields(in, f, unnamed_types, named_types, 0);
//getLAnglebracket(in); //<type sequence>
@@
-837,7
+842,7
@@
type_descriptor_t *parseType(parse_file_t *in, type_descriptor_t *inType,
str = allocAndCopy(getNameAttribute(in));
has_value = getValueAttribute(in, &loc_value);
str = allocAndCopy(getNameAttribute(in));
has_value = getValueAttribute(in, &loc_value);
-
sequence_push(&(t->labels),str);
+ sequence_push(&(t->labels),str);
if(has_value) value = loc_value;
else value++;
if(has_value) value = loc_value;
else value++;
@@
-1127,9
+1132,9
@@
char * getEqual(parse_file_t *in)
return token;
}
return token;
}
-
char
seekNextChar(parse_file_t *in)
+
int
seekNextChar(parse_file_t *in)
{
{
-
char
car;
+
int
car;
while((car = getc(in->fp)) != EOF) {
if(!isspace(car)){
ungetc(car,in->fp);
while((car = getc(in->fp)) != EOF) {
if(!isspace(car)){
ungetc(car,in->fp);
@@
-1162,7
+1167,7
@@
void ungetToken(parse_file_t * in)
char *getToken(parse_file_t * in)
{
FILE *fp = in->fp;
char *getToken(parse_file_t * in)
{
FILE *fp = in->fp;
-
char
car, car1;
+
int
car, car1;
int pos = 0, escaped;
if(in->unget == 1) {
int pos = 0, escaped;
if(in->unget == 1) {
@@
-1274,7
+1279,7
@@
char *getToken(parse_file_t * in)
void skipComment(parse_file_t * in)
{
void skipComment(parse_file_t * in)
{
-
char
car;
+
int
car;
while((car = getc(in->fp)) != EOF) {
if(car == '\n') in->lineno++;
else if(car == '*') {
while((car = getc(in->fp)) != EOF) {
if(car == '\n') in->lineno++;
else if(car == '*') {
@@
-1289,7
+1294,7
@@
void skipComment(parse_file_t * in)
void skipEOL(parse_file_t * in)
{
void skipEOL(parse_file_t * in)
{
-
char
car;
+
int
car;
while((car = getc(in->fp)) != EOF) {
if(car == '\n') {
ungetc(car,in->fp);
while((car = getc(in->fp)) != EOF) {
if(car == '\n') {
ungetc(car,in->fp);
This page took
0.025527 seconds
and
4
git commands to generate.