"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/editor.h" between
bed-3.0.3.src.tar.xz and bed-3.1.0.src.tar.xz

About: bed is an adjustable data format binary editor.

editor.h  (bed-3.0.3.src.tar.xz):editor.h  (bed-3.1.0.src.tar.xz)
skipping to change at line 20 skipping to change at line 20
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */ /* GNU General Public License for more details. */
/* */ /* */
/* You should have received a copy of the GNU General Public License */ /* You should have received a copy of the GNU General Public License */
/* along with this program; if not, write to the Free Software */ /* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Fri Dec 8 22:14:27 2000 */ /* Fri Dec 8 22:14:27 2000 */
#ifndef EDITOR_H #ifndef EDITOR_H
#define EDITOR_H #define EDITOR_H
#include <vector>
#include <features.h> #include <features.h>
#ifdef USE_HYPERSCAN #ifdef USE_HYPERSCAN
#include <hs/hs.h> #include <hs/hs.h>
#endif #endif
#define HAS_BOOL #define HAS_BOOL
#ifndef NOSCREEN #ifndef NOSCREEN
#include "screen.h" #include "screen.h"
#endif #endif
#ifdef USETHREADS #ifdef USETHREADS
#define __GNU_VISIBLE 1 #define __GNU_VISIBLE 1
skipping to change at line 49 skipping to change at line 50
#include "win.h" #include "win.h"
#endif #endif
*/ */
#define GeenEditor #define GeenEditor
#define MAXANT 256 #define MAXANT 256
#include "maxmenus.h" #include "maxmenus.h"
#define STARTMAXUNDO 5000 #define STARTMAXUNDO 5000
#include "viewbuf.h" #include "viewbuf.h"
struct undo { struct undo {
OFFTYPE pos; OFFTYPE pos;
OFFTYPE usedondisk;
unsigned char *str; unsigned char *str;
int len; int len;
}; };
typedef int ChTrans(const int ch); typedef int ChTrans(const int ch);
template <ChTrans givelow> template <ChTrans givelow>
inline int unequal(const void *onev,const void *twov,size_t len) { inline int unequal(const void *onev,const void *twov,size_t len) {
const char * one=static_cast<const char *>(onev); const char * one=static_cast<const char *>(onev);
const char * two=static_cast<const char *>(twov); const char * two=static_cast<const char *>(twov);
for(size_t i=0;i<len;i++) for(size_t i=0;i<len;i++)
skipping to change at line 358 skipping to change at line 360
struct undo *undobuf; struct undo *undobuf;
int lastundo,redos,beginundo,undohalf; int lastundo,redos,beginundo,undohalf;
void initundo(void) ; void initundo(void) ;
void delundo(void) ; void delundo(void) ;
inline unsigned char *expandchunk(unsigned char *ptr,int len,int oldlen) { inline unsigned char *expandchunk(unsigned char *ptr,int len,int oldlen) {
return myrealloc(unsigned char *,ptr,unsigned char,len,oldlen); return myrealloc(unsigned char *,ptr,unsigned char,len,oldlen);
} }
inline struct undo * GeenEditor getnextundo(void) ; inline struct undo * GeenEditor getnextundo(void) ;
int GeenEditor popundo(unsigned char **buf,OFFTYPE *pos) ; //int GeenEditor popundo(unsigned char **buf,OFFTYPE *pos) ;
int popundo(unsigned char **buf,OFFTYPE *pos,OFFTYPE *diskused) ;
int undoone(void) ; int undoone(void) ;
int GeenEditor strtoundoer(OFFTYPE pos,int size) ; int GeenEditor strtoundoer(OFFTYPE pos,int size) ;
int GeenEditor strtoundo(OFFTYPE pos,int size) ; int GeenEditor strtoundo(OFFTYPE pos,int size) ;
int GeenEditor addundo(OFFTYPE pos,unsigned char ch) ; int GeenEditor addundo(OFFTYPE pos,unsigned char ch) ;
int GeenEditor undopos(void) ; int GeenEditor undopos(void) ;
int inundo(OFFTYPE pos,unsigned char *buf,int size) ; int inundo(OFFTYPE pos,unsigned char *buf,int size) ;
int GeenEditor appendstrtoundo(OFFTYPE pos,char *str, int size) ; int GeenEditor appendstrtoundo(OFFTYPE pos,char *str, int size) ;
int GeenEditor appendtoundo(OFFTYPE pos, int size) ; int GeenEditor appendtoundo(OFFTYPE pos, int size) ;
int GeenEditor extendtoundo(OFFTYPE oldsize); int GeenEditor extendtoundo(OFFTYPE oldsize);
skipping to change at line 443 skipping to change at line 447
bool searchdontedit(void) ; bool searchdontedit(void) ;
int askmenufile(void) ; int askmenufile(void) ;
inline int switchcursor(void) ; inline int switchcursor(void) ;
int nextfast(void) ; int nextfast(void) ;
int save(void); int save(void);
int GeenEditor saveaser(const char *ant) ; int GeenEditor saveaser(const char *ant) ;
int extendfile(int len) ; // int extendfile(int len) ;
int extendfile(OFFTYPE len) ;
int GeenEditor toscreen(void) ; int GeenEditor toscreen(void) ;
OFFTYPE GeenEditor getmem(OFFTYPE pos,char *buf,OFFTYPE len); OFFTYPE GeenEditor getmem(OFFTYPE pos,char *buf,OFFTYPE len);
OFFTYPE GeenEditor putmem(OFFTYPE pos,char *buf,OFFTYPE len); OFFTYPE GeenEditor putmem(OFFTYPE pos,char *buf,OFFTYPE len);
short searchbytes,searchgrens,indatatype; short searchbytes,searchgrens,indatatype;
FILEHANDLE openfile(const char *ant) ; FILEHANDLE openfile(const char *ant) ;
skipping to change at line 533 skipping to change at line 538
void filesup(void); void filesup(void);
// long digfrom(char *ant); to OFFTYPE?? // long digfrom(char *ant); to OFFTYPE??
//s/maxedit/screenmax/g //s/maxedit/screenmax/g
inline int screenmax(void) { return ((nrx)*(nry));} inline int screenmax(void) { return ((nrx)*(nry));}
int screensize(void); int screensize(void);
void memorize(void); void memorize(void);
// long selects[2]; // long selects[2];
static OFFTYPE lensel;
static int lensel,seloffset; static int seloffset;
static char *selbuf; static char *selbuf;
OFFTYPE selectpos; OFFTYPE selectpos;
int el; int el;
int GeenEditor selected(OFFTYPE pos) ; int GeenEditor selected(OFFTYPE pos) ;
OFFTYPE GeenEditor getselregion(OFFTYPE *start) ; OFFTYPE GeenEditor getselregion(OFFTYPE *start) ;
//int GeenEditor setmark(unsigned char *keys,int nr,OFFTYPE pos) ; //int GeenEditor setmark(unsigned char *keys,int nr,OFFTYPE pos) ;
int setmark(unsigned char *keys,int nr,OFFTYPE pos,uint32_t len) ; int setmark(unsigned char *keys,int nr,OFFTYPE pos,uint32_t len) ;
int addmark(OFFTYPE pos,int len) ; int addmark(OFFTYPE pos,int len) ;
int mkstandout(const OFFTYPE pos,const int len) ; int mkstandout(const OFFTYPE pos,const int len) ;
int rmmarkpos(OFFTYPE pos) ; int rmmarkpos(OFFTYPE pos) ;
keylookup *marksptr; keylookup * const marksptr=new keylookup;
template <int vers> struct keylookup::mark * markselect(const char *prompt) ; template <int vers> struct keylookup::mark * markselect(const char *prompt) ;
template <int typ> int showmarks(void) ; template <int typ> int showmarks(void) ;
//struct keylookup::mark * markselectwhole(const char *prompt) ; //struct keylookup::mark * markselectwhole(const char *prompt) ;
//struct keylookup::mark *markselectinc(const char *prompt) ; //struct keylookup::mark *markselectinc(const char *prompt) ;
/* /*
inline int defaultmark(void) { inline int defaultmark(void) {
marksptr->defaultmark(editpos+filepos); marksptr->defaultmark(editpos+filepos);
skipping to change at line 629 skipping to change at line 634
OFFTYPE GeenEditor putpart(OFFTYPE begin, OFFTYPE len, char * buf); OFFTYPE GeenEditor putpart(OFFTYPE begin, OFFTYPE len, char * buf);
OFFTYPE filesize(void); OFFTYPE filesize(void);
void erefresh(void); void erefresh(void);
static int (Editor::*ineditproc[])(void); static int (Editor::*ineditproc[])(void);
static int (Editor::*inmenuproc[])(void); static int (Editor::*inmenuproc[])(void);
int GeenEditor therepeat(int nr) ; int GeenEditor therepeat(int nr) ;
char * GeenEditor getfilename(char *buf); char * GeenEditor getfilename(char *buf);
int GeenEditor getselbuf(char **buf) ; OFFTYPE GeenEditor getselbuf(char **buf) ;
int GeenEditor putselbuf(char *buf,int len) ; int GeenEditor putselbuf(char *buf,int len) ;
OFFTYPE GeenEditor getselect(void) ; OFFTYPE GeenEditor getselect(void) ;
OFFTYPE GeenEditor setselect(OFFTYPE pos) ; OFFTYPE GeenEditor setselect(OFFTYPE pos) ;
OFFTYPE GeenEditor posputbuf(OFFTYPE pos,char *buf,OFFTYPE len); OFFTYPE GeenEditor posputbuf(OFFTYPE pos,char *buf,OFFTYPE len);
OFFTYPE GeenEditor putbuf(char *buf,OFFTYPE buflen); OFFTYPE GeenEditor putbuf(char *buf,OFFTYPE buflen);
void GeenEditor splitpos(OFFTYPE pos) ; void GeenEditor splitpos(OFFTYPE pos) ;
skipping to change at line 748 skipping to change at line 753
message("hyperhit: Unable to scan input buffer"); message("hyperhit: Unable to scan input buffer");
return -1; return -1;
} }
if(*offset>0) if(*offset>0)
return len; return len;
else else
return -1; return -1;
} }
//int hyperhit(const char *buf,const int len,int *) ; //int hyperhit(const char *buf,const int len,int *) ;
#endif #endif
std::vector<ScreenPart *> progenitors(void) ;
private: private:
// pos=(mem.lastforward&1)?(edge?0:filep os+editpos+1): (edge?(mem.size()-1):(filepos+editpos-1)); // pos=(mem.lastforward&1)?(edge?0:filep os+editpos+1): (edge?(mem.size()-1):(filepos+editpos-1));
//#define edge mem.Stype.Edge //#define edge mem.Stype.Edge
OFFTYPE searchstartpos(); OFFTYPE searchstartpos();
int ismessage; int ismessage;
int GeenEditor showmessage(void) ; int GeenEditor showmessage(void) ;
int GeenEditor realoutput(const char info[]) ; int GeenEditor realoutput(const char info[]) ;
OFFTYPE *previouspos; OFFTYPE *previouspos;
int previouspositer, previousposhead; int previouspositer, previousposhead;
public: public:
 End of changes. 8 change blocks. 
6 lines changed or deleted 12 lines changed or added

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