/* * Top level; * we get control from the desktop. */ main() { pnf = 0; /* set the flag to it isn't partition yet */ appl_init(); phys_handle=graf_handle(&gl_wchar, &gl_hchar, &gl_wbox, &gl_hbox); wind_get(0, WF_WORKXYWH, &xdesk, &ydesk, &wdesk, &hdesk); open_vwork(); wi_handle=wind_create(0x0040&0x0080, xdesk, ydesk, wdesk, hdesk); hidden = FALSE; butdown = TRUE; /* doing a checking see if the cache in the system */ cachexst = (char) chkcache(); rsrc_load(RESOURCEFILE); /* Get all addresses of dialogues from resource file */ getalladdr(); needscan = TRUE; if (domulti() != 11) reboot(); wind_delete(wi_handle); v_clsvwk(handle); appl_exit(); }
/* * Top level; * we get control from the desktop. */ main() { pnf = 0; /* set the flag to it isn't partition yet */ appl_init(); phys_handle=graf_handle(&gl_wchar, &gl_hchar, &gl_wbox, &gl_hbox); wind_get(0, WF_WORKXYWH, &xdesk, &ydesk, &wdesk, &hdesk); open_vwork(); wi_handle=wind_create(0x0040&0x0080, xdesk, ydesk, wdesk, hdesk); hidden = FALSE; butdown = TRUE; /* doing a checking see if the cache in the system */ cachexst = (char) chkcache(); /* check the existence of the BLiTTER */ blitxst = chkblit(); if (!rsrc_load(RESOURCEFILE)) { errs("[2][|", RESOURCEFILE, "][ EXIT ]"); goto punt; } /* Get all addresses of dialogues from resource file */ if (getalladdr() != OK) { errs("[2][|", RESOURCEFILE, "][ EXIT ]"); goto punt; } needscan = TRUE; redomul: ARROW_MOUSE; /* display menu bar */ menu_bar(menuobj, 1); running = TRUE; while (running) { domulti(); } /* * If nothing has been done to the hard disks * then just get out, back to the desktop. * Otherwise reboot the system. */ menu_bar(menuobj, 0); /* erase menu bar */ punt: wind_delete(wi_handle); v_clsvwk(handle); appl_exit(); }
/* * Top level; * we get control from the desktop. * */ main() { long *cookptr; /* pointer to AHDI cookie */ running = TRUE; appl_init(); phys_handle = graf_handle(&gl_wchar, &gl_hchar, &gl_wbox, &gl_hbox); wind_get(0, WF_WORKXYWH, &xdesk, &ydesk, &wdesk, &hdesk); open_vwork(); wi_handle = wind_create(WI_KIND, xdesk, ydesk, wdesk, hdesk); hidden = FALSE; butdown = TRUE; if (!rsrc_load(RESOURCEFILE)) { errs("[2][", RESOURCEFILE, "][ OK ]"); goto punt; } graf_mouse(ARROW, 0L); /* display menu bar */ if (getalladdr() == ERROR) { errs("[2][", RESOURCEFILE, "][ OK ]"); goto punt; } ostack = Super(NULL); /* Superuser mode for low memory access */ pun = (int *)(*(long *)PUNPTR); Super(ostack); /* back to User mode */ if (!pun || !(*pun)) { /* if no unit exists */ err(noavdrv); /* return error */ goto punt; } cookptr = (long *)((char *)pun + 2 + 16 + 16*4); if (*cookptr != AHDI || cookptr != *(long *)(cookptr + 1)) vernum = 0L; else vernum = (int *)(cookptr + 2); menu_bar(menubar, 1); /* put up menu bar */ while (running) domulti(); menu_bar(menubar, 0); /* erase menu bar */ punt: wind_delete(wi_handle); /* close window on screen */ v_clsvwk(handle); /* close virtual workstation */ appl_exit(); /* exit application HDX */ Pterm(0); /* terminate process */ }
static status_t control_hook (void* cookie, uint32 op, void* arg, size_t len) { dp83815_properties_t *data = (dp83815_properties_t *)cookie; TRACE(( kDevName " control_hook()\n" )); switch ( op ) { case ETHER_INIT: TRACE(( kDevName " control_hook(): Wants us to init... ;-)\n" )); return B_NO_ERROR; case ETHER_GETADDR: if ( data == NULL ) return B_ERROR; TRACE(( kDevName " control_hook(): Wants our address...\n" )); memcpy( arg , (void *) &(data->address) , sizeof( ether_address_t ) ); return B_OK; case ETHER_ADDMULTI: return domulti(data, (unsigned char *)arg); case ETHER_NONBLOCK: if ( data == NULL ) return B_ERROR; TRACE(( kDevName " control_hook(): Wants to set block/nonblock\n" )); if (*((int32 *)arg)) data->blockFlag = B_RELATIVE_TIMEOUT; else data->blockFlag = 0; return B_NO_ERROR; case ETHER_REMMULTI: TRACE(( kDevName " control_hook(): Wants REMMULTI\n" )); return B_OK; case ETHER_SETPROMISC: TRACE(( kDevName " control_hook(): Wants PROMISC\n" )); return B_OK; case ETHER_GETFRAMESIZE: TRACE(( kDevName " control_hook(): Wants GETFRAMESIZE\n" )); *( (unsigned int *)arg ) = 1514; return B_OK; } return B_BAD_VALUE; }
/* * Top level; * we get control from the desktop. */ main() { pnf = 0; /* set the flag to it isn't partition yet */ appl_init(); phys_handle=graf_handle(&gl_wchar, &gl_hchar, &gl_wbox, &gl_hbox); wind_get(0, WF_WORKXYWH, &xdesk, &ydesk, &wdesk, &hdesk); open_vwork(); wi_handle=wind_create(0x0040&0x0080, xdesk, ydesk, wdesk, hdesk); hidden = FALSE; butdown = TRUE; /* doing a checking see if the cache in the system */ cachexst = (char) chkcache(); if (!rsrc_load(RESOURCEFILE)) { errs("[2][|", RESOURCEFILE, "][ EXIT ]"); goto punt; } /* Get all addresses of dialogues from resource file */ if (getalladdr() != OK) { errs("[2][|", RESOURCEFILE, "][ EXIT ]"); goto punt; } /* * Get maximum partition size from * wincap "@@" entry. */ /* if (wgetent("Parameters", "@@") == OK) { if (wgetnum("ms", &mxpsiz) != OK) mxpsiz = MAXPSIZ; } else { goto punt; } */ needscan = TRUE; redomul: ARROW_MOUSE; /* display menu bar */ menu_bar(menuobj, 1); running = TRUE; while (running) { domulti(); } /* * If nothing has been done to the hard disks * then just get out, back to the desktop. * Otherwise reboot the system. */ menu_bar(menuobj, 0); /* erase menu bar */ punt: /* * If we have to reboot, * tell the user and then do it. * */ if (rebootp) { if (form_alert(2, autoboot) == 1) { reboot(); } else { goto redomul; } } wind_delete(wi_handle); v_clsvwk(handle); appl_exit(); }