if HAVE_TINFO
more_LDADD = $(LDADD) -ltinfo
-pg_LDADD = $(LDADD) -ltinfo @NCURSES_LIBS@
+pg_LDADD = $(LDADD) libcommon.la -ltinfo @NCURSES_LIBS@
ul_LDADD = $(LDADD) -ltinfo
else
more_LDADD = $(LDADD) @NCURSES_LIBS@
-pg_LDADD = $(LDADD) @NCURSES_LIBS@
+pg_LDADD = $(LDADD) libcommon.la @NCURSES_LIBS@
ul_LDADD = $(LDADD) @NCURSES_LIBS@
endif
#include "widechar.h"
#include "all-io.h"
#include "closestream.h"
+#include "strutils.h"
#define READBUF LINE_MAX /* size of input buffer */
#define CMDBUF 255 /* size of command buffer */
goto endargs;
case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9': case '0':
- pagelen = atoi(argv[arg] + i);
+ pagelen = strtol_or_err(argv[arg] + 1,
+ _("failed to parse number of lines per page"));
havepagelen = 1;
goto nextarg;
case 'c':
/*NOTREACHED*/
case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9': case '0':
- startline = atoi(argv[arg] + 1);
+ startline = strtol_or_err(argv[arg] + 1,
+ _("failed to parse number of lines per page"));
break;
case '/':
searchfor = argv[arg] + 2;