XBPS Library API 20240111
The X Binary Package System
proplib_wrapper.c
1/*-
2 * Copyright (c) 2013-2015 Juan Romero Pardines.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <stdio.h>
27#include <stdbool.h>
28#include <stdlib.h>
29#include <string.h>
30#include <errno.h>
31
32#include "xbps_api_impl.h"
33#include <prop/proplib.h>
34
35/* prop_array */
36
37xbps_array_t
38xbps_array_create(void)
39{
40 return prop_array_create();
41}
42
43xbps_array_t
44xbps_array_create_with_capacity(unsigned int capacity)
45{
46 return prop_array_create_with_capacity(capacity);
47}
48
49xbps_array_t
50xbps_array_copy(xbps_array_t a)
51{
52 return prop_array_copy(a);
53}
54
55xbps_array_t
56xbps_array_copy_mutable(xbps_array_t a)
57{
58 return prop_array_copy_mutable(a);
59}
60
61unsigned int
62xbps_array_capacity(xbps_array_t a)
63{
64 return prop_array_capacity(a);
65}
66
67unsigned int
68xbps_array_count(xbps_array_t a)
69{
70 return prop_array_count(a);
71}
72
73bool
74xbps_array_ensure_capacity(xbps_array_t a, unsigned int i)
75{
76 return prop_array_ensure_capacity(a, i);
77}
78
79void
80xbps_array_make_immutable(xbps_array_t a)
81{
82 prop_array_make_immutable(a);
83}
84
85bool
86xbps_array_mutable(xbps_array_t a)
87{
88 return prop_array_mutable(a);
89}
90
91xbps_object_iterator_t
92xbps_array_iterator(xbps_array_t a)
93{
94 return prop_array_iterator(a);
95}
96
97xbps_object_t
98xbps_array_get(xbps_array_t a, unsigned int i)
99{
100 return prop_array_get(a, i);
101}
102
103bool
104xbps_array_set(xbps_array_t a, unsigned int i, xbps_object_t obj)
105{
106 return prop_array_set(a, i, obj);
107}
108
109bool
110xbps_array_add(xbps_array_t a, xbps_object_t obj)
111{
112 return prop_array_add(a, obj);
113}
114
115bool
116xbps_array_add_first(xbps_array_t a, xbps_object_t obj)
117{
118 return prop_array_add_first(a, obj);
119}
120
121void
122xbps_array_remove(xbps_array_t a, unsigned int i)
123{
124 prop_array_remove(a, i);
125}
126
127bool
128xbps_array_equals(xbps_array_t a, xbps_array_t b)
129{
130 return prop_array_equals(a, b);
131}
132
133char *
134xbps_array_externalize(xbps_array_t a)
135{
136 return prop_array_externalize(a);
137}
138
139xbps_array_t
140xbps_array_internalize(const char *s)
141{
142 return prop_array_internalize(s);
143}
144
145bool
146xbps_array_externalize_to_file(xbps_array_t a, const char *s)
147{
148 return prop_array_externalize_to_file(a, s);
149}
150
151bool
152xbps_array_externalize_to_zfile(xbps_array_t a, const char *s)
153{
154 return prop_array_externalize_to_zfile(a, s);
155}
156
157xbps_array_t
158xbps_array_internalize_from_file(const char *s)
159{
160 return prop_array_internalize_from_file(s);
161}
162
163xbps_array_t
164xbps_array_internalize_from_zfile(const char *s)
165{
166 return prop_array_internalize_from_zfile(s);
167}
168
169/*
170 * Utility routines to make it more convenient to work with values
171 * stored in dictionaries.
172 */
173bool
174xbps_array_get_bool(xbps_array_t a, unsigned int i, bool *b)
175{
176 return prop_array_get_bool(a, i, b);
177}
178
179bool
180xbps_array_set_bool(xbps_array_t a, unsigned int i, bool b)
181{
182 return prop_array_set_bool(a, i, b);
183}
184
185bool
186xbps_array_get_int8(xbps_array_t a, unsigned int i, int8_t *v)
187{
188 return prop_array_get_int8(a, i, v);
189}
190
191bool
192xbps_array_get_uint8(xbps_array_t a, unsigned int i, uint8_t *v)
193{
194 return prop_array_get_uint8(a, i, v);
195}
196
197bool
198xbps_array_set_int8(xbps_array_t a, unsigned int i, int8_t v)
199{
200 return prop_array_set_int8(a, i, v);
201}
202
203bool
204xbps_array_set_uint8(xbps_array_t a, unsigned int i, uint8_t v)
205{
206 return prop_array_set_uint8(a, i, v);
207}
208
209bool
210xbps_array_get_int16(xbps_array_t a, unsigned int i, int16_t *v)
211{
212 return prop_array_get_int16(a, i, v);
213}
214
215bool
216xbps_array_get_uint16(xbps_array_t a, unsigned int i, uint16_t *v)
217{
218 return prop_array_get_uint16(a, i, v);
219}
220
221bool
222xbps_array_set_int16(xbps_array_t a, unsigned int i, int16_t v)
223{
224 return prop_array_set_int16(a, i, v);
225}
226
227bool
228xbps_array_set_uint16(xbps_array_t a, unsigned int i, uint16_t v)
229{
230 return prop_array_set_uint16(a, i, v);
231}
232
233bool
234xbps_array_get_int32(xbps_array_t a, unsigned int i, int32_t *v)
235{
236 return prop_array_get_int32(a, i, v);
237}
238
239bool
240xbps_array_get_uint32(xbps_array_t a, unsigned int i, uint32_t *v)
241{
242 return prop_array_get_uint32(a, i, v);
243}
244
245bool
246xbps_array_set_int32(xbps_array_t a, unsigned int i, int32_t v)
247{
248 return prop_array_set_int32(a, i, v);
249}
250
251bool
252xbps_array_set_uint32(xbps_array_t a, unsigned int i, uint32_t v)
253{
254 return prop_array_set_uint32(a, i, v);
255}
256
257bool
258xbps_array_get_int64(xbps_array_t a, unsigned int i, int64_t *v)
259{
260 return prop_array_get_int64(a, i, v);
261}
262
263bool
264xbps_array_get_uint64(xbps_array_t a, unsigned int i, uint64_t *v)
265{
266 return prop_array_get_uint64(a, i, v);
267}
268
269bool
270xbps_array_set_int64(xbps_array_t a, unsigned int i, int64_t v)
271{
272 return prop_array_set_int64(a, i, v);
273}
274
275bool
276xbps_array_set_uint64(xbps_array_t a, unsigned int i, uint64_t v)
277{
278 return prop_array_set_uint64(a, i, v);
279}
280
281bool
282xbps_array_add_int8(xbps_array_t a, int8_t v)
283{
284 return prop_array_add_int8(a, v);
285}
286
287bool
288xbps_array_add_uint8(xbps_array_t a, uint8_t v)
289{
290 return prop_array_add_uint8(a, v);
291}
292
293bool
294xbps_array_add_int16(xbps_array_t a, int16_t v)
295{
296 return prop_array_add_int16(a, v);
297}
298
299bool
300xbps_array_add_uint16(xbps_array_t a, uint16_t v)
301{
302 return prop_array_add_uint16(a, v);
303}
304
305bool
306xbps_array_add_int32(xbps_array_t a, int32_t v)
307{
308 return prop_array_add_int32(a, v);
309}
310
311bool
312xbps_array_add_uint32(xbps_array_t a, uint32_t v)
313{
314 return prop_array_add_uint32(a, v);
315}
316
317bool
318xbps_array_add_int64(xbps_array_t a, int64_t v)
319{
320 return prop_array_add_int64(a, v);
321}
322
323bool
324xbps_array_add_uint64(xbps_array_t a, uint64_t v)
325{
326 return prop_array_add_uint64(a, v);
327}
328
329bool
330xbps_array_get_cstring(xbps_array_t a, unsigned int i, char **s)
331{
332 return prop_array_get_cstring(a, i, s);
333}
334
335bool
336xbps_array_set_cstring(xbps_array_t a, unsigned int i, const char *s)
337{
338 return prop_array_set_cstring(a, i, s);
339}
340
341bool
342xbps_array_add_cstring(xbps_array_t a, const char *s)
343{
344 return prop_array_add_cstring(a, s);
345}
346
347bool
348xbps_array_add_cstring_nocopy(xbps_array_t a, const char *s)
349{
350 return prop_array_add_cstring_nocopy(a, s);
351}
352
353bool
354xbps_array_get_cstring_nocopy(xbps_array_t a, unsigned int i, const char **s)
355{
356 return prop_array_get_cstring_nocopy(a, i, s);
357}
358
359bool
360xbps_array_set_cstring_nocopy(xbps_array_t a, unsigned int i, const char *s)
361{
362 return prop_array_set_cstring_nocopy(a, i, s);
363}
364
365bool
366xbps_array_add_and_rel(xbps_array_t a, xbps_object_t o)
367{
368 return prop_array_add_and_rel(a, o);
369}
370
371/* prop_bool */
372
373xbps_bool_t
374xbps_bool_create(bool v)
375{
376 return prop_bool_create(v);
377}
378
379xbps_bool_t
380xbps_bool_copy(xbps_bool_t b)
381{
382 return prop_bool_copy(b);
383}
384
385bool
386xbps_bool_true(xbps_bool_t b)
387{
388 return prop_bool_true(b);
389}
390
391bool
392xbps_bool_equals(xbps_bool_t a, xbps_bool_t b)
393{
394 return prop_bool_equals(a, b);
395}
396
397/* prop_data */
398
399xbps_data_t
400xbps_data_create_data(const void *v, size_t s)
401{
402 return prop_data_create_data(v, s);
403}
404
405xbps_data_t
406xbps_data_create_data_nocopy(const void *v, size_t s)
407{
408 return prop_data_create_data_nocopy(v, s);
409}
410
411xbps_data_t
412xbps_data_copy(xbps_data_t d)
413{
414 return prop_data_copy(d);
415}
416
417size_t
418xbps_data_size(xbps_data_t d)
419{
420 return prop_data_size(d);
421}
422
423void *
424xbps_data_data(xbps_data_t d)
425{
426 return prop_data_data(d);
427}
428
429const void *
430xbps_data_data_nocopy(xbps_data_t d)
431{
432 return prop_data_data_nocopy(d);
433}
434
435bool
436xbps_data_equals(xbps_data_t a, xbps_data_t b)
437{
438 return prop_data_equals(a, b);
439}
440
441bool
442xbps_data_equals_data(xbps_data_t d, const void *v, size_t s)
443{
444 return prop_data_equals_data(d, v, s);
445}
446
447/* prop_dictionary */
448
449xbps_dictionary_t
450xbps_dictionary_create(void)
451{
452 return prop_dictionary_create();
453}
454
455xbps_dictionary_t
456xbps_dictionary_create_with_capacity(unsigned int i)
457{
458 return prop_dictionary_create_with_capacity(i);
459}
460
461xbps_dictionary_t
462xbps_dictionary_copy(xbps_dictionary_t d)
463{
464 return prop_dictionary_copy(d);
465}
466
467xbps_dictionary_t
468xbps_dictionary_copy_mutable(xbps_dictionary_t d)
469{
470 return prop_dictionary_copy_mutable(d);
471}
472
473unsigned int
474xbps_dictionary_count(xbps_dictionary_t d)
475{
476 return prop_dictionary_count(d);
477}
478
479bool
480xbps_dictionary_ensure_capacity(xbps_dictionary_t d, unsigned int i)
481{
482 return prop_dictionary_ensure_capacity(d, i);
483}
484
485void
486xbps_dictionary_make_immutable(xbps_dictionary_t d)
487{
488 prop_dictionary_make_immutable(d);
489}
490
491xbps_object_iterator_t
492xbps_dictionary_iterator(xbps_dictionary_t d)
493{
494 return prop_dictionary_iterator(d);
495}
496
497xbps_array_t
498xbps_dictionary_all_keys(xbps_dictionary_t d)
499{
500 return prop_dictionary_all_keys(d);
501}
502
503xbps_object_t
504xbps_dictionary_get(xbps_dictionary_t d, const char *s)
505{
506 return prop_dictionary_get(d, s);
507}
508
509bool
510xbps_dictionary_set(xbps_dictionary_t d, const char *s, xbps_object_t o)
511{
512 return prop_dictionary_set(d, s, o);
513}
514
515void
516xbps_dictionary_remove(xbps_dictionary_t d, const char *s)
517{
518 prop_dictionary_remove(d, s);
519}
520
521xbps_object_t
522xbps_dictionary_get_keysym(xbps_dictionary_t d, xbps_dictionary_keysym_t k)
523{
524 return prop_dictionary_get_keysym(d, k);
525}
526
527bool
528xbps_dictionary_set_keysym(xbps_dictionary_t d, xbps_dictionary_keysym_t k,
529 xbps_object_t o)
530{
531 return prop_dictionary_set_keysym(d, k, o);
532}
533
534void
535xbps_dictionary_remove_keysym(xbps_dictionary_t d, xbps_dictionary_keysym_t k)
536{
537 prop_dictionary_remove_keysym(d, k);
538}
539
540bool
541xbps_dictionary_equals(xbps_dictionary_t a, xbps_dictionary_t b)
542{
543 return prop_dictionary_equals(a, b);
544}
545
546char *
547xbps_dictionary_externalize(xbps_dictionary_t d)
548{
549 return prop_dictionary_externalize(d);
550}
551
552xbps_dictionary_t
553xbps_dictionary_internalize(const char *s)
554{
555 return prop_dictionary_internalize(s);
556}
557
558bool
559xbps_dictionary_externalize_to_file(xbps_dictionary_t d, const char *s)
560{
561 return prop_dictionary_externalize_to_file(d, s);
562}
563
564bool
565xbps_dictionary_externalize_to_zfile(xbps_dictionary_t d, const char *s)
566{
567 return prop_dictionary_externalize_to_zfile(d, s);
568}
569
570xbps_dictionary_t
571xbps_dictionary_internalize_from_file(const char *s)
572{
573 return prop_dictionary_internalize_from_file(s);
574}
575
576xbps_dictionary_t
577xbps_dictionary_internalize_from_zfile(const char *s)
578{
579 return prop_dictionary_internalize_from_zfile(s);
580}
581
582const char *
583xbps_dictionary_keysym_cstring_nocopy(xbps_dictionary_keysym_t k)
584{
585 return prop_dictionary_keysym_cstring_nocopy(k);
586}
587
588bool
589xbps_dictionary_keysym_equals(xbps_dictionary_keysym_t a, xbps_dictionary_keysym_t b)
590{
591 return prop_dictionary_keysym_equals(a, b);
592}
593
594/*
595 * Utility routines to make it more convenient to work with values
596 * stored in dictionaries.
597 */
598bool
599xbps_dictionary_get_dict(xbps_dictionary_t d, const char *s,
600 xbps_dictionary_t *rd)
601{
602 return prop_dictionary_get_dict(d, s, rd);
603}
604
605bool
606xbps_dictionary_get_bool(xbps_dictionary_t d, const char *s, bool *b)
607{
608 return prop_dictionary_get_bool(d, s, b);
609}
610
611bool
612xbps_dictionary_set_bool(xbps_dictionary_t d, const char *s, bool b)
613{
614 return prop_dictionary_set_bool(d, s, b);
615}
616
617bool
618xbps_dictionary_get_int8(xbps_dictionary_t d, const char *s, int8_t *v)
619{
620 return prop_dictionary_get_int8(d, s, v);
621}
622
623bool
624xbps_dictionary_get_uint8(xbps_dictionary_t d, const char *s, uint8_t *v)
625{
626 return prop_dictionary_get_uint8(d, s, v);
627}
628
629bool
630xbps_dictionary_set_int8(xbps_dictionary_t d, const char *s, int8_t v)
631{
632 return prop_dictionary_set_int8(d, s, v);
633}
634
635bool
636xbps_dictionary_set_uint8(xbps_dictionary_t d, const char *s, uint8_t v)
637{
638 return prop_dictionary_set_uint8(d, s, v);
639}
640
641bool
642xbps_dictionary_get_int16(xbps_dictionary_t d, const char *s, int16_t *v)
643{
644 return prop_dictionary_get_int16(d, s, v);
645}
646
647bool
648xbps_dictionary_get_uint16(xbps_dictionary_t d, const char *s, uint16_t *v)
649{
650 return prop_dictionary_get_uint16(d, s, v);
651}
652
653bool
654xbps_dictionary_set_int16(xbps_dictionary_t d, const char *s, int16_t v)
655{
656 return prop_dictionary_set_int16(d, s, v);
657}
658
659bool
660xbps_dictionary_set_uint16(xbps_dictionary_t d, const char *s, uint16_t v)
661{
662 return prop_dictionary_set_uint16(d, s, v);
663}
664
665bool
666xbps_dictionary_get_int32(xbps_dictionary_t d, const char *s, int32_t *v)
667{
668 return prop_dictionary_get_int32(d, s, v);
669}
670
671bool
672xbps_dictionary_get_uint32(xbps_dictionary_t d, const char *s, uint32_t *v)
673{
674 return prop_dictionary_get_uint32(d, s, v);
675}
676
677bool
678xbps_dictionary_set_int32(xbps_dictionary_t d, const char *s, int32_t v)
679{
680 return prop_dictionary_set_int32(d, s, v);
681}
682
683bool
684xbps_dictionary_set_uint32(xbps_dictionary_t d, const char *s, uint32_t v)
685{
686 return prop_dictionary_set_uint32(d, s, v);
687}
688
689bool
690xbps_dictionary_get_int64(xbps_dictionary_t d, const char *s, int64_t *v)
691{
692 return prop_dictionary_get_int64(d, s, v);
693}
694
695bool
696xbps_dictionary_get_uint64(xbps_dictionary_t d, const char *s, uint64_t *v)
697{
698 return prop_dictionary_get_uint64(d, s, v);
699}
700
701bool
702xbps_dictionary_set_int64(xbps_dictionary_t d, const char *s, int64_t v)
703{
704 return prop_dictionary_set_int64(d, s, v);
705}
706
707bool
708xbps_dictionary_set_uint64(xbps_dictionary_t d, const char *s, uint64_t v)
709{
710 return prop_dictionary_set_uint64(d, s, v);
711}
712
713bool
714xbps_dictionary_get_cstring(xbps_dictionary_t d, const char *s, char **ss)
715{
716 return prop_dictionary_get_cstring(d, s, ss);
717}
718
719bool
720xbps_dictionary_set_cstring(xbps_dictionary_t d, const char *s, const char *ss)
721{
722 return prop_dictionary_set_cstring(d, s, ss);
723}
724
725bool
726xbps_dictionary_get_cstring_nocopy(xbps_dictionary_t d, const char *s, const char **ss)
727{
728 return prop_dictionary_get_cstring_nocopy(d, s, ss);
729}
730
731bool
732xbps_dictionary_set_cstring_nocopy(xbps_dictionary_t d, const char *s, const char *ss)
733{
734 return prop_dictionary_set_cstring_nocopy(d, s, ss);
735}
736
737bool
738xbps_dictionary_set_and_rel(xbps_dictionary_t d, const char *s, xbps_object_t o)
739{
740 return prop_dictionary_set_and_rel(d, s, o);
741}
742
743/* prop_number */
744
745xbps_number_t
746xbps_number_create_integer(int64_t v)
747{
748 return prop_number_create_integer(v);
749}
750
751xbps_number_t
752xbps_number_create_unsigned_integer(uint64_t v)
753{
754 return prop_number_create_unsigned_integer(v);
755}
756
757xbps_number_t
758xbps_number_copy(xbps_number_t n)
759{
760 return prop_number_copy(n);
761}
762
763int
764xbps_number_size(xbps_number_t n)
765{
766 return prop_number_size(n);
767}
768
769bool
770xbps_number_unsigned(xbps_number_t n)
771{
772 return prop_number_unsigned(n);
773}
774
775int64_t
776xbps_number_integer_value(xbps_number_t n)
777{
778 return prop_number_integer_value(n);
779}
780
781uint64_t
782xbps_number_unsigned_integer_value(xbps_number_t n)
783{
784 return prop_number_unsigned_integer_value(n);
785}
786
787bool
788xbps_number_equals(xbps_number_t n, xbps_number_t nn)
789{
790 return prop_number_equals(n, nn);
791}
792
793bool
794xbps_number_equals_integer(xbps_number_t n, int64_t v)
795{
796 return prop_number_equals_integer(n, v);
797}
798
799bool
800xbps_number_equals_unsigned_integer(xbps_number_t n, uint64_t v)
801{
802 return prop_number_equals_unsigned_integer(n, v);
803}
804
805/* prop_object */
806
807void
808xbps_object_retain(xbps_object_t o)
809{
810 prop_object_retain(o);
811}
812
813void
814xbps_object_release(xbps_object_t o)
815{
816 prop_object_release(o);
817}
818
819xbps_type_t
820xbps_object_type(xbps_object_t o)
821{
822 return (xbps_type_t)prop_object_type(o);
823}
824
825bool
826xbps_object_equals(xbps_object_t o, xbps_object_t oo)
827{
828 return prop_object_equals(o, oo);
829}
830
831bool
832xbps_object_equals_with_error(xbps_object_t o, xbps_object_t oo, bool *b)
833{
834 return prop_object_equals_with_error(o, oo, b);
835}
836
837xbps_object_t
838xbps_object_iterator_next(xbps_object_iterator_t o)
839{
840 return prop_object_iterator_next(o);
841}
842
843void
844xbps_object_iterator_reset(xbps_object_iterator_t o)
845{
846 prop_object_iterator_reset(o);
847}
848
849void
850xbps_object_iterator_release(xbps_object_iterator_t o)
851{
852 prop_object_iterator_release(o);
853}
854
855/* prop_string */
856
857xbps_string_t
858xbps_string_create(void)
859{
860 return prop_string_create();
861}
862
863xbps_string_t
864xbps_string_create_cstring(const char *s)
865{
866 return prop_string_create_cstring(s);
867}
868
869xbps_string_t
870xbps_string_create_cstring_nocopy(const char *s)
871{
872 return prop_string_create_cstring_nocopy(s);
873}
874
875xbps_string_t
876xbps_string_copy(xbps_string_t s)
877{
878 return prop_string_copy(s);
879}
880
881xbps_string_t
882xbps_string_copy_mutable(xbps_string_t s)
883{
884 return prop_string_copy_mutable(s);
885}
886
887size_t
888xbps_string_size(xbps_string_t s)
889{
890 return prop_string_size(s);
891}
892
893bool
894xbps_string_mutable(xbps_string_t s)
895{
896 return prop_string_mutable(s);
897}
898
899char *
900xbps_string_cstring(xbps_string_t s)
901{
902 return prop_string_cstring(s);
903}
904
905const char *
906xbps_string_cstring_nocopy(xbps_string_t s)
907{
908 return prop_string_cstring_nocopy(s);
909}
910
911bool
912xbps_string_append(xbps_string_t s, xbps_string_t ss)
913{
914 return prop_string_append(s, ss);
915}
916
917bool
918xbps_string_append_cstring(xbps_string_t s, const char *ss)
919{
920 return prop_string_append_cstring(s, ss);
921}
922
923bool
924xbps_string_equals(xbps_string_t s, xbps_string_t ss)
925{
926 return prop_string_equals(s, ss);
927}
928
929bool
930xbps_string_equals_cstring(xbps_string_t s, const char *ss)
931{
932 return prop_string_equals_cstring(s, ss);
933}
934
935/* xbps specific helpers */
936xbps_array_t
938{
939 xbps_array_t a;
940
941 a = xbps_array_internalize_from_zfile(path);
942 if (xbps_object_type(a) != XBPS_TYPE_ARRAY) {
943 xbps_dbg_printf(
944 "xbps: failed to internalize array from %s\n", path);
945 }
946 return a;
947}
948
949xbps_dictionary_t
951{
952 xbps_dictionary_t d;
953
954 d = xbps_dictionary_internalize_from_zfile(path);
955 if (xbps_object_type(d) != XBPS_TYPE_DICTIONARY) {
956 xbps_dbg_printf(
957 "xbps: failed to internalize dict from %s\n", path);
958 }
959 return d;
960}
xbps_dictionary_t xbps_plist_dictionary_from_file(const char *path)
xbps_array_t xbps_plist_array_from_file(const char *path)