int gdbr_read_registers(libgdbr_t* g) { int ret = -1; ret = send_command (g, CMD_READREGS); if (ret < 0) return ret; if (read_packet (g) > 0) { parse_packet (g, 0); return handle_g (g); } return -1; }
bool ContextFisher::parseCmdArgs(int argc, char **argv, int skipFirstArgs) { _argc = argc; _argv = argv; _skipFirstArgs = skipFirstArgs; if (_argc < 2) { setShowHelp(true); return false; } setProgram(_programNames[argv[0]]); _argsProcessed.resize(_argc - _skipFirstArgs, false); for (_i=_skipFirstArgs; _i < argc; _i++) { if (isUsed(_i - _skipFirstArgs)) { continue; } else if (strcmp(_argv[_i], "-s") == 0) { if (!handle_s()) return false; } else if (strcmp(_argv[_i], "-S") == 0) { if (!handle_S()) return false; } else if (strcmp(_argv[_i], "-exclude") == 0) { if (!handle_exclude()) return false; } if (strcmp(_argv[_i], "-g") == 0) { if (!handle_g()) return false; } if(strcmp(_argv[_i], "-m") == 0) { markUsed(_i - _skipFirstArgs); setUseMergedIntervals(true); } } return ContextIntersect::parseCmdArgs(argc, argv, _skipFirstArgs); }
bool ContextBase::parseCmdArgs(int argc, char **argv, int skipFirstArgs) { for (_i=_skipFirstArgs; _i < argc; _i++) { if (isUsed(_i - _skipFirstArgs)) { continue; } if (strcmp(_argv[_i], "-i") == 0) { if (!handle_i()) return false; } else if (strcmp(_argv[_i], "-g") == 0) { if (!handle_g()) return false; } else if ((strcmp(_argv[_i], "-h") == 0) || (strcmp(_argv[_i], "--help") == 0)) { if (!handle_h()) return false; } else if (strcmp(_argv[_i], "-split") == 0) { if (!handle_split()) return false; } else if (strcmp(_argv[_i], "-bed") == 0) { if (!handle_bed()) return false; } else if (strcmp(_argv[_i], "-ubam") == 0) { if (!handle_ubam()) return false; } else if (strcmp(_argv[_i], "-fbam") == 0) { if (!handle_fbam()) return false; } else if(strcmp(_argv[_i], "-sorted") == 0) { if (!handle_sorted()) return false; } else if (strcmp(_argv[_i], "-nobuf") == 0) { if (!handle_nobuf()) return false; } else if (strcmp(_argv[_i], "-iobuf") == 0) { if (!handle_iobuf()) return false; } else if (strcmp(_argv[_i], "-prec") == 0) { if (!handle_prec()) return false; } else if (strcmp(_argv[_i], "-header") == 0) { if (!handle_header()) return false; } else if (strcmp(_argv[_i], "-n") == 0) { if (!handle_n()) return false; } else if (strcmp(_argv[_i], "-seed") == 0) { if (!handle_seed()) return false; } else if ((strcmp(_argv[_i], "-o") == 0) || (strcmp(_argv[_i], "-ops") == 0)) { if (!handle_o()) return false; } else if ((strcmp(_argv[_i], "-c") == 0) || (strcmp(_argv[_i], "-opCols") == 0)) { if (!handle_c()) return false; } else if (strcmp(_argv[_i], "-null") == 0) { if (!handle_null()) return false; } else if (strcmp(_argv[_i], "-delim") == 0) { if (!handle_delim()) return false; } else if (strcmp(_argv[_i], "-sortout") == 0) { if (!handle_sortout()) return false; } else if (strcmp(_argv[_i], "-nonamecheck") == 0) { if (!handle_nonamecheck()) return false; } } return true; }
bool ContextBase::parseCmdArgs(int argc, char **argv, int skipFirstArgs) { _argc = argc; _argv = argv; _skipFirstArgs = skipFirstArgs; if (_argc < 2) { setShowHelp(true); return false; } setProgram(_programNames[argv[0]]); _argsProcessed.resize(_argc - _skipFirstArgs, false); for (_i=_skipFirstArgs; _i < argc; _i++) { if (isUsed(_i - _skipFirstArgs)) { continue; } if (strcmp(_argv[_i], "-i") == 0) { if (!handle_i()) return false; } else if (strcmp(_argv[_i], "-g") == 0) { if (!handle_g()) return false; } else if ((strcmp(_argv[_i], "-h") == 0) || (strcmp(_argv[_i], "--help") == 0)) { if (!handle_h()) return false; } else if (strcmp(_argv[_i], "-split") == 0) { if (!handle_split()) return false; } else if (strcmp(_argv[_i], "-bed") == 0) { if (!handle_bed()) return false; } else if (strcmp(_argv[_i], "-ubam") == 0) { if (!handle_ubam()) return false; } else if (strcmp(_argv[_i], "-fbam") == 0) { if (!handle_fbam()) return false; } else if(strcmp(_argv[_i], "-sorted") == 0) { if (!handle_sorted()) return false; } else if (strcmp(_argv[_i], "-nobuf") == 0) { if (!handle_nobuf()) return false; } else if (strcmp(_argv[_i], "-iobuf") == 0) { if (!handle_iobuf()) return false; } else if (strcmp(_argv[_i], "-header") == 0) { if (!handle_header()) return false; } else if (strcmp(_argv[_i], "-n") == 0) { if (!handle_n()) return false; } else if (strcmp(_argv[_i], "-seed") == 0) { if (!handle_seed()) return false; } else if (strcmp(_argv[_i], "-o") == 0) { if (!handle_o()) return false; } else if (strcmp(_argv[_i], "-c") == 0) { if (!handle_c()) return false; } else if (strcmp(_argv[_i], "-null") == 0) { if (!handle_null()) return false; } else if (strcmp(_argv[_i], "-delim") == 0) { if (!handle_delim()) return false; } } return true; }