Permalink
Browse files

fix indenting

1 parent a13c8ed commit ddb3ac708c5a33d53ed1a32abd9e28c1ba386bb8 @BenLangmead committed Jun 13, 2017
Showing with 28 additions and 28 deletions.
  1. +28 −28 pat.cpp
View
56 pat.cpp
@@ -275,11 +275,11 @@ pair<bool, int> CFilePatternSource::nextBatch(
void CFilePatternSource::open() {
if(is_open_) {
is_open_ = false;
- if (compressed_) {
- gzclose(zfp_);
- zfp_ = NULL;
- }
- else if (fp_ != stdin) {
+ if (compressed_) {
+ gzclose(zfp_);
+ zfp_ = NULL;
+ }
+ else if (fp_ != stdin) {
fclose(fp_);
fp_ = NULL;
}
@@ -291,42 +291,42 @@ void CFilePatternSource::open() {
while(filecur_ < infiles_.size()) {
// Open read
if(infiles_[filecur_] == "-") {
- compressed_ = true;
- int fn = dup(fileno(stdin));
- zfp_ = gzdopen(fn, "rb");
+ compressed_ = true;
+ int fn = dup(fileno(stdin));
+ zfp_ = gzdopen(fn, "rb");
}
- else {
- compressed_ = false;
+ else {
+ compressed_ = false;
if (is_gzipped_file(infiles_[filecur_])) {
compressed_ = true;
zfp_ = gzopen(infiles_[filecur_].c_str(), "rb");
}
else {
fp_ = fopen(infiles_[filecur_].c_str(), "rb");
}
- if ((compressed_ && zfp_ == NULL) || (!compressed_ && fp_ == NULL)) {
- if(!errs_[filecur_]) {
- cerr << "Warning: Could not open read file \""
- << infiles_[filecur_] << "\" for reading; skipping..."
- << endl;
- errs_[filecur_] = true;
- }
- filecur_++;
- continue;
- }
+ if ((compressed_ && zfp_ == NULL) || (!compressed_ && fp_ == NULL)) {
+ if(!errs_[filecur_]) {
+ cerr << "Warning: Could not open read file \""
+ << infiles_[filecur_] << "\" for reading; skipping..."
+ << endl;
+ errs_[filecur_] = true;
+ }
+ filecur_++;
+ continue;
+ }
}
is_open_ = true;
- if (compressed_) {
+ if (compressed_) {
#if ZLIB_VERNUM < 0x1235
- cerr << "Warning: gzbuffer added in zlib v1.2.3.5. Unable to change "
- "buffer size from default of 8192." << endl;
+ cerr << "Warning: gzbuffer added in zlib v1.2.3.5. Unable to change "
+ "buffer size from default of 8192." << endl;
#else
- gzbuffer(zfp_, 64*1024);
+ gzbuffer(zfp_, 64*1024);
#endif
- }
- else {
- setvbuf(fp_, buf_, _IOFBF, 64*1024);
- }
+ }
+ else {
+ setvbuf(fp_, buf_, _IOFBF, 64*1024);
+ }
if(!qinfiles_.empty()) {
if(qinfiles_[filecur_] == "-") {
qfp_ = stdin;

0 comments on commit ddb3ac7

Please sign in to comment.