BOOL Grafik::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult) { switch (message) { case UPDATE_NAME: change_name(); return 1; case UPDATE_REIHE: change_reihe((int) wParam, (int)lParam & FLAG_NAME, (int)lParam & FLAG_FARBE); return 1; case UPDATE_WERT: change_wert((int)wParam, (int)lParam); return 1; case UPDATE_ALL: change_all((int)lParam & FLAG_NAME, (int)lParam & FLAG_FARBE, (int)lParam & FLAG_WERT); return 1; case CLOSE_ALL: SendMessage(WM_CLOSE); return 1; default: return CDialog::OnWndMsg(message, wParam, lParam, pResult); } }
/* * Ttyflags sets the device-specific tty flags, based on the contents * of /etc/ttys. It can either set all of the ttys' flags, or set * the flags of the ttys specified on the command line. */ int main(int argc, char *argv[]) { int aflag, ch, rval; aflag = nflag = vflag = 0; while ((ch = getopt(argc, argv, "anv")) != -1) switch (ch) { case 'a': aflag = 1; break; case 'n': /* undocumented */ nflag = 1; break; case 'v': vflag = 1; break; case '?': default: usage(); } argc -= optind; argv += optind; if (aflag && argc != 0) usage(); rval = 0; if (setttyent() == 0) err(1, "setttyent"); if (aflag) rval = change_all(); else rval = change_ttys(argv); if (endttyent() == 0) warn("endttyent"); exit(rval); }