"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libedit/hist.h" between
tnftp-20151004.tar.gz and tnftp-20200705.tar.gz

About: tnftp is an enhanced ftp client (prior name "lukemftp").

hist.h  (tnftp-20151004):hist.h  (tnftp-20200705)
/* $NetBSD: hist.h,v 1.2 2005/05/11 01:17:39 lukem Exp $ */ /* $NetBSD: hist.h,v 1.4 2020/07/04 13:43:21 lukem Exp $ */
/* from NetBSD: hist.h,v 1.10 2003/08/07 16:44:31 agc Exp */ /* from NetBSD: hist.h,v 1.23 2017/09/01 10:19:10 christos Exp */
/*- /*-
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved. * The Regents of the University of California. All rights reserved.
* *
* This code is derived from software contributed to Berkeley by * This code is derived from software contributed to Berkeley by
* Christos Zoulas of Cornell University. * Christos Zoulas of Cornell University.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
skipping to change at line 44 skipping to change at line 44
* *
* @(#)hist.h 8.1 (Berkeley) 6/4/93 * @(#)hist.h 8.1 (Berkeley) 6/4/93
*/ */
/* /*
* el.hist.c: History functions * el.hist.c: History functions
*/ */
#ifndef _h_el_hist #ifndef _h_el_hist
#define _h_el_hist #define _h_el_hist
#include "histedit.h" typedef int (*hist_fun_t)(void *, HistEventW *, int, ...);
typedef int (*hist_fun_t)(ptr_t, HistEvent *, int, ...);
typedef struct el_history_t { typedef struct el_history_t {
char *buf; /* The history buffer */ wchar_t *buf; /* The history buffer */
size_t sz; /* Size of history buffer */ size_t sz; /* Size of history buffer */
char *last; /* The last character */ wchar_t *last; /* The last character */
int eventno; /* Event we are looking for */ int eventno; /* Event we are looking for */
ptr_t ref; /* Argument for history fcns */ void *ref; /* Argument for history fcns */
hist_fun_t fun; /* Event access */ hist_fun_t fun; /* Event access */
HistEvent ev; /* Event cookie */ HistEventW ev; /* Event cookie */
} el_history_t; } el_history_t;
#define HIST_FUN(el, fn, arg) \ #define HIST_FUN_INTERNAL(el, fn, arg) \
((((*(el)->el_history.fun) ((el)->el_history.ref, &(el)->el_history.ev, \ ((((*(el)->el_history.fun) ((el)->el_history.ref, &(el)->el_history.ev, \
fn, arg)) == -1) ? NULL : (el)->el_history.ev.str) fn, arg)) == -1) ? NULL : (el)->el_history.ev.str)
#define HIST_FUN(el, fn, arg) \
#define HIST_NEXT(el) HIST_FUN(el, H_NEXT, NULL) (((el)->el_flags & NARROW_HISTORY) ? hist_convert(el, fn, arg) : \
#define HIST_FIRST(el) HIST_FUN(el, H_FIRST, NULL) HIST_FUN_INTERNAL(el, fn, arg))
#define HIST_LAST(el) HIST_FUN(el, H_LAST, NULL)
#define HIST_PREV(el) HIST_FUN(el, H_PREV, NULL) #define HIST_NEXT(el) HIST_FUN(el, H_NEXT, NULL)
#define HIST_SET(el, num) HIST_FUN(el, H_SET, num) #define HIST_FIRST(el) HIST_FUN(el, H_FIRST, NULL)
#define HIST_LOAD(el, fname) HIST_FUN(el, H_LOAD fname) #define HIST_LAST(el) HIST_FUN(el, H_LAST, NULL)
#define HIST_SAVE(el, fname) HIST_FUN(el, H_SAVE fname) #define HIST_PREV(el) HIST_FUN(el, H_PREV, NULL)
#define HIST_SET(el, num) HIST_FUN(el, H_SET, num)
protected int hist_init(EditLine *); #define HIST_LOAD(el, fname) HIST_FUN(el, H_LOAD fname)
protected void hist_end(EditLine *); #define HIST_SAVE(el, fname) HIST_FUN(el, H_SAVE fname)
protected el_action_t hist_get(EditLine *); #define HIST_SAVE_FP(el, fp) HIST_FUN(el, H_SAVE_FP, fp)
protected int hist_set(EditLine *, hist_fun_t, ptr_t); #define HIST_NSAVE_FP(el, n, fp) HIST_FUN(el, H_NSAVE_FP, n, fp)
protected int hist_command(EditLine *, int, const char **);
protected int hist_enlargebuf(EditLine *, size_t, size_t); libedit_private int hist_init(EditLine *);
libedit_private void hist_end(EditLine *);
libedit_private el_action_t hist_get(EditLine *);
libedit_private int hist_set(EditLine *, hist_fun_t, void *);
libedit_private int hist_command(EditLine *, int, const wchar_t **);
libedit_private int hist_enlargebuf(EditLine *, size_t, size_t);
libedit_private wchar_t *hist_convert(EditLine *, int, void *);
#endif /* _h_el_hist */ #endif /* _h_el_hist */
 End of changes. 7 change blocks. 
26 lines changed or deleted 30 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)