/usr/share/doc/libwmf0.2-7/html/api_8c.html is in libwmf-doc 0.2.8.4-10.3ubuntu1.14.04.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>api.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center>
<hr><h1>api.c File Reference</h1><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="types_8h.html#a5">wmf_error_t</a> </td><td valign=bottom><a class="el" href="api_8c.html#a0">wmf_lite_create</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> **API_return, unsigned long flags, <a class="el" href="types_8h.html#a21">wmfAPI_Options</a> *options)</td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="types_8h.html#a5">wmf_error_t</a> </td><td valign=bottom><a class="el" href="api_8c.html#a1">wmf_lite_destroy</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="api_8c.html#a2">wmf_assert</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, char *file, int line)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="api_8c.html#a3">wmf_error</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, char *file, int line, char *msg)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="api_8c.html#a4">wmf_debug</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, char *file, int line, char *msg)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="api_8c.html#a5">wmf_printf</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, char *msg,...)</td></tr>
<tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="api_8c.html#a6">wmf_malloc</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, size_t size)</td></tr>
<tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="api_8c.html#a7">wmf_calloc</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, size_t number, size_t size)</td></tr>
<tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="api_8c.html#a8">wmf_realloc</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, void *mem, size_t size)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="api_8c.html#a9">wmf_free</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, void *mem)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="api_8c.html#a10">wmf_detach</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, void *mem)</td></tr>
<tr><td nowrap align=right valign=top>char * </td><td valign=bottom><a class="el" href="api_8c.html#a11">wmf_strdup</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, const char *str)</td></tr>
<tr><td nowrap align=right valign=top>char * </td><td valign=bottom><a class="el" href="api_8c.html#a12">wmf_str_append</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, char *pre, char *post)</td></tr>
<tr><td nowrap align=right valign=top>char * </td><td valign=bottom><a class="el" href="api_8c.html#a13">wmf_strstr</a> (const char *haystack, const char *needle)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="api_8c.html#a14">wmf_status_function</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, void *context, <a class="el" href="types_8h.html#a13">wmfStatus</a> function)</td></tr>
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="api_8c.html#a15">wmf_strbuf_grow</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API)</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a name="a2" doxytag="api.c::wmf_assert"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void wmf_assert </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>file</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>line</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the error state of the library to wmf_E_Assert.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>file</em> </td><td>
file name </td></tr>
<tr><td valign=top><em>line</em> </td><td>
line number</td></tr>
</table>
</dl>This should only be called via the macro <a class="el" href="api_8h.html#a2">WMF_ASSERT(API,<expr>)</a> which is defined (for debug builds only) as: <div class="fragment"><pre>
#define WMF_ASSERT(Z,M) if (!(M)) wmf_assert (Z,__FILE__,__LINE__)
</pre></div> i.e., if <expr> evaluates to 0 then call <a class="el" href="api_8c.html#a2">wmf_assert()</a> with current file name and line number. </td>
</tr>
</table>
<a name="a7" doxytag="api.c::wmf_calloc"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void* wmf_calloc </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>size_t </td>
<td class="mdname" nowrap> <em>number</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>size_t </td>
<td class="mdname" nowrap> <em>size</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Allocate memory of specified size and attach to the API's memory manager's internal list.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>number</em> </td><td>
number or elements </td></tr>
<tr><td valign=top><em>size</em> </td><td>
size in bytes of memory required by one element</td></tr>
</table>
</dl>With syntax similar to calloc(), <a class="el" href="api_8c.html#a7">wmf_calloc()</a> allocates <code>number</code> * <code>size</code> bytes of memory and adds a reference to it in the memory manager's list. To free the memory, use <a class="el" href="api_8c.html#a9">wmf_free()</a>.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
Pointer to new memory, or zero on failure. Sets error state <b>wmf_E_InsMem</b> on failure. </dl> </td>
</tr>
</table>
<a name="a4" doxytag="api.c::wmf_debug"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void wmf_debug </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>file</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>line</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>msg</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Print message to debug stream.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>file</em> </td><td>
file name </td></tr>
<tr><td valign=top><em>line</em> </td><td>
line number </td></tr>
<tr><td valign=top><em>msg</em> </td><td>
message to print</td></tr>
</table>
</dl>This should only be called via the macro <a class="el" href="api_8h.html#a1">WMF_DEBUG(API,msg)</a> which (in debug builds only) calls <a class="el" href="api_8c.html#a4">wmf_debug()</a> with the current file name and line number. </td>
</tr>
</table>
<a name="a10" doxytag="api.c::wmf_detach"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void wmf_detach </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>void * </td>
<td class="mdname" nowrap> <em>mem</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Detach memory attached to the API's memory manager's internal list.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>mem</em> </td><td>
pointer to memory previously allocated via the API</td></tr>
</table>
</dl>This removes the reference in the API's memory manager's internal list, and the memory will not, therefore, be released by <a class="el" href="api_8h.html#a23">wmf_api_destroy()</a>. To free subsequently, use free(). </td>
</tr>
</table>
<a name="a3" doxytag="api.c::wmf_error"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void wmf_error </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>file</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>line</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>msg</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Print message to error stream.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>file</em> </td><td>
file name </td></tr>
<tr><td valign=top><em>line</em> </td><td>
line number </td></tr>
<tr><td valign=top><em>msg</em> </td><td>
message to print</td></tr>
</table>
</dl>This should only be called via the macro <a class="el" href="api_8h.html#a0">WMF_ERROR(API,msg)</a> which calls <a class="el" href="api_8c.html#a3">wmf_error()</a> with the current file name and line number. </td>
</tr>
</table>
<a name="a9" doxytag="api.c::wmf_free"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void wmf_free </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>void * </td>
<td class="mdname" nowrap> <em>mem</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Frees memory attached to the API's memory manager's internal list.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>mem</em> </td><td>
pointer to memory previously allocated via the API</td></tr>
</table>
</dl>Syntax is similar to free(). </td>
</tr>
</table>
<a name="a0" doxytag="api.c::wmf_lite_create"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="types_8h.html#a5">wmf_error_t</a> wmf_lite_create </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> ** </td>
<td class="mdname" nowrap> <em>API_return</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>unsigned long </td>
<td class="mdname" nowrap> <em>flags</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="types_8h.html#a21">wmfAPI_Options</a> * </td>
<td class="mdname" nowrap> <em>options</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Creates and initializes an instance of the <b>libwmf</b> library (lite interface) for a specified device layer.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API_return</em> </td><td>
pointer to a wmfAPI* (the API handle use henceforth) </td></tr>
<tr><td valign=top><em>flags</em> </td><td>
bitwise OR of WMF_OPT_ options </td></tr>
<tr><td valign=top><em>options</em> </td><td>
pointer to wmfAPI_Options structure</td></tr>
</table>
</dl>This is the first and necessary step when using <b>libwmf</b>. Options are passed via the wmfAPI_Options structure and <code>flags</code>. wmf_api_create allocates the wmfAPI structure and initializes the color tables, the metafile player, and the device layer. If successful then the pointer to the wmfAPI structure is returned via <code>API_return</code>, otherwise all allocated memory is released and the library exits with an appropriate error.
<p>
wmf_lite_create () ignores command line arguments, if any are given, and does <b>not</b> attempt to set up font mapping.
<p>
The library should be closed using the corresponding wmf_lite_destroy () function.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
The error state of the library: <b>wmf_E_None</b> indicates successful creation and initialization of the library, and <code>*API_return</code> will be non-zero. For any other error value <code>*API_return</code> will be zero. </dl> </td>
</tr>
</table>
<a name="a1" doxytag="api.c::wmf_lite_destroy"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="types_8h.html#a5">wmf_error_t</a> wmf_lite_destroy </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>API</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Close the device layer, if open, and release all allocated memory attached to the memory manager.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle</td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
The final error state of the library. </dl> </td>
</tr>
</table>
<a name="a6" doxytag="api.c::wmf_malloc"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void* wmf_malloc </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>size_t </td>
<td class="mdname" nowrap> <em>size</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Allocate memory of specified size and attach to the API's memory manager's internal list.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>size</em> </td><td>
size in bytes of memory required</td></tr>
</table>
</dl>With syntax similar to malloc(), <a class="el" href="api_8c.html#a6">wmf_malloc()</a> allocates <code>size</code> bytes of memory and adds a reference to it in the memory manager's list. To free the memory, use <a class="el" href="api_8c.html#a9">wmf_free()</a>.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
Pointer to new memory, or zero on failure. Sets error state <b>wmf_E_InsMem</b> on failure. </dl> </td>
</tr>
</table>
<a name="a5" doxytag="api.c::wmf_printf"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void wmf_printf </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>msg</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>... </td>
<td class="mdname" nowrap> </td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Print formatted message to debug stream.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>msg</em> </td><td>
message to print</td></tr>
</table>
</dl>With syntax similar to printf(), <a class="el" href="api_8c.html#a5">wmf_printf()</a> prints formatted output to the debug stream. </td>
</tr>
</table>
<a name="a8" doxytag="api.c::wmf_realloc"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void* wmf_realloc </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>void * </td>
<td class="mdname" nowrap> <em>mem</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>size_t </td>
<td class="mdname" nowrap> <em>size</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
(Re)Allocate memory of specified size and attach to the API's memory manager's internal list.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>mem</em> </td><td>
pointer to memory previously allocated via the API </td></tr>
<tr><td valign=top><em>size</em> </td><td>
new size in bytes of memory required</td></tr>
</table>
</dl>With syntax similar to realloc(), <a class="el" href="api_8c.html#a8">wmf_realloc()</a> allocates <code>size</code> bytes of memory and adds a reference to it in the memory manager's list. To free the memory, use <a class="el" href="api_8c.html#a9">wmf_free()</a>. If <code>mem</code> is zero, this is equivalent to a call to <a class="el" href="api_8c.html#a6">wmf_malloc()</a>. If <code>size</code> is zero, the memory is released via <a class="el" href="api_8c.html#a9">wmf_free()</a>.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
Pointer to new memory, or zero on failure. Sets error state <b>wmf_E_InsMem</b> on failure. </dl> </td>
</tr>
</table>
<a name="a14" doxytag="api.c::wmf_status_function"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void wmf_status_function </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>void * </td>
<td class="mdname" nowrap> <em>context</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="types_8h.html#a13">wmfStatus</a> </td>
<td class="mdname" nowrap> <em>function</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set a status call-back function.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>context</em> </td><td>
handle for user data </td></tr>
<tr><td valign=top><em>function</em> </td><td>
call-back function</td></tr>
</table>
</dl>The metafile player calls the status function after each record. </td>
</tr>
</table>
<a name="a12" doxytag="api.c::wmf_str_append"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> char* wmf_str_append </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>pre</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>post</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Create concatenatation of two strings and attach to the API's memory manager's internal list.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>pre</em> </td><td>
a string </td></tr>
<tr><td valign=top><em>post</em> </td><td>
a string</td></tr>
</table>
</dl><a class="el" href="api_8c.html#a12">wmf_str_append()</a> allocates the necessary memory via <a class="el" href="api_8c.html#a6">wmf_malloc()</a>, copies <code>pre</code> into the string and appends <code>post</code>. Use <a class="el" href="api_8c.html#a9">wmf_free()</a> to free the string.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
Pointer to new string, or zero on failure. Sets error state <b>wmf_E_InsMem</b> on failure, or <b>wmf_E_Glitch</b> if str is zero. </dl> </td>
</tr>
</table>
<a name="a15" doxytag="api.c::wmf_strbuf_grow"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> unsigned long wmf_strbuf_grow </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>API</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Increase the size of the internal string buffer.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle</td></tr>
</table>
</dl><b>libwmf</b> maintains an internal buffer for string operations. <a class="el" href="api_8c.html#a15">wmf_strbuf_grow()</a> increases the size by 64.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
Returns the new size of the buffer. Uses <a class="el" href="api_8c.html#a8">wmf_realloc()</a>, so may set <b>wmf_E_InsMem</b> on failure. </dl> </td>
</tr>
</table>
<a name="a11" doxytag="api.c::wmf_strdup"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> char* wmf_strdup </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td>
<td class="mdname" nowrap> <em>API</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>str</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Duplicate string and attach to the API's memory manager's internal list.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>API</em> </td><td>
the API handle </td></tr>
<tr><td valign=top><em>str</em> </td><td>
a string</td></tr>
</table>
</dl>With syntax similar to strdup(), <a class="el" href="api_8c.html#a11">wmf_strdup()</a> allocates the necessary memory via <a class="el" href="api_8c.html#a6">wmf_malloc()</a> and copies the string. Use <a class="el" href="api_8c.html#a9">wmf_free()</a> to free the string.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
Pointer to new string, or zero on failure. Sets error state <b>wmf_E_InsMem</b> on failure, or <b>wmf_E_Glitch</b> if str is zero. </dl> </td>
</tr>
</table>
<a name="a13" doxytag="api.c::wmf_strstr"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> char* wmf_strstr </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char * </td>
<td class="mdname" nowrap> <em>haystack</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>needle</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Substring search.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>haystack</em> </td><td>
a string </td></tr>
<tr><td valign=top><em>needle</em> </td><td>
a substring to search for in haystack</td></tr>
</table>
</dl>With syntax identical to strstr(), <a class="el" href="api_8c.html#a13">wmf_strstr()</a> searches for string <code>needle</code> in string <code>haystack</code>.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
Pointer to substring <code>needle</code> found in <code>haystack</code>, or zero if not found. </dl> </td>
</tr>
</table>
<hr><address style="align: right;"><small>Generated on Tue Dec 10 19:53:47 2002 for libwmf by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.18 </small></address>
</body>
</html>
|