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

Definition at line 1441 of file didMarkus.c.

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

Referenced by did_write_string().

1442 {
1443 int i,j;
1444 char *asc, *ptr, str[80], tmp[256];
1445 int last[4];
1446 
1447  asc = (char *)buff;
1448  ptr = Service_content_str;
1449  ptr += strlen(Service_content_str);
1450  for( i = 0; i < size; i++)
1451  {
1452  strcpy(tmp,"");
1453  if(i%4 == 0)
1454  {
1455  if(i != 0)
1456  {
1457  strcat(tmp," ");
1458  }
1459  sprintf(str,"%5d ",i);
1460  strcat(tmp,str);
1461  }
1462  if(!(i%4))
1463  strcat(tmp,"H: ");
1464  sprintf(str," %08X",buff[i]);
1465  strcat(tmp,str);
1466  last[i%4] = buff[i];
1467  if((i%4 == 3) || (i == (size-1)))
1468  {
1469  /*
1470  if(i%4 != 3)
1471  {
1472  for(j = 1; j < 4 - (i%4); j++)
1473  strcat(tmp," ");
1474  }
1475  strcat(tmp," '");
1476  for(j = 0; j < ((i%4)*4)+4 ; j++)
1477  {
1478  if(isprint(asc[j]))
1479  {
1480  sprintf(str,"%c",asc[j]);
1481  strcat(tmp,str);
1482  }
1483  else
1484  {
1485  sprintf(str,".");
1486  strcat(tmp,str);
1487  }
1488  }
1489  */
1490  strcat(tmp,"\n");
1491  for(j = 0; j <= (i%4); j++)
1492  {
1493  if(j == 0)
1494  strcat(tmp," D: ");
1495  sprintf(str,"%12d",last[j]);
1496  strcat(tmp,str);
1497  }
1498  strcat(tmp,"\n");
1499  asc = (char *)&buff[i+1];
1500  }
1501  strcpy(ptr, tmp);
1502  ptr += strlen(tmp);
1503  }
1504  strcpy(tmp,"\n");
1505  strcpy(ptr, tmp);
1506 }
int i
Definition: db_dim_client.c:21
char str[80]
Definition: test_client.c:7
int size
Definition: db_dim_server.c:17
int buff[BUFFSIZE]
Definition: db_dim_client.c:15
char * Service_content_str
Definition: didMarkus.c:20
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: