当前位置:早雪网网络学院编程文档C/C++ → C语言库函数(G类字母) - 5

C语言库函数(G类字母) - 5

减小字体 增大字体 作者:不详  来源:supcode.com收集整理  发布时间:2005-7-22 19:38:14
to halt:");
getch();
exit(1); /* terminate with an error code */
}

midx = getmaxx() / 2;
midy = getmaxy() / 2;

/* display a message */
settextjustify(CENTER_TEXT, CENTER_TEXT);
outtextxy(midx, midy, "Press any key to exit graphics mode:");

/* clean up */
getch();
closegraph();
return 0;
}

/* called by the graphics kernel to allocate memory */
void far * far _graphgetmem(unsigned size)
{
printf("_graphgetmem called to allocate %d bytes.\n", size);
printf("hit any key:");
getch();
printf("\n");

/* allocate memory from far heap */
return farmalloc(size);
}

/* called by the graphics kernel to free memory */
void far _graphfreemem(void far *ptr, unsigned size)
{
printf("_graphfreemem called to free %d bytes.\n", size);
printf("hit any key:");
getch();
printf("\n");

/* free ptr from far heap */
farfree(ptr);
}

上一页  [1] [2] 

[数据载入中...] [返回上一页] [打 印]