summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--client.c2
-rw-r--r--image.c4
-rw-r--r--server.c4
-rw-r--r--torus.h4
4 files changed, 9 insertions, 5 deletions
diff --git a/client.c b/client.c
index 32c2022..af2f985 100644
--- a/client.c
+++ b/client.c
@@ -679,7 +679,7 @@ static void readInput(void) {
 }
 
 int main(int argc, char *argv[]) {
-	const char *sockPath = "torus.sock";
+	const char *sockPath = DefaultSockPath;
 	int opt;
 	while (0 < (opt = getopt(argc, argv, "hs:"))) {
 		switch (opt) {
diff --git a/image.c b/image.c
index 38cd7cd..d8fcbc7 100644
--- a/image.c
+++ b/image.c
@@ -256,8 +256,8 @@ next:
 
 int main(int argc, char *argv[]) {
 	bool kcgi = false;
-	const char *fontPath = "default8x16.psfu";
-	const char *dataPath = "torus.dat";
+	const char *fontPath = DefaultFontPath;
+	const char *dataPath = DefaultDataPath;
 	uint32_t tileX = TileInitX;
 	uint32_t tileY = TileInitY;
 
diff --git a/server.c b/server.c
index b01e81d..9d1fe16 100644
--- a/server.c
+++ b/server.c
@@ -372,8 +372,8 @@ static bool clientTele(struct Client *client, uint8_t port) {
 int main(int argc, char *argv[]) {
 	int error;
 
-	const char *dataPath = "torus.dat";
-	const char *sockPath = "torus.sock";
+	const char *dataPath = DefaultDataPath;
+	const char *sockPath = DefaultSockPath;
 	const char *pidPath = NULL;
 	int opt;
 	while (0 < (opt = getopt(argc, argv, "d:p:s:"))) {
diff --git a/torus.h b/torus.h
index b9d842f..d5accf5 100644
--- a/torus.h
+++ b/torus.h
@@ -25,6 +25,10 @@
 
 #define ARRAY_LEN(a) (sizeof(a) / sizeof((a)[0]))
 
+static const char DefaultDataPath[] = "torus.dat";
+static const char DefaultSockPath[] = "torus.sock";
+static const char DefaultFontPath[] = "default8x16.psfu";
+
 enum {
 	ColorBlack,
 	ColorRed,
='n213' href='#n213'>213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376