FACT++  1.0
int did_write_string ( char  type,
int  num,
void **  buffer_ptr,
int  ssize 
)

Definition at line 1287 of file did.c.

References print_service_char(), print_service_double(), print_service_float(), print_service_short(), print_service_standard(), Service_content_str, and size.

Referenced by print_service_formatted().

1288 {
1289 void *ptr;
1290 int size, psize;
1291 
1292  void print_service_standard();
1293  void print_service_char();
1294  void print_service_short();
1295  void print_service_float();
1296  void print_service_double();
1297 
1298  ptr = *buffer_ptr;
1299  switch(type)
1300  {
1301  case 'L':
1302  case 'l':
1303  strcat(Service_content_str," L");
1304  if(!num)
1305  size = ssize/(int)sizeof(int);
1306  else
1307  size = num;
1308  psize = size * (int)sizeof(int);
1309  print_service_standard(ptr, size);
1310  break;
1311  case 'I':
1312  case 'i':
1313  strcat(Service_content_str," I");
1314  if(!num)
1315  size = ssize/(int)sizeof(int);
1316  else
1317  size = num;
1318  psize = size * (int)sizeof(int);
1319  print_service_standard(ptr, size);
1320  break;
1321  case 'S':
1322  case 's':
1323  strcat(Service_content_str," S");
1324  if(!num)
1325  size = ssize/(int)sizeof(short);
1326  else
1327  size = num;
1328  psize = size * (int)sizeof(short);
1329  print_service_short(ptr, size);
1330  break;
1331  case 'F':
1332  case 'f':
1333  strcat(Service_content_str," F");
1334  if(!num)
1335  size = ssize/(int)sizeof(float);
1336  else
1337  size = num;
1338  psize = size * (int)sizeof(float);
1339  print_service_float(ptr, size);
1340  break;
1341  case 'D':
1342  case 'd':
1343  strcat(Service_content_str," D");
1344  if(!num)
1345  size = ssize/(int)sizeof(double);
1346  else
1347  size = num;
1348  psize = size * (int)sizeof(double);
1349  print_service_double(ptr, size);
1350  break;
1351  case 'X':
1352  case 'x':
1353  strcat(Service_content_str," X");
1354  if(!num)
1355  size = ssize/(int)sizeof(longlong);
1356  else
1357  size = num;
1358  psize = size * (int)sizeof(longlong);
1359  print_service_standard(ptr, size*2);
1360  break;
1361  case 'C':
1362  case 'c':
1363  default:
1364  strcat(Service_content_str," C");
1365  if(!num)
1366  size = ssize;
1367  else
1368  size = num;
1369  psize = size;
1370  print_service_char(ptr, size);
1371  }
1372  ptr = (char *)ptr + psize;
1373  *buffer_ptr = ptr;
1374  return psize;
1375 }
void print_service_float(float *buff, int size)
Definition: did.c:1713
void print_service_double(double *buff, int size)
Definition: did.c:1746
void print_service_short(short *buff, int size)
Definition: did.c:1577
void print_service_standard(int *buff, int size)
Definition: did.c:1456
char * Service_content_str
Definition: did.c:20
int type
int size
Definition: db_dim_server.c:17
int64_t longlong
Definition: dim_common.h:56
void print_service_char(char *buff, int size)
Definition: did.c:1648

+ Here is the call graph for this function:

+ Here is the caller graph for this function: