MCPcopy Create free account
hub / github.com/NetHack/NetHack / gamelog_add

Function gamelog_add

src/pline.c:494–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492#ifdef CHRONICLE
493
494void
495gamelog_add(long glflags, long gltime, const char *str)
496{
497 struct gamelog_line *tmp;
498 struct gamelog_line *lst = gg.gamelog;
499
500 tmp = (struct gamelog_line *) alloc(sizeof (struct gamelog_line));
501 tmp->turn = gltime;
502 tmp->flags = glflags;
503 tmp->text = dupstr(str);
504 tmp->next = NULL;
505 while (lst && lst->next)
506 lst = lst->next;
507 if (!lst)
508 gg.gamelog = tmp;
509 else
510 lst->next = tmp;
511}
512
513void
514livelog_printf(long ll_type, const char *line, ...)

Callers 2

livelog_printfFunction · 0.85
restore_gamelogFunction · 0.85

Calls 2

dupstrFunction · 0.85
allocFunction · 0.70

Tested by

no test coverage detected