changed the main loop a little bit
This commit is contained in:
		| @ -1523,7 +1523,6 @@ int main (int argc, char* argv[]) | ||||
| 		return -1; | ||||
| 	} | ||||
|  | ||||
|  | ||||
| 	{ | ||||
| 		hcl_oow_t tab_size; | ||||
| 		tab_size = 5000; | ||||
| @ -1597,7 +1596,7 @@ int main (int argc, char* argv[]) | ||||
| 	xtn->read_path = argv[opt.ind++]; | ||||
| 	if (opt.ind < argc) xtn->print_path = argv[opt.ind++]; | ||||
|  | ||||
| 	if (hcl_attachio (hcl, read_handler, print_handler) <= -1) | ||||
| 	if (hcl_attachio(hcl, read_handler, print_handler) <= -1) | ||||
| 	{ | ||||
| 		hcl_logbfmt (hcl, HCL_LOG_STDERR, "ERROR: cannot attache input stream - [%d] %js\n", hcl_geterrnum(hcl), hcl_geterrmsg(hcl)); | ||||
| 		hcl_close (hcl); | ||||
| @ -1619,14 +1618,14 @@ int main (int argc, char* argv[]) | ||||
| 			else if (hcl->errnum == HCL_ESYNERR) | ||||
| 			{ | ||||
| 				print_synerr (hcl); | ||||
| 				if (xtn->reader_istty) continue; | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				hcl_logbfmt (hcl, HCL_LOG_STDERR, "ERROR: cannot read object - [%d] %js\n", hcl_geterrnum(hcl), hcl_geterrmsg(hcl)); | ||||
| 			} | ||||
| 				 | ||||
| 			if (!xtn->reader_istty) goto oops; | ||||
| 			continue; | ||||
| 			} | ||||
| 			goto oops; | ||||
| 		} | ||||
|  | ||||
| 		if (hcl_print(hcl, obj) <= -1) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user