Beispiel #1
0
t_instr_info    *instr_info_get_list_2(t_instr_info *list)
{
  init_zjmp(list++);
  init_ldi(list++);
  init_sti(list++);
  init_fork(list++);
  return (list);
}
Beispiel #2
0
/**
Prints a string to a window.

Draws the custom interface.

@param win The window to print to.
@param str The string to print.
@param n The length of the string.
@return OK if successful and ERR otherwise.
**/
int OVERLOAD(waddnstr)(WINDOW * const win, const char * const str, const int n) {
	if (options.progress == PRINTF) {
		options.progress = WADDNSTR;
		if (gui_init() == -1) {
			uninit(FALSE);
			exit(probno);
		}
		if (init_fork() == -1) {
			uninit(FALSE);
			exit(probno);
		}
	}

	char * const buf = astresc(str);
	if (buf == NULL) {
		probno = log_error(MALLOC_PROBLEM);
		uninit(FALSE);
		exit(probno);
	}
	log_call("waddnstr(" PTRF ", \"%s\", %d).", PTRS(win), buf, n);
	free(buf);

	return orig_waddnstr(win, str, n);
}