/* skip one item (or a whole list if that is the case */ static void skip_one(GScanner *scan) { int tok; tok = g_scanner_get_next_token(scan); // d3_printf("skipping "); // print_token(scan, tok); if (tok == '(') skip_list(scan); }
/* read the flags from the list (open brace has already been read) * stop when the closing brace is found, or on eof */ static int get_flags_from_list(GScanner *scan) { GTokenType tok; int flags = 0; do { tok = g_scanner_get_next_token(scan); // d3_printf("flags "); // print_token(scan, tok); if (tok == '(') { skip_list(scan); continue; } if (tok != G_TOKEN_SYMBOL) continue; switch(intval(scan)) { case SYM_ASTROM: flags |= CAT_ASTROMET; break; case SYM_VAR: flags |= CAT_VARIABLE; break; case SYM_CENTERED: flags |= CPHOT_CENTERED; break; case SYM_NOT_FOUND: flags |= CPHOT_NOT_FOUND; break; case SYM_UNDEF_ERR: flags |= CPHOT_UNDEF_ERR; break; case SYM_HAS_BADPIX: flags |= CPHOT_BADPIX; break; case SYM_BRIGHT: flags |= CPHOT_BURNED; break; case SYM_NO_COLOR: flags |= CPHOT_NO_COLOR; break; case SYM_TRANSFORMED: flags |= CPHOT_TRANSFORMED; break; case SYM_ALL_SKY: flags |= CPHOT_ALL_SKY; break; case SYM_INVALID: flags |= CPHOT_INVALID; break; default: break; } } while (tok != ')' && tok != G_TOKEN_EOF); // d3_printf("flags is %x\n", flags / 16); return flags; }
bool TorrentBase::skip_value() { char c; if (m_buffer.pos() >= m_buffer.m_len) return seterror("expected value, found eof"); c = m_buffer.m_data[m_buffer.pos()]; if (c >= '0' && c <= '9') return skip_string(); if (c == 'i') return skip_number(); if (c == 'l') return skip_list(); if (c == 'd') return skip_dict(); return seterror("expected value"); }
void test1() { WCValSkipList<str_data> skip_list( WCSKIPLIST_PROB_HALF, 4 ); str_data temp; cout << "test1\n"; WCValSkipListIter<str_data> skip_list_iter; if( ++skip_list_iter ) cout << "++iter should have failed"; str_data temp2; if( skip_list_iter.current() != temp2 ) cout << "current should be default value\n"; if( skip_list_iter.container() != 0 ) cout << "container should return 0\n"; skip_list_iter.reset(); if( skip_list_iter() ) cout << "iter() should have failed"; skip_list_iter.exceptions( WCIterExcept::check_all ); test_except( ++skip_list_iter, undef_iter, "++1" ); test_except( skip_list_iter.current(), undef_item, "current1" ); test_except( skip_list_iter.container(), undef_iter, "container1" ); skip_list_iter.reset(); test_except( skip_list_iter(), undef_iter, "()1" ); skip_list_iter.reset( skip_list ); test_except( skip_list_iter.current(), undef_item, "current2" ); if( skip_list_iter.container() != &skip_list ) cout << "container != &skip_list\n"; if( ++skip_list_iter ) cout << "++iter should return false\n"; test_except( ++skip_list_iter, undef_iter, "++2" ); skip_list_iter.reset(); if( skip_list_iter() ) cout << "iter() should return false\n"; test_except( skip_list_iter(), undef_iter, "()2" ); for( int i = 0; i < 20; i++ ) { temp = text[ i ]; skip_list.insert( temp ); }; skip_list.forAll( print_val, 0 ); cout << "\n"; skip_list_iter.reset(); test_except( skip_list_iter.current(), undef_item, "current3" ); while( ++skip_list_iter ) { cout << skip_list_iter.current() << " "; } cout << "\n"; skip_list_iter.reset(); while( skip_list_iter() ) { cout << skip_list_iter.current() << " "; } }
static const char *munge_label (const char *label) { if (label == NULL) return NULL; //label = file_name(label); if (Tau_debug_filter) { if (Tau_debug_show_only) { if (!show_only_list(label)) return NULL; } else if (skip_list(label)) return NULL; } return label; }
int main() { WCValSkipListDict<str_data, int> skip_list( WCSKIPLIST_PROB_QUARTER, 2, alloc_fn, 0 ); skip_list.exceptions( WCExcept::check_all ); str_data temp = "hello"; try { // this is supposed to be a runtime error (alloc failed on index insert) cout << skip_list[ temp ]; } catch( ... ) { cout << "PASS" << endl; } return 0; }
static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd) { struct imap *imap = ctx->imap; struct imap_cmd *cmdp, **pcmdp; char *cmd, *arg, *arg1; int n, resp, resp2, tag; for (;;) { if (buffer_gets(&imap->buf, &cmd)) return RESP_BAD; arg = next_arg(&cmd); if (*arg == '*') { arg = next_arg(&cmd); if (!arg) { fprintf(stderr, "IMAP error: unable to parse untagged response\n"); return RESP_BAD; } if (!strcmp("NAMESPACE", arg)) { /* rfc2342 NAMESPACE response. */ skip_list(&cmd); /* Personal mailboxes */ skip_list(&cmd); /* Others' mailboxes */ skip_list(&cmd); /* Shared mailboxes */ } else if (!strcmp("OK", arg) || !strcmp("BAD", arg) || !strcmp("NO", arg) || !strcmp("BYE", arg)) { if ((resp = parse_response_code(ctx, NULL, cmd)) != RESP_OK) return resp; } else if (!strcmp("CAPABILITY", arg)) { parse_capability(imap, cmd); } else if ((arg1 = next_arg(&cmd))) { ; /* * Unhandled response-data with at least two words. * Ignore it. * * NEEDSWORK: Previously this case handled '<num> EXISTS' * and '<num> RECENT' but as a probably-unintended side * effect it ignores other unrecognized two-word * responses. imap-send doesn't ever try to read * messages or mailboxes these days, so consider * eliminating this case. */ } else { fprintf(stderr, "IMAP error: unable to parse untagged response\n"); return RESP_BAD; } } else if (!imap->in_progress) { fprintf(stderr, "IMAP error: unexpected reply: %s %s\n", arg, cmd ? cmd : ""); return RESP_BAD; } else if (*arg == '+') { /* This can happen only with the last command underway, as it enforces a round-trip. */ cmdp = (struct imap_cmd *)((char *)imap->in_progress_append - offsetof(struct imap_cmd, next)); if (cmdp->cb.data) { n = socket_write(&imap->buf.sock, cmdp->cb.data, cmdp->cb.dlen); free(cmdp->cb.data); cmdp->cb.data = NULL; if (n != (int)cmdp->cb.dlen) return RESP_BAD; } else if (cmdp->cb.cont) { if (cmdp->cb.cont(ctx, cmdp, cmd)) return RESP_BAD; } else { fprintf(stderr, "IMAP error: unexpected command continuation request\n"); return RESP_BAD; } if (socket_write(&imap->buf.sock, "\r\n", 2) != 2) return RESP_BAD; if (!cmdp->cb.cont) imap->literal_pending = 0; if (!tcmd) return DRV_OK; } else {
/* The c++ function for: main(lp:list[string]) [NEW_ALLOC+BAG_UPDATE+SLOT_UPDATE+STRING_UPDATE] */ void main_list(list *lp) { GC_BIND; { ClaireBoolean * rCode = CTRUE; char * _Zcm = copy_string(""); char * _Zcf = copy_string(""); int dblevel = 1; char * _Zout = copy_string(""); char * _Zcj = copy_string(""); int slevel = 0; int clevel = 1; ClaireBoolean * _Zinit_ask = CTRUE; int vlevel = 2; list * l = ((list *) copy_bag(lp)); { ClaireHandler c_handle = ClaireHandler(); if ERROR_IN { { (Reader._starfs_star->value= _string_(copy_string("\\"))); (OBJECT(Generate_producer,Generate.PRODUCER->value)->extension = copy_string(".cpp")); update_property(Optimize.libraries_dir, Optimize.compiler, 17, Kernel._object, _oid_(list::alloc(Kernel._any,3,_string_(copy_string("c:\\claire\\v3.3\\bin\\public\\ntv")), _string_(copy_string("c:\\claire\\v3.3\\bin\\debug\\ntv")), _string_(copy_string("c:\\claire\\v3.3\\bin\\public\\ntv"))))); (Optimize.compiler->headers_dir = copy_string("c:\\claire\\v3.3\\bin\\include")); update_property(Optimize.options, Optimize.compiler, 19, Kernel._object, _oid_(list::alloc(Kernel._any,3,_string_(copy_string("-c /O2 /Oi")), _string_(copy_string("-c /Zi")), _string_(copy_string("-c /Zi"))))); (Optimize.compiler->env = copy_string("ntv")); (Optimize.claire_lib->value= _string_(copy_string(""))); { while ((l->length != 0)) { if ((equal((*(l))[1],_string_(copy_string("?"))) == CTRUE) || (equal((*(l))[1],_string_(copy_string("-help"))) == CTRUE)) printHelp_void(); else if (equal((*(l))[1],_string_(copy_string("-s"))) == CTRUE) { if (3 <= l->length) l= skip_list(l,3); else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -s <s1> <s2>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-f"))) == CTRUE) { if (2 <= l->length) { load_string(string_v((*(l))[2])); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -f <filename>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-env"))) == CTRUE) { if (2 <= l->length) { (Optimize.compiler->env = string_v((*(l))[2])); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -env <OS name>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-m"))) == CTRUE) { if (2 <= l->length) { if (_Zinit_ask == CTRUE) { load_string(copy_string("init")); _Zinit_ask= CFALSE; } { module * m = string2module_string(string_v((*(l))[2])); load_module(m); begin_module(m); l= skip_list(l,2); (Optimize.claire_modules->value= _oid_(OBJECT(list,Optimize.claire_modules->value)->addFast(_oid_(m)))); } } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -m <module>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-v"))) == CTRUE) { if (2 <= l->length) { vlevel= (vlevel+integer_I_string(string_v((*(l))[2]))); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -v <integer>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-ld"))) == CTRUE) { if (2 <= l->length) { (Optimize.claire_lib->value= (*(l))[2]); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -od <directory>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-od"))) == CTRUE) { if (2 <= l->length) { (Optimize.compiler->source = string_v((*(l))[2])); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -od <directory>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-os"))) == CTRUE) { if (2 <= l->length) { slevel= integer_I_string(string_v((*(l))[2])); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -ol <int>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-S"))) == CTRUE) { if (2 <= l->length) { (CLREAD(global_variable,new_class2(Core._global_variable,symbol_I_string2(string_v((*(l))[2]))),value) = Kernel.ctrue); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -S <FLAG>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-o"))) == CTRUE) { if (2 <= l->length) { _Zout= string_v((*(l))[2]); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -o <name>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-p"))) == CTRUE) { (Optimize.OPT->profile_ask = CTRUE); dblevel= ((dblevel <= 1) ? 1 : dblevel ); l= skip_list(l,1); } else if (equal((*(l))[1],_string_(copy_string("-D"))) == CTRUE) { dblevel= 0; l= skip_list(l,1); } else if (equal((*(l))[1],_string_(copy_string("-safe"))) == CTRUE) { (Optimize.compiler->safety = ((dblevel == 0) ? 0 : 1 )); (Optimize.claire_lib->value= (*(Optimize.compiler->libraries_dir))[2]); (Optimize.claire_options->value= (*(Optimize.compiler->options))[2]); l= skip_list(l,1); } else if (equal((*(l))[1],_string_(copy_string("-O"))) == CTRUE) { (Optimize.compiler->optimize_ask = CTRUE); dblevel= 2; l= skip_list(l,1); } else if (equal((*(l))[1],_string_(copy_string("-l"))) == CTRUE) { if (2 <= l->length) { Optimize.compiler->libraries->addFast((*(l))[2]); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -l <library>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-cl"))) == CTRUE) { if (2 <= l->length) { _Zcm= string_v((*(l))[2]); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -cm <module>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-cc"))) == CTRUE) { if (2 <= l->length) { clevel= 0; _Zcm= string_v((*(l))[2]); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -cc <module>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-cm"))) == CTRUE) { if (2 <= l->length) { clevel= 2; _Zcm= string_v((*(l))[2]); l= skip_list(l,2); } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -cl <module>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-cj"))) == CTRUE) { if (2 <= l->length) { _Zcj= string_v((*(l))[2]); l= skip_list(l,2); } } else if (equal((*(l))[1],_string_(copy_string("-cjx"))) == CTRUE) { if (2 <= l->length) { _Zcj= string_v((*(l))[2]); clevel= 0; l= skip_list(l,2); } } else if (equal((*(l))[1],_string_(copy_string("-cx"))) == CTRUE) { if (2 <= l->length) { _Zcf= string_v((*(l))[2]); l= skip_list(l,2); clevel= 2; } else close_exception(((general_error *) (*Core._general_error)(_string_(copy_string("option: -cx <filename>")), _oid_(Kernel.nil)))); } else if (equal((*(l))[1],_string_(copy_string("-n"))) == CTRUE) { _Zinit_ask= CFALSE; l= skip_list(l,1); } else { if (string_v((*(l))[1])[1 - 1] == '-') { print_any((*(l))[1]); princ_string(copy_string(" is an unvalid option\n")); printHelp_void(); } rCode= CFALSE; l= list::empty(Kernel._string); } } } if (equal_string(_Zout,copy_string("")) == CTRUE) { if (equal_string(_Zcm,copy_string("")) != CTRUE) _Zout= _Zcm; else if (equal_string(_Zcf,copy_string("")) != CTRUE) _Zout= _Zcf; } if (_Zinit_ask == CTRUE) load_string(copy_string("init")); (Optimize.claire_options->value= (*(Optimize.compiler->options))[((dblevel == 0) ? 2 : ((dblevel == 2) ? 1 : 3 ) )]); if (equal(Optimize.claire_lib->value,_string_(copy_string(""))) == CTRUE) (Optimize.claire_lib->value= (*(Optimize.compiler->libraries_dir))[((dblevel == 0) ? 2 : ((dblevel == 2) ? 1 : 3 ) )]); (ClEnv->verbose = vlevel); if (slevel > 0) (Optimize.compiler->safety = slevel); if (equal_string(_Zcm,copy_string("")) != CTRUE) { module * m = string2module_string(_Zcm); (Optimize.compiler->active_ask = CTRUE); if (equal(_oid_(m->uses),_oid_(list::alloc(1,GC_OID((*(OBJECT(bag,Optimize.claire_modules->value)))[2])))) == CTRUE) { (Optimize.claire_modules->value= _oid_(shrink_list(OBJECT(bag,Optimize.claire_modules->value),2))); tformat_string(copy_string("=== Light Module ~S:~S -> use ~S=== "),0,list::alloc(3,_oid_(m), GC_OID(_oid_(m->uses)), GC_OID(Optimize.claire_modules->value))); } (Optimize.claire_modules->value= _oid_(OBJECT(list,Optimize.claire_modules->value)->addFast(_oid_(m)))); (*Reader.load)(value_string(copy_string("Compile"))); if (equal_string(_Zout,copy_string("")) != CTRUE) (m->external = _Zout); load_module(m); if (dblevel < 1) { (Optimize.compiler->safety = ((Optimize.compiler->safety <= 4) ? Optimize.compiler->safety : 4 )); Optimize.compiler->debug_ask->addFast(_oid_(m)); } compile_module(m); if (clevel == 1) { if (equal_string(_Zout,copy_string("")) != CTRUE) (m->external = _Zout); cmakefile_any(_oid_(m),copy_string("")); } else if (clevel == 2) cmakefile_any(_oid_(m),_Zout); CL_exit(0); } else if (equal_string(_Zcj,copy_string("")) != CTRUE) (*Core.call)(value_string(copy_string("jcmakefile")), _oid_(string2module_string(_Zcj)), _string_(_Zout), _oid_(equal(clevel,0))); else if (equal_string(_Zcf,copy_string("")) != CTRUE) { (Optimize.compiler->active_ask = CTRUE); (*Reader.load)(value_string(copy_string("Compile"))); load_string(_Zcf); function_compile_string(_Zcf,_Zcf); cmakefile_any(_string_(_Zcf),_Zout); CL_exit(0); } } ClEnv->cHandle--;} else if (belong_to(_oid_(ClEnv->exception_I),_oid_(Kernel._any)) == CTRUE) { c_handle.catchIt();{ restore_state_meta_reader(Reader.reader); debug_if_possible_void(); } } else PREVIOUS_HANDLER;} }
int parse_star(GScanner *scan, struct cat_star *cats) { int havera = 0, havedec = 0, havename = 0, havemag = 0, haveeq = 0; GTokenType tok; do { tok = g_scanner_get_next_token(scan); // d3_printf("star "); // print_token(scan, tok); if (tok == ')') continue; if (tok != G_TOKEN_SYMBOL) { // d3_printf("skip non-symbol\n"); if (tok == '(') skip_list(scan); else skip_one(scan); continue; } switch(intval(scan)) { case SYM_RA: tok = g_scanner_get_next_token(scan); switch(tok) { case G_TOKEN_STRING: havera = !dms_to_degrees(stringval(scan), &cats->ra); cats->ra *= 15.0; break; case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; cats->ra = -floatval(scan); havera = 1; break; case G_TOKEN_FLOAT: cats->ra = floatval(scan); havera = 1; break; case '(': skip_list(scan); break; default: break; } break; case SYM_DEC: tok = g_scanner_get_next_token(scan); switch(tok) { case G_TOKEN_STRING: havedec = !dms_to_degrees(stringval(scan), &cats->dec); break; case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; cats->dec = -floatval(scan); havedec = 1; break; case G_TOKEN_FLOAT: cats->dec = floatval(scan); havedec = 1; break; case '(': skip_list(scan); break; default: break; } break; case SYM_EQUINOX: tok = g_scanner_get_next_token(scan); switch(tok) { case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; haveeq = 1; cats->equinox = -floatval(scan); break; case G_TOKEN_FLOAT: haveeq = 1; cats->equinox = floatval(scan); break; case '(': skip_list(scan); break; default: break; } break; case SYM_PERR: tok = g_scanner_get_next_token(scan); switch(tok) { case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; cats->perr = -floatval(scan); break; case G_TOKEN_FLOAT: cats->perr = floatval(scan); break; case '(': skip_list(scan); break; default: break; } break; case SYM_MAG: tok = g_scanner_get_next_token(scan); switch(tok) { case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; cats->mag = -floatval(scan); havemag = 1; break; case G_TOKEN_FLOAT: cats->mag = floatval(scan); havemag = 1; break; case '(': skip_list(scan); break; default: break; } break; case SYM_SKY: tok = g_scanner_get_next_token(scan); switch(tok) { case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; cats->sky = -floatval(scan); cats->flags |= INFO_SKY; break; case G_TOKEN_FLOAT: cats->sky = floatval(scan); cats->flags |= INFO_SKY; break; case '(': skip_list(scan); break; default: break; } break; case SYM_DIFFAM: tok = g_scanner_get_next_token(scan); switch(tok) { case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; cats->diffam = -floatval(scan); cats->flags |= INFO_DIFFAM; break; case G_TOKEN_FLOAT: cats->diffam = floatval(scan); cats->flags |= INFO_DIFFAM; break; case '(': skip_list(scan); break; default: break; } break; case SYM_RESIDUAL: tok = g_scanner_get_next_token(scan); switch(tok) { case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; cats->residual = -floatval(scan); cats->flags |= INFO_RESIDUAL; break; case G_TOKEN_FLOAT: cats->residual = floatval(scan); cats->flags |= INFO_RESIDUAL; break; case '(': skip_list(scan); break; default: break; } break; case SYM_STDERR: tok = g_scanner_get_next_token(scan); switch(tok) { case '-': tok = g_scanner_get_next_token(scan); if (tok != G_TOKEN_FLOAT) break; cats->std_err = -floatval(scan); cats->flags |= INFO_STDERR; break; case G_TOKEN_FLOAT: cats->std_err = floatval(scan); cats->flags |= INFO_STDERR; break; case '(': skip_list(scan); break; default: break; } break; case SYM_COMMENTS: tok = g_scanner_get_next_token(scan); switch(tok) { case G_TOKEN_STRING: cats->comments = strdup(stringval(scan)); break; case '(': skip_list(scan); break; default: break; } break; case SYM_SMAGS: tok = g_scanner_get_next_token(scan); switch(tok) { case G_TOKEN_STRING: cats->smags = strdup(stringval(scan)); break; case '(': skip_list(scan); break; default: break; } break; case SYM_IMAGS: tok = g_scanner_get_next_token(scan); switch(tok) { case G_TOKEN_STRING: cats->imags = strdup(stringval(scan)); break; case '(': skip_list(scan); break; default: break; } break; case SYM_NAME: tok = g_scanner_get_next_token(scan); switch(tok) { case G_TOKEN_STRING: strncpy(cats->name, stringval(scan), CAT_STAR_NAME_SZ); havename = 1; break; case '(': skip_list(scan); break; default: break; } break; case SYM_TYPE: tok = g_scanner_get_next_token(scan); switch(tok) { case G_TOKEN_SYMBOL: switch(intval(scan)) { case SYM_STD: cats->flags = (cats->flags & ~CAT_STAR_TYPE_MASK) | CAT_STAR_TYPE_APSTD; cats->flags &= ~CAT_VARIABLE; break; case SYM_TGT: case SYM_TARGET: cats->flags = (cats->flags & ~CAT_STAR_TYPE_MASK) | CAT_STAR_TYPE_APSTAR; break; case SYM_FIELD: cats->flags = (cats->flags & ~CAT_STAR_TYPE_MASK) | CAT_STAR_TYPE_SREF; break; case SYM_CATALOG: cats->flags = (cats->flags & ~CAT_STAR_TYPE_MASK) | CAT_STAR_TYPE_CAT; break; default: break; } break; case '(': skip_list(scan); break; default: break; } break; case SYM_FLAGS: tok = g_scanner_get_next_token(scan); switch(tok) { case '(': cats->flags |= get_flags_from_list(scan); break; default: break; } break; case SYM_NOISE: tok = g_scanner_get_next_token(scan); switch(tok) { case '(': get_noise_from_rcp(scan, cats); break; default: break; } break; case SYM_CENTROID: tok = g_scanner_get_next_token(scan); switch(tok) { case '(': get_centroid_from_rcp(scan, cats); break; default: break; } break; default: tok = g_scanner_get_next_token(scan); switch(tok) { case '(': skip_list(scan); break; default: break; } break; } } while (tok != ')' && tok != G_TOKEN_EOF); if (!havemag || cats->mag == 0.0) { // mag_from_smags(cats); } if (!haveeq) cats->equinox = 2000.0; if (havedec && havera && havename) return 0; else return -1; }