* Text display of the operator, in expressions and for
* debugging respectively.
*/
- char *text, *dbgtext;
+ const char *text, *dbgtext;
/*
* Flags dictating when the operator can be applied.
* operand, then write the operator, then the second
* operand, and finally close the paren.
*/
- char *op;
+ const char *op;
int parens, thispri, thisassoc;
/*
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#include "puzzles.h"
ctx->sparepathends[i*2] = first;
ctx->sparepathends[i*2+1] = last;
-//printf("new ends of path %d: %d,%d\n", i, first, last);
+/* printf("new ends of path %d: %d,%d\n", i, first, last); */
ctx->pathspare[i] = 2; /* fixed */
}
}
int main(void)
{
int w = 10, h = 8;
- random_state *rs = random_init("12345", 5);
+ random_state *rs = random_new("12345", 5);
int x, y, i, *grid;
for (i = 0; i < 10; i++) {
return 0;
}
#endif
-
-#ifdef TEST_GENERAL
-#include <stdarg.h>
-
-void fatal(const char *fmt, ...)
-{
- va_list ap;
-
- fprintf(stderr, "fatal error: ");
-
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
-
- fprintf(stderr, "\n");
- exit(1);
-}
-#endif
int *link;
int mains = 0;
int i, tx, ty, minmoves;
- char *ret;
+ const char *ret;
active = snewn(wh, bool);
link = snewn(wh, int);
sprintf(data, "M%d-%d", ui->drag_anchor, ui->drag_currpos);
str = dupstr(data);
} else
- str = ""; /* null move; just update the UI */
+ str = UI_UPDATE;
ui->dragging = false;
ui->drag_anchor = ui->drag_currpos = -1;