*
* He always creates a buffer at least READMINSZ big, possibly
* all zeros (an empty string), even if the file wasn't read. */
-static int readfile (FILE *fp, char **baddr, unsigned *bsize, unsigned *bread) {
+static int readfile (FILE *fp, char **baddr, size_t *bsize, size_t *bread) {
char chunk[4096*16];
size_t num;
static char **Insp_p; // pointers to each line start
static int Insp_nl; // total lines, total Insp_p entries
static char *Insp_buf; // the results from insp_do_file/pipe
-static unsigned Insp_bufsz; // allocated size of Insp_buf
-static unsigned Insp_bufrd; // bytes actually in Insp_buf
+static size_t Insp_bufsz; // allocated size of Insp_buf
+static size_t Insp_bufrd; // bytes actually in Insp_buf
static char *Insp_selname; // the selected label, if anybody cares
static char *Insp_selfmts; // the selected path/command, ditto
putp(Caps_off); }
// Our 'row length' macro, equivalent to a strlen() call
-#define INSP_RLEN(idx) (size_t)(Insp_p[idx +1] - Insp_p[idx] -1)
+#define INSP_RLEN(idx) (int)(Insp_p[idx +1] - Insp_p[idx] -1)
// Our 'busy' (wait please) macro
#define INSP_BUSY { INSP_MKSL(0, N_txt(YINSP_workin_txt)); \
static void insp_do_demo (char *fmts, int pid) {
(void)fmts; (void)pid;
Insp_bufsz = READMINSZ;
- Insp_buf = alloc_c(Insp_bufsz);
+ Insp_buf = alloc_c(READMINSZ);
Insp_bufrd = snprintf(Insp_buf, Insp_bufsz, "%s", N_txt(YINSP_demo04_txt));
insp_cnt_nl();
} // end: insp_do_demo
, Insp_selname
, r, l, r, ls
, c, col + 1, c, col + Screen_cols
- , Insp_bufrd);
+ , (unsigned long)Insp_bufrd);
INSP_MKSL(0, buf);
for ( ; max && row < Insp_nl; row++) {
char tline[SCREENMAX];
- size_t fr, to, len;
+ int fr, to, len;
capNO;
putp("\n");
//atic int chin (int ech, char *buf, unsigned cnt);
//atic int keyin (int init);
//atic char *linein (const char *prompt);
-//atic int readfile (FILE *fp, char **baddr, unsigned *bsize, unsigned *bread);
+//atic int readfile (FILE *fp, char **baddr, size_t *bsize, size_t *bread);
/*------ Small Utility routines ----------------------------------------*/
//atic float get_float (const char *prompt);
//atic int get_int (const char *prompt);
Norm_nlstab[YINSP_pidbad_fmt] = _("unable to inspect, pid %d not found");
Norm_nlstab[YINSP_pidsee_fmt] = _("inspect at PID [defailt pid = %d]");
Norm_nlstab[YINSP_rcfile_fmt] = _("could not parse rcfile inspect entry %d");
- Norm_nlstab[YINSP_status_fmt] = _("%s: %*d-%-*d lines, %*d-%*d columns, %u bytes read");
+ Norm_nlstab[YINSP_status_fmt] = _("%s: %*d-%-*d lines, %*d-%*d columns, %lu bytes read");
Norm_nlstab[YINSP_workin_txt] = _("patience please, working...");
}