FACT++  1.0
void print_service_short ( short *  buff,
int  size 
)

Definition at line 1577 of file did.c.

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

Referenced by did_write_string().

1578 {
1579 int i,j;
1580 char *ptr, str[80], tmp[256];
1581 short last[8];
1582 /*
1583 char *asc;
1584  asc = (char *)buff;
1585 */
1586  ptr = Service_content_str;
1587  ptr += strlen(Service_content_str);
1588  for( i = 0; i < size; i++)
1589  {
1590  strcpy(tmp,"");
1591  if(i%8 == 0)
1592  {
1593  if(i != 0)
1594  {
1595  strcat(tmp," ");
1596  }
1597  sprintf(str,"%5d ",i);
1598  strcat(tmp,str);
1599  }
1600  if(!(i%8))
1601  strcat(tmp,"H: ");
1602  sprintf(str," %04X",buff[i]);
1603  strcat(tmp,str);
1604  last[i%8] = buff[i];
1605  if((i%8 == 7) || (i == (size-1)))
1606  {
1607  /*
1608  if(i%7 != 7)
1609  {
1610  for(j = 1; j < 8 - (i%8); j++)
1611  strcat(tmp," ");
1612  }
1613  strcat(tmp," '");
1614  for(j = 0; j < ((i%8)*2)+2 ; j++)
1615  {
1616  if(isprint(asc[j]))
1617  {
1618  sprintf(str,"%c",asc[j]);
1619  strcat(tmp,str);
1620  }
1621  else
1622  {
1623  sprintf(str,".");
1624  strcat(tmp,str);
1625  }
1626  }
1627  */
1628  strcat(tmp,"\n");
1629  for(j = 0; j <= (i%8); j++)
1630  {
1631  if(j == 0)
1632  strcat(tmp," D: ");
1633  sprintf(str," %5d",last[j]);
1634  strcat(tmp,str);
1635  }
1636  strcat(tmp,"\n");
1637 /*
1638  asc = (char *)&buff[i+1];
1639 */
1640  }
1641  strcpy(ptr, tmp);
1642  ptr += strlen(tmp);
1643  }
1644  strcpy(tmp,"\n");
1645  strcpy(ptr, tmp);
1646 }
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: