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 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937
|
/* rename.c --- wrappers for various renamed functions
*
* 20/9/09
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /*HAVE_CONFIG_H*/
#include <glib/gi18n-lib.h>
#include <string.h>
#include <vips/vips.h>
#include <vips/internal.h>
int
im_remainderconst_vec(IMAGE *in, IMAGE *out, int n, double *c)
{
return im_remainder_vec(in, out, n, c);
}
int
im_and_vec(IMAGE *in, IMAGE *out, int n, double *c)
{
return im_andimage_vec(in, out, n, c);
}
int
im_or_vec(IMAGE *in, IMAGE *out, int n, double *c)
{
return im_orimage_vec(in, out, n, c);
}
int
im_eor_vec(IMAGE *in, IMAGE *out, int n, double *c)
{
return im_eorimage_vec(in, out, n, c);
}
int
im_andconst(IMAGE *in, IMAGE *out, double c)
{
return im_andimageconst(in, out, c);
}
int
im_orconst(IMAGE *in, IMAGE *out, double c)
{
return im_orimageconst(in, out, c);
}
int
im_eorconst(IMAGE *in, IMAGE *out, double c)
{
return im_eorimageconst(in, out, c);
}
void
im_errormsg(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
im_verror("untranslated", fmt, ap);
va_end(ap);
}
void
im_verrormsg(const char *fmt, va_list ap)
{
im_verror("untranslated", fmt, ap);
}
void
im_errormsg_system(int err, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
im_verror_system(err, "untranslated", fmt, ap);
va_end(ap);
}
void
im_diagnostics(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
im_vdiag("untranslated", fmt, ap);
va_end(ap);
}
void
im_warning(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
im_vwarn("untranslated", fmt, ap);
va_end(ap);
}
void *
vips_g_thread_join(GThread *thread)
{
return g_thread_join(thread);
}
int
im_affine(IMAGE *in, IMAGE *out,
double a, double b, double c, double d, double dx, double dy,
int ox, int oy, int ow, int oh)
{
return im_affinei(in, out,
vips_interpolate_bilinear_static(),
a, b, c, d, dx, dy,
ox, oy, ow, oh);
}
int
im_similarity_area(IMAGE *in, IMAGE *out,
double a, double b, double dx, double dy,
int ox, int oy, int ow, int oh)
{
return im_affinei(in, out,
vips_interpolate_bilinear_static(),
a, -b, b, a, dx, dy,
ox, oy, ow, oh);
}
int
im_similarity(IMAGE *in, IMAGE *out,
double a, double b, double dx, double dy)
{
return im_affinei_all(in, out,
vips_interpolate_bilinear_static(),
a, -b, b, a, dx, dy);
}
DOUBLEMASK *
im_measure(IMAGE *im, IMAGE_BOX *box, int h, int v,
int *sel, int nsel, const char *name)
{
return im_measure_area(im,
box->xstart,
box->ystart,
box->xsize,
box->ysize,
h, v, sel, nsel, name);
}
int
im_extract(IMAGE *in, IMAGE *out, IMAGE_BOX *box)
{
if (box->chsel == -1)
return im_extract_areabands(in, out,
box->xstart, box->ystart, box->xsize, box->ysize,
0, in->Bands);
else
return im_extract_areabands(in, out,
box->xstart, box->ystart, box->xsize, box->ysize,
box->chsel, 1);
}
/* The public proto has this in the argument.
*/
typedef void (*notify_fn)(IMAGE *, Rect *, void *);
int
im_render_fade(IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
int fps, int steps,
int priority,
notify_fn notify, void *client)
{
return im_render_priority(in, out, mask,
width, height, max,
priority,
notify, client);
}
int
im_render(IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
notify_fn notify, void *client)
{
return im_render_priority(
in, out, mask,
width, height, max,
0, notify, client);
}
int
im_makerw(IMAGE *im)
{
return im_rwcheck(im);
}
int
im_icc_export(IMAGE *in, IMAGE *out,
const char *output_profile_filename, int intent)
{
return im_icc_export_depth(in, out,
8, output_profile_filename, (VipsIntent) intent);
}
int
im_segment(IMAGE *test, IMAGE *mask, int *segments)
{
return im_label_regions(test, mask, segments);
}
int
im_convf(IMAGE *in, IMAGE *out, DOUBLEMASK *mask)
{
return im_conv_f(in, out, mask);
}
int
im_convf_raw(IMAGE *in, IMAGE *out, DOUBLEMASK *mask)
{
return im_conv_f_raw(in, out, mask);
}
int
im_convsepf(IMAGE *in, IMAGE *out, DOUBLEMASK *mask)
{
return im_convsep_f(in, out, mask);
}
int
im_convsepf_raw(IMAGE *in, IMAGE *out, DOUBLEMASK *mask)
{
return im_convsep_f_raw(in, out, mask);
}
gboolean
im_isint(IMAGE *im)
{
return vips_bandfmt_isint(im->BandFmt);
}
gboolean
im_isuint(IMAGE *im)
{
return vips_bandfmt_isuint(im->BandFmt);
}
gboolean
im_isfloat(IMAGE *im)
{
return vips_bandfmt_isfloat(im->BandFmt);
}
gboolean
im_iscomplex(IMAGE *im)
{
return vips_band_format_iscomplex(im->BandFmt);
}
gboolean
im_isscalar(IMAGE *im)
{
return !im_iscomplex(im);
}
int
im_c2ps(IMAGE *in, IMAGE *out)
{
return im_abs(in, out);
}
int
im_clip(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_UCHAR);
}
int
im_clip2c(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_CHAR);
}
int
im_clip2us(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_USHORT);
}
int
im_clip2s(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_SHORT);
}
int
im_clip2ui(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_UINT);
}
int
im_clip2i(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_INT);
}
int
im_clip2f(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_FLOAT);
}
int
im_clip2d(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_DOUBLE);
}
int
im_clip2cm(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_COMPLEX);
}
int
im_clip2dcm(IMAGE *in, IMAGE *out)
{
return im_clip2fmt(in, out, IM_BANDFMT_DPCOMPLEX);
}
int
im_copy_from(IMAGE *in, IMAGE *out, im_arch_type architecture)
{
switch (architecture) {
case IM_ARCH_NATIVE:
return im_copy(in, out);
case IM_ARCH_BYTE_SWAPPED:
return im_copy_swap(in, out);
case IM_ARCH_LSB_FIRST:
return im_amiMSBfirst() ? im_copy_swap(in, out)
: im_copy(in, out);
case IM_ARCH_MSB_FIRST:
return im_amiMSBfirst() ? im_copy(in, out)
: im_copy_swap(in, out);
default:
im_error("im_copy_from",
_("bad architecture: %d"), architecture);
return -1;
}
}
/* Check whether arch corresponds to native byte order.
*/
gboolean
im_isnative(im_arch_type arch)
{
switch (arch) {
case IM_ARCH_NATIVE:
return TRUE;
case IM_ARCH_BYTE_SWAPPED:
return FALSE;
case IM_ARCH_LSB_FIRST:
return !im_amiMSBfirst();
case IM_ARCH_MSB_FIRST:
return im_amiMSBfirst();
default:
g_assert(0);
}
/* Keep -Wall happy.
*/
return -1;
}
int
im_iterate(IMAGE *im,
im_start_fn start, im_generate_fn generate, im_stop_fn stop,
void *b, void *c)
{
return vips_sink(im, start, (VipsGenerateFn) generate, stop, b, c);
}
int
im_render_priority(IMAGE *in, IMAGE *out, IMAGE *mask,
int width, int height, int max,
int priority,
notify_fn notify, void *client)
{
return vips_sink_screen(in, out, mask,
width, height, max, priority, notify, client);
}
int
vips_rawsave_fd(VipsImage *in, int fd, ...)
{
va_list ap;
int result;
VipsTarget *target;
if (!(target = vips_target_new_to_descriptor(fd)))
return -1;
va_start(ap, fd);
result = vips_call_split("rawsave_target", ap, in, target);
va_end(ap);
return result;
}
/**
* im_circle:
* @im: image to draw on
* @cx: centre of circle
* @cy: centre of circle
* @radius: circle radius
* @intensity: value to draw
*
* Draws a circle on a 1-band 8-bit image.
*
* This an inplace operation, so @im is changed. It does not thread and will
* not work well as part of a pipeline. On 32-bit machines it will be limited
* to 2GB images.
*
* See also: im_fastline().
*
* Returns: 0 on success, or -1 on error.
*/
int
im_circle(IMAGE *im, int cx, int cy, int radius, int intensity)
{
PEL ink[1];
if (im_rwcheck(im) ||
im_check_uncoded("im_circle", im) ||
im_check_mono("im_circle", im) ||
im_check_format("im_circle", im, IM_BANDFMT_UCHAR))
return -1;
ink[0] = intensity;
return im_draw_circle(im, cx, cy, radius, FALSE, ink);
}
/* A flood blob we can call from nip. Grr! Should be a way to wrap these
* automatically. Maybe nip could do it if it sees a RW image argument?
*/
int
im_flood_copy(IMAGE *in, IMAGE *out, int x, int y, PEL *ink)
{
IMAGE *t;
if (!(t = im_open_local(out, "im_flood_blob_copy", "t")) ||
im_copy(in, t) ||
im_flood(t, x, y, ink, NULL) ||
im_copy(t, out))
return -1;
return 0;
}
int
im_flood_blob_copy(IMAGE *in, IMAGE *out, int x, int y, PEL *ink)
{
IMAGE *t;
if (!(t = im_open_local(out, "im_flood_blob_copy", "t")) ||
im_copy(in, t) ||
im_flood_blob(t, x, y, ink, NULL) ||
im_copy(t, out))
return -1;
return 0;
}
int
im_flood_other_copy(IMAGE *test, IMAGE *mark, IMAGE *out,
int x, int y, int serial)
{
IMAGE *t;
if (!(t = im_open_local(out, "im_flood_other_copy", "t")) ||
im_copy(mark, t) ||
im_flood_other(test, t, x, y, serial, NULL) ||
im_copy(t, out))
return -1;
return 0;
}
int
im_paintrect(IMAGE *im, Rect *r, PEL *ink)
{
return im_draw_rect(im,
r->left, r->top, r->width, r->height, 1, ink);
}
int
im_insertplace(IMAGE *main, IMAGE *sub, int x, int y)
{
return im_draw_image(main, sub, x, y);
}
int
im_fastline(IMAGE *im, int x1, int y1, int x2, int y2, PEL *pel)
{
return im_draw_line(im, x1, y1, x2, y2, pel);
}
int
im_fastlineuser(IMAGE *im,
int x1, int y1, int x2, int y2,
VipsPlotFn fn, void *client1, void *client2, void *client3)
{
return im_draw_line_user(im, x1, y1, x2, y2,
fn, client1, client2, client3);
}
int
im_plotmask(IMAGE *im, int ix, int iy, PEL *ink, PEL *mask, Rect *r)
{
IMAGE *mask_im;
if (!(mask_im = im_image(mask,
r->width, r->height, 1, IM_BANDFMT_UCHAR)))
return -1;
if (im_draw_mask(im, mask_im, ix + r->left, iy + r->top, ink)) {
im_close(mask_im);
return -1;
}
im_close(mask_im);
return 0;
}
int
im_readpoint(IMAGE *im, int x, int y, PEL *pel)
{
return im_read_point(im, x, y, pel);
}
int
im_plotpoint(IMAGE *im, int x, int y, PEL *pel)
{
return im_draw_point(im, x, y, pel);
}
/* Smear a section of an IMAGE. As above, but shift it left a bit.
*/
int
im_smear(IMAGE *im, int ix, int iy, Rect *r)
{
int x, y, a, b, c;
int ba = im->Bands;
int el = ba * im->Xsize;
Rect area, image, clipped;
double total[256];
if (im_rwcheck(im))
return -1;
/* Don't do the margins.
*/
area = *r;
area.left += ix;
area.top += iy;
image.left = 0;
image.top = 0;
image.width = im->Xsize;
image.height = im->Ysize;
im_rect_marginadjust(&image, -1);
image.left--;
im_rect_intersectrect(&area, &image, &clipped);
/* Any left?
*/
if (im_rect_isempty(&clipped))
return 0;
/* What we do for each type.
*/
#define SMEAR(TYPE) \
for (y = clipped.top; y < clipped.top + clipped.height; y++) \
for (x = clipped.left; \
x < clipped.left + clipped.width; x++) { \
TYPE *to = (TYPE *) im->data + x * ba + y * el; \
TYPE *from = to - el; \
TYPE *f; \
\
for (a = 0; a < ba; a++) \
total[a] = 0.0; \
\
for (a = 0; a < 3; a++) { \
f = from; \
for (b = 0; b < 3; b++) \
for (c = 0; c < ba; c++) \
total[c] += *f++; \
from += el; \
} \
\
for (a = 0; a < ba; a++) \
to[a] = (40 * (double) to[a + ba] + total[a]) / 49.0; \
}
/* Loop through the remaining pixels.
*/
switch (im->BandFmt) {
case IM_BANDFMT_UCHAR:
SMEAR(unsigned char);
break;
case IM_BANDFMT_CHAR:
SMEAR(char);
break;
case IM_BANDFMT_USHORT:
SMEAR(unsigned short);
break;
case IM_BANDFMT_SHORT:
SMEAR(short);
break;
case IM_BANDFMT_UINT:
SMEAR(unsigned int);
break;
case IM_BANDFMT_INT:
SMEAR(int);
break;
case IM_BANDFMT_FLOAT:
SMEAR(float);
break;
case IM_BANDFMT_DOUBLE:
SMEAR(double);
break;
/* Do complex types too. Just treat as float and double, but with
* twice the number of bands.
*/
case IM_BANDFMT_COMPLEX:
/* Twice number of bands: double size and bands.
*/
ba *= 2;
el *= 2;
SMEAR(float);
break;
case IM_BANDFMT_DPCOMPLEX:
/* Twice number of bands: double size and bands.
*/
ba *= 2;
el *= 2;
SMEAR(double);
break;
default:
im_error("im_smear", "%s", _("unknown band format"));
return -1;
}
return 0;
}
int
im_smudge(VipsImage *image, int ix, int iy, Rect *r)
{
return im_draw_smudge(image,
r->left + ix, r->top + iy, r->width, r->height);
}
int
im_flood(IMAGE *im, int x, int y, PEL *ink, Rect *dout)
{
return im_draw_flood(im, x, y, ink, dout);
}
int
im_flood_blob(IMAGE *im, int x, int y, PEL *ink, Rect *dout)
{
return im_draw_flood_blob(im, x, y, ink, dout);
}
int
im_flood_other(IMAGE *test, IMAGE *mark,
int x, int y, int serial, Rect *dout)
{
return im_draw_flood_other(mark, test, x, y, serial, dout);
}
int
vips_check_coding_rad(const char *domain, VipsImage *im)
{
return vips_check_coding(domain, im, VIPS_CODING_RAD);
}
int
vips_check_coding_labq(const char *domain, VipsImage *im)
{
return vips_check_coding(domain, im, VIPS_CODING_LABQ);
}
int
vips_check_bands_3ormore(const char *domain, VipsImage *im)
{
return vips_check_bands_atleast(domain, im, 3);
}
/* The old vips_info() stuff, now replaced by g_warning() / g_info().
*/
int vips__info = 0;
void
vips_info_set(gboolean info)
{
vips__info = info;
if (info) {
const char *old;
char *new;
old = g_getenv("G_MESSAGES_DEBUG");
if (!old)
old = "";
new = g_strdup_printf("%s VIPS", old);
g_setenv("G_MESSAGES_DEBUG", new, TRUE);
g_free(new);
}
}
void
vips_vinfo(const char *domain, const char *fmt, va_list ap)
{
if (vips__info) {
g_mutex_lock(vips__global_lock);
(void) fprintf(stderr, _("%s: "), _("info"));
if (domain)
(void) fprintf(stderr, _("%s: "), domain);
(void) vfprintf(stderr, fmt, ap);
(void) fprintf(stderr, "\n");
g_mutex_unlock(vips__global_lock);
}
}
void
vips_info(const char *domain, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vips_vinfo(domain, fmt, ap);
va_end(ap);
}
void
vips_vwarn(const char *domain, const char *fmt, va_list ap)
{
if (!g_getenv("IM_WARNING") &&
!g_getenv("VIPS_WARNING")) {
g_mutex_lock(vips__global_lock);
(void) fprintf(stderr, _("%s: "), _("vips warning"));
if (domain)
(void) fprintf(stderr, _("%s: "), domain);
(void) vfprintf(stderr, fmt, ap);
(void) fprintf(stderr, "\n");
g_mutex_unlock(vips__global_lock);
}
if (vips__fatal)
vips_error_exit("vips__fatal");
}
void
vips_warn(const char *domain, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vips_vwarn(domain, fmt, ap);
va_end(ap);
}
/**
* vips_autorot_get_angle:
* @image: image to fetch orientation from
*
* This function is deprecated. Use vips_autorot() instead.
*/
VipsAngle
vips_autorot_get_angle(VipsImage *im)
{
return VIPS_ANGLE_D0;
}
/* The old vips_free(), now replaced by g_free() and vips_area_free_cb().
*/
int
vips_free(void *buf)
{
g_free(buf);
return 0;
}
/* Use vips_thread_isvips() instead.
*/
gboolean
vips_thread_isworker(void)
{
return vips_thread_isvips();
}
/**
* vips_cache_operation_add: (skip)
*
* No longer in the public API.
*/
void
vips_cache_operation_add(VipsOperation *operation)
{
}
/**
* vips_cache_operation_lookup: (skip)
*
* No longer in the public API.
*/
VipsOperation *
vips_cache_operation_lookup(VipsOperation *operation)
{
return NULL;
}
/**
* vips_target_finish:
* @target: target to operate on
* @buffer: bytes to write
* @length: length of @buffer in bytes
*
* Deprecated in favour of vips_target_end().
*/
void
vips_target_finish(VipsTarget *target)
{
(void) vips_target_end(target);
}
/* Use g_strlcpy() instead.
*/
char *
vips_strncpy(char *dest, const char *src, int n)
{
(void) g_strlcpy(dest, src, n);
return dest;
}
/* Use g_strrstr() instead.
*/
char *
vips_strrstr(const char *haystack, const char *needle)
{
return g_strrstr(haystack, needle);
}
/* Use g_str_has_suffix() instead.
*/
gboolean
vips_ispostfix(const char *a, const char *b)
{
return g_str_has_suffix(a, b);
}
/* Use g_vsnprintf() instead.
*/
int
vips_vsnprintf(char *str, size_t size, const char *format, va_list ap)
{
return g_vsnprintf(str, size, format, ap);
}
/* Use g_snprintf() instead.
*/
int
vips_snprintf(char *str, size_t size, const char *format, ...)
{
va_list ap;
int n;
va_start(ap, format);
n = g_vsnprintf(str, size, format, ap);
va_end(ap);
return n;
}
|