break; /* reached end of file */ if (retval != CTDBRET_OK) Handle_Error("Display_hRecordConnRecd(): ctdbNextRecord()"); } } /* * Display_SignalRecd();() * * This function displays the contents of a table. ctdbFirstRecord() and * ctdbNextRecord() fetch the record. Then each field is parsed and displayed */ #ifdef PROTOTYPE VOID Display_SignalRecd() #else VOID Display_SignalRecd() #endif { CTDBRET retval=CTDBRET_OK; CTSIGNED usrno; CTSIGNED sequence; TEXT time[13+1]; TEXT channel1[11+1]; TEXT channel2[11+1]; TEXT channel3[11+1]; TEXT channel4[11+1]; printf("\tDisplay records..."); /* read first record */ retval = ctdbFirstRecord(hRecordSignalRecd); if (retval != CTDBRET_OK) Handle_Error("Display_hRecordSignalRecd(): ctdbFirstRecord()"); while (retval != END_OF_FILE) { retval = 0; retval |= ctdbGetFieldAsSigned(hRecordSignalRecd, 0, &usrno); retval |= ctdbGetFieldAsSigned(hRecordSignalRecd, 1, &sequence); retval |= ctdbGetFieldAsString(hRecordSignalRecd, 2, time, sizeof(time)); retval |= ctdbGetFieldAsString(hRecordSignalRecd, 3,
break; /* reached end of file */ if (retval != CTDBRET_OK) Handle_Error("Display_hRecordConnRecd(): ctdbNextRecord()"); } } /* * Display_SignalRecd();() * * This function displays the contents of a table. ctdbFirstRecord() and * ctdbNextRecord() fetch the record. Then each field is parsed and displayed */ #ifdef PROTOTYPE VOID Display_SignalRecd() #else VOID Display_SignalRecd() #endif { CTDBRET retval=CTDBRET_OK; CTSIGNED usrno; CTSIGNED sequence; TEXT time[13+1]; TEXT channel1[11+1]; TEXT channel2[11+1]; TEXT channel3[11+1]; TEXT channel4[11+1]; printf("\tDisplay records..."); /* read first record */ retval = ctdbFirstRecord(hRecordSignalRecd); if (retval != CTDBRET_OK) Handle_Error("Display_hRecordSignalRecd(): ctdbFirstRecord()"); while (retval != END_OF_FILE) { retval = 0; retval |= ctdbGetFieldAsSigned(hRecordSignalRecd, 0, &usrno); retval |= ctdbGetFieldAsSigned(hRecordSignalRecd, 1, &sequence); retval |= ctdbGetFieldAsString(hRecordSignalRecd, 2, time, sizeof(time)); retval |= ctdbGetFieldAsString(hRecordSignalRecd, 3,
project_report1.docx