http://www.ousob.com --- Legacy Redefined #include <string.h> #include <nit.h> #include <extend50.h> CLIPPER b_pqueues() { char *ptr; int i; int ccode; WORD objType; char objName[48]; long objID; BYTE loginTime[7]; int segmentNumber = 1; BYTE moreSegments; BYTE propertyFlags; BYTE propertyValue[128]; char buffer[129]; long *setValue = (long *)propertyValue; int gotAproblem = 0; WORD ConnectionNumber; WORD conn_no = _parni(1); if( !PCOUNT || !ISNUM(1) ) { buffer[0] = NULL; gotAproblem = 1;; } if( ConnectionNumber == 0 ) { buffer[0] = NULL; gotAproblem = 1; } if( !gotAproblem ) { memset(objName,'\0',48); memset(propertyValue,'\0',128); ccode = GetConnectionInformation(conn_no, objName, &objType, &objID, loginTime); if( ccode != 0 || objType != 3 ) { buffer[0] = NULL; gotAproblem = 1; } else { ReadPropertyValue(objName, OT_PRINT_QUEUE, "IDENTIFICATION", segmentNumber,propertyValue, &moreSegments, &propertyFlags); sprintf(buffer,"%-15s%-25s%c",objName,propertyValue,NULL); if( (ptr = strstr(buffer,"NOT")) != NULL ) { buffer[0] = NULL; } } } _retc(buffer); }