/*ARGSUSED*/ void REGALWRATH_GLU_CALL glu_wrath_gl_noBeginData( WRATH_GLUenum type, int winding_number, void *polygonData ) { IGNORE(polygonData); IGNORE(type); IGNORE(winding_number); }
void delete_qso(void) { int x; struct stat statbuf; int lfile; char logline[100]; char call[15], bandmode[6]; mvprintw(13, 29, "OK to delete last qso (y/n)?"); x = key_get(); if ((x == 'y') || (x == 'Y')) { if ((lfile = open(logfile, O_RDWR)) < 0) { TLF_LOG_WARN("I can not find the logfile..."); } else { fstat(lfile, &statbuf); if (statbuf.st_size >= LOGLINELEN) { if (qtcdirection > 0) { // read band, mode and call from last QSO line lseek(lfile, ((int)statbuf.st_size - LOGLINELEN), SEEK_SET); IGNORE(read(lfile, logline, LOGLINELEN - 1));; g_strlcpy(bandmode, logline, 6); g_strlcpy(call, logline + 29, 15); g_strchomp(call); // delete QTC's for that combination of band, mode and call delete_last_qtcs(call, bandmode); } IGNORE(ftruncate(lfile, statbuf.st_size - LOGLINELEN)); } fsync(lfile); close(lfile); if (qsos[nr_qsos][0] != ';') { band_score[bandinx]--; qsonum--; qsonr_to_str(); } nr_qsos--; qsos[nr_qsos][0] = '\0'; } scroll_log(); } attron(COLOR_PAIR(C_LOG) | A_STANDOUT); mvprintw(13, 29, " "); printcall(); clear_display(); }
static int ctrl_semihosting_getthumbswi(p_Buffer * buffer, void *stateptr) { #ifdef ICEMAN2 /* Reads the value of the semi-hosting vector. */ int debugID, OSinfo1, OSinfo2, subreason; word semihosting_thumbswi, status; IGNORE(stateptr); unpack_message(BUFFERDATA(*buffer) + 4, "%w%w%w%w", &debugID, &OSinfo1, &OSinfo2, &subreason); status = angelOS_SemiHosting_GetThumbSWI(OSinfo1, OSinfo2, &semihosting_thumbswi); LogInfo(LOG_CTRL, ("ctrl_semihosting_getthumbswi -> %08x\n", semihosting_thumbswi)); return msgsend(CI_HADP, "%w%w%w%w%w%w%w", (ADP_Control | TtoH), debugID, OSinfo1, OSinfo2, ADP_Ctrl_SemiHosting_GetThumbSWI, status, semihosting_thumbswi); #else IGNORE(buffer); IGNORE(stateptr); LogInfo(LOG_CTRL, ( "ctrl_semihosting_getthumbswi - unsupported\n")); return -1; #endif }
static int ctrl_settopmem(p_Buffer * buffer, void *stateptr) { #ifdef ICEMAN2 /* Set the top of memory we report on a HEAPINFO SWI */ int debugID, OSinfo1, OSinfo2, subreason; word topmem; IGNORE(stateptr); unpack_message(BUFFERDATA(*buffer) + 4, "%w%w%w%w%w", &debugID, &OSinfo1, &OSinfo2, &subreason, &topmem); LogInfo(LOG_CTRL, ( "ctrl_settopmem(topmem = 0x%x)\n", topmem)); angel_SetTopMem((unsigned)topmem); return msgsend(CI_HADP, "%w%w%w%w%w%w", (ADP_Control | TtoH), debugID, OSinfo1, OSinfo2, ADP_Ctrl_SetTopMem, RDIError_NoError); #else IGNORE(buffer); IGNORE(stateptr); return -1; #endif }
/*ARGSUSED*/ void REGALFASTUIDRAW_GLU_CALL glu_fastuidraw_gl_noBeginData( FASTUIDRAW_GLUenum type, int winding_number, void *polygonData ) { IGNORE(polygonData); IGNORE(type); IGNORE(winding_number); }
/* Callbacks for the write function. */ static enum status test_bad_write(void * param, const void * src, size_t len) { IGNORE(param); IGNORE(src); IGNORE(len); return status_err; }
static int ctrl_semihosting_setarmswi(p_Buffer * buffer, void *stateptr) { #ifdef ICEMAN2 /* Set the semi-hosting ARM SWI. */ int debugID, OSinfo1, OSinfo2, subreason; word semihosting_armswi, status; IGNORE(stateptr); unpack_message(BUFFERDATA(*buffer) + 4, "%w%w%w%w%w", &debugID, &OSinfo1, &OSinfo2, &subreason, &semihosting_armswi); LogInfo(LOG_CTRL, ( "ctrl_semihosting_setarmswi(swi 0x%x)\n", semihosting_armswi)); status = angelOS_SemiHosting_SetARMSWI(OSinfo1, OSinfo2, semihosting_armswi); return msgsend(CI_HADP, "%w%w%w%w%w%w", (ADP_Control | TtoH), debugID, OSinfo1, OSinfo2, ADP_Ctrl_SemiHosting_SetARMSWI, status); #else IGNORE(buffer); IGNORE(stateptr); LogInfo(LOG_CTRL, ( "ctrl_semihosting_setarmswi -> unsupported\n")); return -1; #endif }
static void fbdev_lcd_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr adjusted_mode, int x, int y) { IGNORE( crtc ); IGNORE( mode ); IGNORE( adjusted_mode ); IGNORE( x ); IGNORE( y ); }
/*ARGSUSED*/ static void REGALWRATH_GLU_CALL noCombine( double coords[3], void *data[4], float weight[4], void **dataOut ) { IGNORE(coords); IGNORE(data); IGNORE(weight); IGNORE(dataOut); }
static Bool fbdev_lcd_crtc_mode_fixup(xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr adjusted_mode) { IGNORE( crtc ); IGNORE( mode ); IGNORE( adjusted_mode ); return TRUE; }
static void maliSolid(PixmapPtr pPixmap, int x1, int y1, int x2, int y2) { IGNORE(pPixmap); IGNORE(x1); IGNORE(y1); IGNORE(x2); IGNORE(y2); }
static Bool fbdev_lcd_output_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode) { IGNORE( output ); IGNORE( mode ); IGNORE( adjusted_mode ); return TRUE; }
static void fbdev_lcd_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, int size) { IGNORE( crtc ); IGNORE( red ); IGNORE( green ); IGNORE( blue ); IGNORE( size ); }
/*ARGSUSED*/ static void REGALFASTUIDRAW_GLU_CALL noCombine( double x, double y, unsigned int data[4], float weight[4], unsigned int *dataOut ) { IGNORE(x); IGNORE(y); IGNORE(data); IGNORE(weight); IGNORE(dataOut); }
/* * Function: angel_NodevIntHandler * Purpose: Place-holding interrupt function that reports an error * * Params: As described in devdriv.h * * Returns: This routine does not return */ void angel_NodevIntHandler(unsigned int ident, unsigned int data, unsigned int empty_stack) { IGNORE(data); IGNORE(empty_stack); LogError(LOG_DEVMISC, ( "NodevIntHandler called: ident %d\n", ident)); }
static Bool maliPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg) { IGNORE(pPixmap); IGNORE(alu); IGNORE(planemask); IGNORE(fg); return FALSE; }
static Bool maliCheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture) { IGNORE(op); IGNORE(pSrcPicture); IGNORE(pMaskPicture); IGNORE(pDstPicture); return FALSE; }
void prmat(void) { int i, j; struct elm *el; IGNORE(printf("\n\n ")); for (i=10 ; i <= neqn ; i += 10) IGNORE(printf(" %1d", (i%100)/10)); IGNORE(printf("\n ")); for (i=1 ; i <= neqn; i++) IGNORE(printf("%1d", i%10)); IGNORE(printf("\n\n")); for (i=1 ; i <= neqn ; i++) { IGNORE(printf("%3d ", i)); j = 0; for (el = rowst[i] ;el != ELM0 ; el = el->c_right) { for ( j++ ; j < el->col ; j++) IGNORE(putchar(' ')); IGNORE(putchar('*')); } IGNORE(putchar('\n')); } }
/*ARGSUSED*/ void REGALWRATH_GLU_CALL glu_wrath_gl_noCombineData( double coords[3], void *data[4], float weight[4], void **outData, void *polygonData ) { IGNORE(polygonData); IGNORE(coords); IGNORE(data); IGNORE(weight); IGNORE(outData); }
static void maliComposite(PixmapPtr pDstPixmap, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int width, int height) { IGNORE(pDstPixmap); IGNORE(srcX); IGNORE(srcY); IGNORE(maskX); IGNORE(maskY); IGNORE(dstX); IGNORE(dstY); IGNORE(width); IGNORE(height); }
static void set_graph_type_activity(GtkWidget *radio, GtkWidget *top) { GtkWidget **check_graph_real, **check_graph_stat, **check_graph_step, *spin_states; gint states, i; IGNORE(radio); spin_states = g_object_get_data(G_OBJECT(top), "spin_states"); check_graph_real = g_object_get_data(G_OBJECT(top), "check_graph_real"); check_graph_stat = g_object_get_data(G_OBJECT(top), "check_graph_stat"); check_graph_step = g_object_get_data(G_OBJECT(top), "check_graph_step"); states = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_states)); for (i = 0; i < (states - 1); i++) { gtk_widget_set_sensitive(check_graph_real[i], TRUE); gtk_widget_set_sensitive(check_graph_stat[i], TRUE); } gtk_widget_set_sensitive(check_graph_real[i], FALSE); gtk_widget_set_sensitive(check_graph_stat[i], FALSE); gtk_widget_set_sensitive(check_graph_step[i], FALSE); /* Mathematik-Hack */ if (states > 3) for (i = 0; i < ATOM_STATES; i++) { gtk_widget_set_sensitive(check_graph_stat[i], FALSE); gtk_widget_set_sensitive(check_graph_step[i], FALSE); } }
void Angel_ApplReceiveMode(DevRecvMode mode) { /* does nothing in non-minimal system */ IGNORE(mode); return; }
static int ctrl_start_agent(p_Buffer * buffer, void *stateptr) { /* Decode an loadagent message */ int debugID, OSinfo1, OSinfo2, subreason, err; word startaddress; word status; IGNORE(stateptr); unpack_message(BUFFERDATA(*buffer) + 4, "%w%w%w%w%w", &debugID, &OSinfo1, &OSinfo2, &subreason, &startaddress); LogInfo(LOG_CTRL, ( "ctrl_start_agent(startaddress = %x)\n", startaddress)); if (loadagent_sofar == loadagent_size && startaddress >= loadagent_address && startaddress < (loadagent_address + loadagent_size)) status = RDIError_NoError; else status = RDIError_BadConfigData; err = msgsend(CI_HADP, "%w%w%w%w%w%w", (ADP_Control | TtoH), debugID, OSinfo1, OSinfo2, ADP_Ctrl_Start_Agent, status); if (err == RDIError_NoError && status == RDIError_NoError) angelOS_ExecuteNewAgent(startaddress); return err; }
static int ctrl_download_agent(p_Buffer * buffer, void *stateptr) { /* Decode an loadagent message */ int debugID, OSinfo1, OSinfo2, subreason; word loadaddress, nbytes; word status; IGNORE(stateptr); unpack_message(BUFFERDATA(*buffer) + 4, "%w%w%w%w%w%w", &debugID, &OSinfo1, &OSinfo2, &subreason, &loadaddress, &nbytes); LogInfo(LOG_CTRL, ( "ctrl_download_agent(loadadr = 0x%x, nbytes = %d)\n", loadaddress, nbytes)); status = angelOS_LoadAgent(OSinfo1, OSinfo2, loadaddress, nbytes); if (status == RDIError_NoError) { loadagent_address = loadaddress; loadagent_size = nbytes; loadagent_sofar = 0; } return msgsend(CI_HADP, "%w%w%w%w%w%w", (ADP_Control | TtoH), debugID, OSinfo1, OSinfo2, ADP_Ctrl_Download_Agent, status); }
static int ctrl_download_data(p_Buffer * buffer, void *stateptr) { /* Decode an addconfig message */ int debugID, OSinfo1, OSinfo2, reason, subreason, count, err; word nbytes; word status; IGNORE(stateptr); count = unpack_message(BUFFERDATA(*buffer), "%w%w%w%w%w%w", &reason, &debugID, &OSinfo1, &OSinfo2, &subreason, &nbytes); LogInfo(LOG_CTRL, ( "ctrl_download_data(nbytes = %d)\n", nbytes)); status = angelOS_LoadConfigData(OSinfo1, OSinfo2, nbytes, BUFFERDATA(*buffer) + count); if (status == RDIError_NoError && loadagent_address != -1) loadagent_sofar += nbytes; /* We make sure we release the buffer here as it may be the long one */ angel_ChannelReleaseBuffer(*buffer); *buffer = NULL; err = msgsend(CI_HADP, "%w%w%w%w%w%w", (ADP_Control | TtoH), debugID, OSinfo1, OSinfo2, ADP_Ctrl_Download_Data, status); return err; }
static int ctrl_download_supported(p_Buffer * buffer, void *stateptr) { int debugID, OSinfo1, OSinfo2; /* For Angel return CantLoadConfig - we can't do that * for EmbeddedICE (ICEman) say we can * for EICEADP - the ADP over JTAG software say we can't */ #if defined(ICEMAN2) && !defined(JTAG_ADP_SUPPORTED) word status = RDIError_NoError; #else word status = RDIError_CantLoadConfig; #endif IGNORE(stateptr); LogInfo(LOG_CTRL, ( "ctrl_download_supported -> %d\n", status)); unpack_message(BUFFERDATA(*buffer) + 4, "%w%w%w", &debugID, &OSinfo1, &OSinfo2); return msgsend(CI_HADP, "%w%w%w%w%w%w", (ADP_Control | TtoH), debugID, OSinfo1, OSinfo2, ADP_Ctrl_Download_Supported, status); }
static char *add_strerror(char *message, int last_errno) { if (last_errno == 0) return message; else { /* This is very annoying: strerror() is not not necessarily thread * safe ... but not for any compelling reason, see: * http://sources.redhat.com/ml/glibc-bugs/2005-11/msg00101.html * and the rather unhelpful reply: * http://sources.redhat.com/ml/glibc-bugs/2005-11/msg00108.html * * On the other hand, the recommended routine strerror_r() is * inconsistently defined -- depending on the precise library and its * configuration, it returns either an int or a char*. Oh dear. * * Ah well. We go with the GNU definition, so here is a buffer to * maybe use for the message. */ char StrError[64]; char *result; IGNORE(asprintf(&result, "%s: (%d) %s", message, last_errno, strerror_r(last_errno, StrError, sizeof(StrError)))); free(message); return result; } }
void usb_register_callback(struct usb_sock_t *usb) { IGNORE(usb); int status = libusb_hotplug_register_callback( NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT, // Note: libusb's enum has no default value // a bug has been filled with libusb. // Please switch the below line to 0 // once the issue has been fixed in // deployed versions of libusb // https://github.com/libusb/libusb/issues/35 // 0, LIBUSB_HOTPLUG_ENUMERATE, g_options.vendor_id, g_options.product_id, LIBUSB_HOTPLUG_MATCH_ANY, &usb_exit_on_unplug, NULL, NULL); if (status == LIBUSB_SUCCESS) { pthread_t thread_handle; pthread_create(&thread_handle, NULL, &usb_pump_events, NULL); NOTE("Registered unplug callback"); } else ERR("Failed to register unplug callback"); }
/* * This can be used as the buffer allocation callback for the rx engine, * and makes use of angel_DD_GetBuffer() [in devdrv.h]. * * Saves duplicating this callback function in every device driver that * uses the rx engine. * * Note that this REQUIRES that the device id is installed as ba_data * in the rx engine config structure for the driver. */ bool angel_DD_RxEng_BufferAlloc( struct data_packet *packet, void *cb_data ) { #ifdef TARGET DeviceID devid = (DeviceID)cb_data; #else IGNORE(cb_data); #endif if ( packet->type < DC_NUM_CHANNELS ) { /* request a buffer down from the channels layer */ #ifdef TARGET packet->data = angel_DD_GetBuffer( devid, packet->type, packet->len ); #else packet->data = malloc(packet->len); #endif if ( packet->data == NULL ) return FALSE; else { packet->buf_len = packet->len; return TRUE; } } else { /* bad type field */ return FALSE; } }
bool logadp_PreWarn(WarnLevel level) { IGNORE(level); if ( ! boot_completed ) return FALSE; if ( logadp_buf != NULL ) return FALSE; /* busy */ if ( ! logadp_inUSRmode() ) return FALSE; logadp_buf = angel_ChannelAllocBuffer( Angel_ChanBuffSize ); if (logadp_buf != NULL) { char *prefix = LOGADP_PREFIX_STR; logadp_pos = (char *)logadp_buf; logadp_end = (char *)(logadp_buf + Angel_ChanBuffSize - 1); while ( (*logadp_pos++ = *prefix++) != '\0' ) /* classic strcpy, no body required */ ; return TRUE; } else return FALSE; }