diff options
Diffstat (limited to 'src/input/libreal/asmrp.c')
-rw-r--r-- | src/input/libreal/asmrp.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/input/libreal/asmrp.c b/src/input/libreal/asmrp.c index 902c59d42..2c02c2f13 100644 --- a/src/input/libreal/asmrp.c +++ b/src/input/libreal/asmrp.c @@ -2,7 +2,7 @@ * Copyright (C) 2002-2004 the xine project * * This file is part of xine, a free video player. - * + * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -85,7 +85,7 @@ typedef struct { int sym; int num; - + char str[ASMRP_MAX_ID]; /* private part */ @@ -115,7 +115,7 @@ static void asmrp_dispose (asmrp_t *p) { int i; - for (i=0; i<p->sym_tab_num; i++) + for (i=0; i<p->sym_tab_num; i++) free (p->sym_tab[i].id); free (p); @@ -133,7 +133,7 @@ static void asmrp_init (asmrp_t *p, const char *str) { p->buf = strdup (str); p->pos = 0; - + asmrp_getch (p); } @@ -167,10 +167,10 @@ static void asmrp_string (asmrp_t *p) { asmrp_getch (p); } p->str[l]=0; - + if (p->ch=='"') asmrp_getch (p); - + p->sym = ASMRP_SYM_STRING; } @@ -189,7 +189,7 @@ static void asmrp_identifier (asmrp_t *p) { asmrp_getch (p); } p->str[l]=0; - + p->sym = ASMRP_SYM_ID; } @@ -387,10 +387,10 @@ static int asmrp_set_id (asmrp_t *p, char *s, int v) { lprintf ("new symbol '%s'\n", s); - } + } p->sym_tab[i].v = v; - + lprintf ("symbol '%s' assigned %d\n", s, v); return i; @@ -401,7 +401,7 @@ static int asmrp_condition (asmrp_t *p) ; static int asmrp_operand (asmrp_t *p) { int i, ret; - + lprintf ("operand\n"); ret = 0; @@ -411,7 +411,7 @@ static int asmrp_operand (asmrp_t *p) { case ASMRP_SYM_DOLLAR: asmrp_get_sym (p); - + if (p->sym != ASMRP_SYM_ID) { printf ("error: identifier expected.\n"); _x_abort(); @@ -453,7 +453,7 @@ static int asmrp_operand (asmrp_t *p) { } lprintf ("operand done, =%d\n", ret); - + return ret; } @@ -503,7 +503,7 @@ static int asmrp_comp_expression (asmrp_t *p) { } static int asmrp_condition (asmrp_t *p) { - + int a; lprintf ("condition\n"); @@ -542,7 +542,7 @@ static void asmrp_assignment (asmrp_t *p) { lprintf ("empty assignment\n"); return; } - + if (p->sym != ASMRP_SYM_ID) { printf ("error: identifier expected\n"); _x_abort (); @@ -555,7 +555,7 @@ static void asmrp_assignment (asmrp_t *p) { } asmrp_get_sym (p); - if ( (p->sym != ASMRP_SYM_NUM) && (p->sym != ASMRP_SYM_STRING) + if ( (p->sym != ASMRP_SYM_NUM) && (p->sym != ASMRP_SYM_STRING) && (p->sym != ASMRP_SYM_ID)) { printf ("error: number or string expected\n"); _x_abort (); @@ -566,22 +566,22 @@ static void asmrp_assignment (asmrp_t *p) { } static int asmrp_rule (asmrp_t *p) { - + int ret; lprintf ("rule\n"); ret = 1; - + if (p->sym == ASMRP_SYM_HASH) { asmrp_get_sym (p); ret = asmrp_condition (p); while (p->sym == ASMRP_SYM_COMMA) { - + asmrp_get_sym (p); - + asmrp_assignment (p); } |