FACT++  1.0
void print_service_standard ( int *  buff,
int  size 
)

Definition at line 1456 of file did.c.

References i, Service_content_str, size, sprintf(), and str.

Referenced by did_write_string().

1457 {
1458 int i,j;
1459 char *ptr, str[80], tmp[256];
1460 int last[4];
1461 /*
1462 char *asc;
1463  asc = (char *)buff;
1464 */
1465  ptr = Service_content_str;
1466  ptr += strlen(Service_content_str);
1467  for( i = 0; i < size; i++)
1468  {
1469  strcpy(tmp,"");
1470  if(i%4 == 0)
1471  {
1472  if(i != 0)
1473  {
1474  strcat(tmp," ");
1475  }
1476  sprintf(str,"%5d ",i);
1477  strcat(tmp,str);
1478  }
1479  if(!(i%4))
1480  strcat(tmp,"H: ");
1481  sprintf(str," %08X",buff[i]);
1482  strcat(tmp,str);
1483  last[i%4] = buff[i];
1484  if((i%4 == 3) || (i == (size-1)))
1485  {
1486  /*
1487  if(i%4 != 3)
1488  {
1489  for(j = 1; j < 4 - (i%4); j++)
1490  strcat(tmp," ");
1491  }
1492  strcat(tmp," '");
1493  for(j = 0; j < ((i%4)*4)+4 ; j++)
1494  {
1495  if(isprint(asc[j]))
1496  {
1497  sprintf(str,"%c",asc[j]);
1498  strcat(tmp,str);
1499  }
1500  else
1501  {
1502  sprintf(str,".");
1503  strcat(tmp,str);
1504  }
1505  }
1506  */
1507  strcat(tmp,"\n");
1508  for(j = 0; j <= (i%4); j++)
1509  {
1510  if(j == 0)
1511  strcat(tmp," D: ");
1512  sprintf(str,"%12d",last[j]);
1513  strcat(tmp,str);
1514  }
1515  strcat(tmp,"\n");
1516 /*
1517  asc = (char *)&buff[i+1];
1518 */
1519  }
1520  strcpy(ptr, tmp);
1521  ptr += strlen(tmp);
1522  }
1523  strcpy(tmp,"\n");
1524  strcpy(ptr, tmp);
1525 }
int i
Definition: db_dim_client.c:21
char str[80]
Definition: test_client.c:7
char * Service_content_str
Definition: did.c:20
int size
Definition: db_dim_server.c:17
int buff[BUFFSIZE]
Definition: db_dim_client.c:15
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: