*/
#include <stdio.h>
-#include "selfile.h"
#include "xstat.h"
+#include "selfile.h"
#include <X11/StringDefs.h>
#include <X11/Xaw/Scrollbar.h>
#include <X11/Xaw/Cardinals.h>
#endif
#define ABS(x) (((x) < 0) ? (-(x)) : (x))
-/* added missing prototypes */
-extern char SFstatChar(struct stat*);
-extern int SFchdir(char *);
-void SFvSliderMovedCallback(Widget, int, int);
-
typedef struct {
char *fontname;
} TextData, *textPtr;
dir = &(SFdirs[SFdirPtr + n]);
+
old = dir->vOrigin;
+ if(new == -1) new = old + 1; else if(new == -2) new = old - 1; // [HGM] indicates scroll direction on mousewheel event
+ if(new < 0 || new > dir->nEntries - SFlistSize) return;
dir->vOrigin = new;
if (old == new) {