97 sprintf (stmt,
"**Error**");
105 sprintf (stmt,
"%ld", num);
133 digits[--i] = (dnum < 10) ? dnum +
'0' : (dnum-10) +
'A';
137 if (item->
format < (
char) 0)
142 sprintf (stmt,
"%d#%s#",
189 if (item->
valid == 0)
191 sprintf (stmt,
"**Error**");
203 else if (item->
format == 1)
208 sprintf (stmt,
"%.*f",
217 sprintf (stmt,
"%.*e",
269 current_units = units;
279 while (current_units != NULL)
307 sprintf (&stmt[len],
"%s",
309 len += strlen (&stmt[len]);
315 sprintf (&stmt[len],
"**%d",
317 len += strlen (&stmt[len]);
365 if (item->
valid == 0)
367 sprintf (stmt,
"**Error**");
369 else if (item->
format > 0)
376 sprintf (stmt,
"\'%s\'",
427 if (item->
valid == 0)
429 sprintf (stmt,
"**Error**");
444 sprintf (stmt,
"%d-%02d-%02d",
452 sprintf (stmt,
"%d-%03d",
492 if (item->
valid == 0)
494 sprintf (stmt,
"**Error**");
509 sprintf (stmt,
"%02d:%02d",
513 if (item->
format % 10 == 3)
523 sprintf (&stmt[len],
"%.*f",
526 len += strlen (&stmt[len]);
544 sprintf (&stmt[len],
"%+03d",
552 sprintf (&stmt[len],
":%02d",
591 if (item->
valid == 0)
593 sprintf (stmt,
"**Error**");
637 int left_margin,
int right_margin,
int format_flag,
652 #define indentf(X) for (i=0 ; i < X ; i++) stmt[len++] = ' ' 655 #define MIN_LINE_LENGTH 40 656 #define MAX_LEFT_MARGIN 32 660 #define MAX_RIGHT_MARGIN 317 675 lmargin = left_margin;
688 rmargin = right_margin;
693 l = (*column > 0)? *column : 1;
717 for ( m = 0 ; m <
n ; )
720 if (!is_pointer && c ==
'\\')
789 if (m < n && isspace (text[m]))
793 for ( ; m < n && isspace (text[m]) ; m++);
800 while (l > lmargin && len > 1 && !isspace (stmt[len-1]))
865 #define indentf(X) for (i=0 ; i < X ; i++) stmt[len++] = ' ' 867 #define MIN_LINE_LENGTH 40 868 #define MAX_LEFT_MARGIN 32 869 #define MAX_RIGHT_MARGIN 317 889 lmargin = left_margin;
902 rmargin = right_margin;
905 rmargin = rmargin - 3;
916 for (ic = 0 ; (c = comment[ic]) !=
'\0' ; ic++)
918 if (c ==
'\n' || l > rmargin)
int ODLFormatString(char stmt[], VALUE_DATA *item, int *column, int left_margin, int right_margin, int format_flag, int is_pointer)
struct ODLInteger integer
int ODLFormatSymbol(char *stmt, VALUE_DATA *item)
int ODLFormatUnits(char *stmt, struct ODLUnits *units)
int ODLFormatDateTime(char *stmt, VALUE_DATA *item)
int ODLFormatDate(char *stmt, VALUE_DATA *item)
struct ODLUnits * next_field
int ODLFormatReal(char *stmt, VALUE_DATA *item)
int ODLFormatInteger(char stmt[], VALUE_DATA *item)
HDFFCLIBAPI _fcd _fcd intf * n
HDFFCLIBAPI intf intf intf * num
int ODLFormatTime(char *stmt, VALUE_DATA *item)
int ODLFormatComment(char *stmt, char *comment, int left_margin, int right_margin)
union Value_Data::@2 value