예제 #1
0
파일: program.c 프로젝트: Feechka/UOBP
void
endProgram (void) {
  while (programExitEntries) {
    ProgramExitEntry *pxe = programExitEntries;
    programExitEntries = pxe->next;

    pxe->handler();
    free(pxe);
  }
}
예제 #2
0
파일: program.c 프로젝트: plundblad/brltty
void
endProgram (void) {
  logMessage(LOG_DEBUG, "stopping program components");

  while (programExitEntries) {
    ProgramExitEntry *pxe = programExitEntries;
    char *name = pxe->name;

    programExitEntries = pxe->next;
    if (!name) name = "unknown";

    logMessage(LOG_DEBUG, "stopping program component: %s", name);
    pxe->handler(pxe->data);

    if (pxe->name) free(pxe->name);
    free(pxe);
  }

  logMessage(LOG_DEBUG, "stopped program components");
  popLogPrefix();
}