Random fixes

This commit is contained in:
Alexander S. Aganichev
2002-11-09 21:08:34 +00:00
parent a39960cd13
commit 428385bc1e
14 changed files with 102 additions and 30 deletions

View File

@@ -369,7 +369,7 @@ int wmove (int nsrow, int nscol);
int wopen (int srow, int scol, int erow, int ecol, int btype, int battr, int wattr, int sbattr=-1, int loattr=-1);
inline int wopen_ (int srow, int scol, int vlen, int hlen, int btype, int battr, int wattr, int sbattr=-1, int loattr=-1) { return wopen(srow, scol, srow+vlen-1, scol+hlen-1, btype, battr, wattr, sbattr, loattr); }
int wperror (const char* message);
bool wpickfile (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, VfvCP open, bool casesens=false);
bool wpickfile (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, IfcpCP open, bool casesens=false);
int wpickstr (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, char* strarr[], int initelem, VfvCP open);
int wprintc (int wrow, int wcol, int attr, vchar ch);
int wprintf (const char* format, ...) __attribute__ ((format (printf, 1, 2)));

View File

@@ -42,7 +42,7 @@
// ------------------------------------------------------------------
static bool path_in_title, case_sensitive;
static VfvCP open_function = NULL;
static IfcpCP open_function = NULL;
static char* cwdp;
static char* tcwdp;
static char* namextp;
@@ -81,18 +81,22 @@ static int compare(const char** str1, const char** str2) {
static void disp_title() {
if(path_in_title) {
char buf[sizeof(Path)+2];
char buf[sizeof(Path)+2];
if(path_in_title or open_function) {
strcpy(buf, " ");
PathCopy(buf+1, cwdp);
strcat(buf, namextp);
strcat(buf, " ");
}
if(path_in_title) {
wtitle(buf, TCENTER, gwin.active->battr);
}
if(open_function)
(*open_function)();
if(open_function) {
(*open_function)(buf);
}
}
@@ -118,7 +122,7 @@ static void pre_exit(char** p, int numelems) {
// ------------------------------------------------------------------
bool wpickfile(int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, VfvCP open, bool casesens) {
bool wpickfile(int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, IfcpCP open, bool casesens) {
Path cwd, dir, namext, tcwd, path, spec;