r810: add err_puts()
puts() adds '\n', but fputs() does not.
This commit is contained in:
parent
b5cba257c1
commit
1e611b235c
2
main.c
2
main.c
|
|
@ -4,7 +4,7 @@
|
|||
#include "utils.h"
|
||||
|
||||
#ifndef PACKAGE_VERSION
|
||||
#define PACKAGE_VERSION "0.7.10-r809-dirty"
|
||||
#define PACKAGE_VERSION "0.7.10-r810-dirty"
|
||||
#endif
|
||||
|
||||
int bwa_fa2pac(int argc, char *argv[]);
|
||||
|
|
|
|||
11
utils.c
11
utils.c
|
|
@ -219,6 +219,17 @@ int err_fputs(const char *s, FILE *stream)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int err_puts(const char *s)
|
||||
{
|
||||
int ret = puts(s);
|
||||
if (EOF == ret)
|
||||
{
|
||||
_err_fatal_simple("puts", strerror(errno));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int err_fflush(FILE *stream)
|
||||
{
|
||||
int ret = fflush(stream);
|
||||
|
|
|
|||
2
utils.h
2
utils.h
|
|
@ -80,7 +80,7 @@ extern "C" {
|
|||
int err_fputc(int c, FILE *stream);
|
||||
#define err_putchar(C) err_fputc((C), stdout)
|
||||
int err_fputs(const char *s, FILE *stream);
|
||||
#define err_puts(S) err_fputs((S), stdout)
|
||||
int err_puts(const char *s);
|
||||
int err_fflush(FILE *stream);
|
||||
int err_fclose(FILE *stream);
|
||||
int err_gzclose(gzFile file);
|
||||
|
|
|
|||
Loading…
Reference in New Issue