📄 helloworld.c
字号:
#include <phigs.h> /* get HP-PHIGS definitions for C */#include <stdio.h> /* get standard I/O definitions */main() /* file "HelloWorld.c" */{ Pint WorkstnID = 1; /* workstation identifier */ Pint ConnID; /* connection identifier */ Pint WorkstnType = POIDDX; /* out/in, direct, dbl bfr, Xwindow */ Pint StructureID = 1; /* structure ID (chosen by user) */ Pint ChoiceStatus, ChoiceNum;/* choice status and value */ static Ppoint3 AreaPoints[4] = { /* points for fill area */ {0.25, 0.25, 0.0}, {0.75, 0.25, 0.0}, {0.75, 0.75, 0.0}, {0.25, 0.75, 0.0}}; static Ppoint_list3 AreaData = {4, AreaPoints}; Ppoint TextLoc; /* where does the text go? */ popen_phigs((char *) stderr, 0); /* errors go to "stderr" */ pescape_u4("/dev/screen/phigs_window", &ConnID); popen_ws(WorkstnID, (void *) ConnID, WorkstnType); /*---- define the structure ---------------------------------------------*/ popen_struct(StructureID); pset_int_style(PSTYLE_HOLLOW); pfill_area3(&AreaData); pset_char_ht(0.04); TextLoc.x = 0.3, TextLoc.y = 0.5; ptext(&TextLoc, "Hello World"); pclose_struct(); /*---- display the structure --------------------------------------------*/ ppost_struct(WorkstnID, StructureID, 1.0); pupd_ws(WorkstnID, PFLAG_PERFORM); /*pset_choice_mode(WorkstnID, 2, POP_REQ, PSWITCH_NO_ECHO); preq_choice(WorkstnID, 2, &ChoiceStatus, &ChoiceNum);*/ pupd_ws(WorkstnID, PFLAG_PERFORM); pclose_ws(WorkstnID); pclose_phigs();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -