{
dst[ count-1 ] = '\0'; // make sure incomplete copy still null-terminated
if(appData.debugMode)
- fprintf(debugFP, "safeStrCpy: copying %s into %s didn't work, not enough space %d\n",src,dst,count);
+ fprintf(debugFP, "safeStrCpy: copying %s into %s didn't work, not enough space %d\n",src,dst, (int)count);
}
return dst;
XtSetArg(arglist[i], XtNstring, filter); i++;
XtSetValues(filterField, arglist, i);
- safeStrCpy(SFfilterBuffer, filter, MAXPATHLEN);
- safeStrCpy(SFlastPath, SFtextBuffer, MAXPATHLEN); // remember for cancel
+ strncpy(SFfilterBuffer, filter, MAXPATHLEN-1);
+ strncpy(SFlastPath, SFtextBuffer, MAXPATHLEN-1); // remember for cancel
SFpositionWidget(selFile);
XtMapWidget(selFile);
if(gameInfo.variant == VariantShogi)
piece = (ChessSquare) ( SHOGI piece );
- switch (piece) {
+ switch ((int)piece) {
/* case EmptySquare: [HGM] this is nonsense, and conflicts with Shogi cases */
default:
/* can't happen ([HGM] except for faries...) */
int preyStackPointer, chaseStackPointer;
struct {
-char rf, ff, rt, ft;
+unsigned char rf, ff, rt, ft;
} chaseStack[100];
struct {
-char rank, file;
+unsigned char rank, file;
} preyStack[100];
String *params;
Cardinal *num_params;
{
- String whichMenu; int menuNr;
+ String whichMenu; int menuNr = -2;
shiftKey = strcmp(params[0], "menuW"); // used to indicate black
if (event->type == ButtonRelease)
menuNr = RightClick(Release, event->xbutton.x, event->xbutton.y, &pmFromX, &pmFromY);
typedef int (*FileProc) P((FILE *f, int n, char *title));
int PopDown P((int n));
-int InpuBoxPopUp P((void));
+void InputBoxPopup P((void));
void CatchDeleteWindow(Widget w, String procname);
void PlaySound P((char *name));
void ParseIcsTextColors P((void));
if(GameListPrepare()) GameListReplace(); // crashes on empty list...
return;
}
+#if 0
index = atoi(glc->strings[index])-1; // [HGM] filter: read true index from sequence nr of line
if (cmailMsgLoaded) {
CmailLoadGame(glc->fp, index + 1, glc->filename, True);
} else {
LoadGame(glc->fp, index + 1, glc->filename, True);
}
+#else
+ printf("This code should have been unreachable. Please report bug!\n");
+#endif
}
void