示例#1
0
void device::close_file(int device, int secondary_address)
{
    DMSG("> iec_close_file");
    listen( device );
    close_cmd( secondary_address );
    unlisten();
    DMSG("< iec_close_file");
}
void write_cmd(char *cmds)
{
	FILE *f = fopen(CLIPSIN, "w");
	if (!f) {
		fprintf(stderr, "Cannot open CLIPS input");
		exit(EXIT_FAILURE);
	}

	cmds = close_cmd(cmds);

	fprintf(f, "%s", cmds);
	fclose(f);
	free(cmds);
}
示例#3
0
static int quit_cmd(char* args) {
	close_cmd(args);
	done = 1;
	return 0;
}