~ubuntu-branches/ubuntu/raring/parrot/raring-proposed

« back to all changes in this revision

Viewing changes to include/parrot/io.h

  • Committer: Bazaar Package Importer
  • Author(s): Allison Randal
  • Date: 2011-07-30 18:45:03 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20110730184503-34d4mprtfx6pt5h3
Tags: 3.6.0-1
* New upstream release
* debian/watch:
  - Modified regular expression to capture numbered directory name
    (patch from Dominique Dumont).
* debian/rules:
  - Split build-arch and build-indep, resolving lintian warning.
  - Update path to pbc_disassemble for manpage generation (patch
    from Dominique Dumont).
* debian/patches:
  - Added patch 02_fix_perl_interpreter_path.patch, resolving
    lintian warnings.
* debian/control:
  - Added DM-Upload-Allowed field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
110
110
 
111
111
PARROT_EXPORT
112
 
INTVAL Parrot_io_close_handle(PARROT_INTERP, ARGMOD_NULLOK(PMC *pmc))
 
112
INTVAL Parrot_io_close_handle(PARROT_INTERP, ARGMOD(PMC *pmc))
113
113
        __attribute__nonnull__(1)
 
114
        __attribute__nonnull__(2)
114
115
        FUNC_MODIFIES(*pmc);
115
116
 
116
117
PARROT_EXPORT
133
134
PARROT_WARN_UNUSED_RESULT
134
135
PARROT_CANNOT_RETURN_NULL
135
136
PMC * Parrot_io_fdopen(PARROT_INTERP,
136
 
    ARGIN_NULLOK(PMC *pmc),
 
137
    ARGIN(PMC *pmc),
137
138
    PIOHANDLE fd,
138
139
    ARGIN(STRING *sflags))
139
140
        __attribute__nonnull__(1)
 
141
        __attribute__nonnull__(2)
140
142
        __attribute__nonnull__(4);
141
143
 
142
144
PARROT_EXPORT
143
145
PARROT_WARN_UNUSED_RESULT
144
146
PARROT_CANNOT_RETURN_NULL
145
147
PMC * Parrot_io_fdopen_flags(PARROT_INTERP,
146
 
    ARGMOD_NULLOK(PMC *filehandle),
 
148
    ARGMOD(PMC *filehandle),
147
149
    PIOHANDLE fd,
148
150
    INTVAL flags)
149
151
        __attribute__nonnull__(1)
 
152
        __attribute__nonnull__(2)
150
153
        FUNC_MODIFIES(*filehandle);
151
154
 
152
155
PARROT_EXPORT
153
 
void Parrot_io_flush_handle(PARROT_INTERP, ARGMOD_NULLOK(PMC *pmc))
 
156
void Parrot_io_flush_handle(PARROT_INTERP, ARGMOD(PMC *pmc))
154
157
        __attribute__nonnull__(1)
 
158
        __attribute__nonnull__(2)
155
159
        FUNC_MODIFIES(*pmc);
156
160
 
157
161
PARROT_EXPORT
196
200
PARROT_WARN_UNUSED_RESULT
197
201
PARROT_CANNOT_RETURN_NULL
198
202
PMC * Parrot_io_open_handle(PARROT_INTERP,
199
 
    ARGIN_NULLOK(PMC *pmc),
200
 
    ARGIN_NULLOK(STRING *path),
201
 
    ARGIN_NULLOK(STRING *mode))
202
 
        __attribute__nonnull__(1);
 
203
    ARGIN(PMC *pmc),
 
204
    ARGIN(STRING *path),
 
205
    ARGIN(STRING *mode))
 
206
        __attribute__nonnull__(1)
 
207
        __attribute__nonnull__(2)
 
208
        __attribute__nonnull__(3)
 
209
        __attribute__nonnull__(4);
203
210
 
204
211
PARROT_EXPORT
205
212
PARROT_WARN_UNUSED_RESULT
206
213
INTVAL Parrot_io_parse_open_flags(PARROT_INTERP,
207
 
    ARGIN_NULLOK(const STRING *mode_str))
208
 
        __attribute__nonnull__(1);
 
214
    ARGIN(const STRING *mode_str))
 
215
        __attribute__nonnull__(1)
 
216
        __attribute__nonnull__(2);
209
217
 
210
218
PARROT_EXPORT
211
219
PARROT_WARN_UNUSED_RESULT
235
243
        __attribute__nonnull__(2);
236
244
 
237
245
PARROT_EXPORT
238
 
INTVAL Parrot_io_putps(PARROT_INTERP,
239
 
    ARGMOD(PMC *pmc),
240
 
    ARGMOD_NULLOK(STRING *s))
 
246
INTVAL Parrot_io_putps(PARROT_INTERP, ARGMOD(PMC *pmc), ARGMOD(STRING *s))
241
247
        __attribute__nonnull__(1)
242
248
        __attribute__nonnull__(2)
 
249
        __attribute__nonnull__(3)
243
250
        FUNC_MODIFIES(*pmc)
244
251
        FUNC_MODIFIES(*s);
245
252
 
327
334
        FUNC_MODIFIES(*pmc);
328
335
 
329
336
#define ASSERT_ARGS_Parrot_io_close_handle __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
330
 
       PARROT_ASSERT_ARG(interp))
 
337
       PARROT_ASSERT_ARG(interp) \
 
338
    , PARROT_ASSERT_ARG(pmc))
331
339
#define ASSERT_ARGS_Parrot_io_eof __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
332
340
       PARROT_ASSERT_ARG(interp) \
333
341
    , PARROT_ASSERT_ARG(pmc))
335
343
       PARROT_ASSERT_ARG(s))
336
344
#define ASSERT_ARGS_Parrot_io_fdopen __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
337
345
       PARROT_ASSERT_ARG(interp) \
 
346
    , PARROT_ASSERT_ARG(pmc) \
338
347
    , PARROT_ASSERT_ARG(sflags))
339
348
#define ASSERT_ARGS_Parrot_io_fdopen_flags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
340
 
       PARROT_ASSERT_ARG(interp))
 
349
       PARROT_ASSERT_ARG(interp) \
 
350
    , PARROT_ASSERT_ARG(filehandle))
341
351
#define ASSERT_ARGS_Parrot_io_flush_handle __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
342
 
       PARROT_ASSERT_ARG(interp))
 
352
       PARROT_ASSERT_ARG(interp) \
 
353
    , PARROT_ASSERT_ARG(pmc))
343
354
#define ASSERT_ARGS_Parrot_io_fprintf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
344
355
       PARROT_ASSERT_ARG(interp) \
345
356
    , PARROT_ASSERT_ARG(pmc) \
356
367
#define ASSERT_ARGS_Parrot_io_make_offset __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
357
368
#define ASSERT_ARGS_Parrot_io_make_offset32 __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
358
369
#define ASSERT_ARGS_Parrot_io_open_handle __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
359
 
       PARROT_ASSERT_ARG(interp))
 
370
       PARROT_ASSERT_ARG(interp) \
 
371
    , PARROT_ASSERT_ARG(pmc) \
 
372
    , PARROT_ASSERT_ARG(path) \
 
373
    , PARROT_ASSERT_ARG(mode))
360
374
#define ASSERT_ARGS_Parrot_io_parse_open_flags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
361
 
       PARROT_ASSERT_ARG(interp))
 
375
       PARROT_ASSERT_ARG(interp) \
 
376
    , PARROT_ASSERT_ARG(mode_str))
362
377
#define ASSERT_ARGS_Parrot_io_peek __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
363
378
       PARROT_ASSERT_ARG(interp) \
364
379
    , PARROT_ASSERT_ARG(pmc))
370
385
    , PARROT_ASSERT_ARG(s))
371
386
#define ASSERT_ARGS_Parrot_io_putps __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
372
387
       PARROT_ASSERT_ARG(interp) \
373
 
    , PARROT_ASSERT_ARG(pmc))
 
388
    , PARROT_ASSERT_ARG(pmc) \
 
389
    , PARROT_ASSERT_ARG(s))
374
390
#define ASSERT_ARGS_Parrot_io_puts __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
375
391
       PARROT_ASSERT_ARG(interp) \
376
392
    , PARROT_ASSERT_ARG(pmc) \
530
546
PARROT_EXPORT
531
547
PARROT_WARN_UNUSED_RESULT
532
548
PARROT_CAN_RETURN_NULL
533
 
unsigned char * Parrot_io_get_buffer_end(SHIM_INTERP,
 
549
unsigned char * Parrot_io_get_buffer_end(PARROT_INTERP,
534
550
    ARGIN(const PMC *filehandle))
535
551
        __attribute__nonnull__(2);
536
552
 
537
553
PARROT_EXPORT
538
554
PARROT_CAN_RETURN_NULL
539
 
unsigned char * Parrot_io_get_buffer_next(SHIM_INTERP,
 
555
unsigned char * Parrot_io_get_buffer_next(PARROT_INTERP,
540
556
    ARGIN(const PMC *filehandle))
541
557
        __attribute__nonnull__(2);
542
558
 
543
559
PARROT_EXPORT
544
560
PARROT_WARN_UNUSED_RESULT
545
561
PARROT_CAN_RETURN_NULL
546
 
unsigned char * Parrot_io_get_buffer_start(SHIM_INTERP,
 
562
unsigned char * Parrot_io_get_buffer_start(PARROT_INTERP,
547
563
    ARGIN(PMC *filehandle))
548
564
        __attribute__nonnull__(2);
549
565
 
550
566
PARROT_EXPORT
551
567
PARROT_WARN_UNUSED_RESULT
552
 
PIOOFF_T Parrot_io_get_file_position(SHIM_INTERP,
 
568
PIOOFF_T Parrot_io_get_file_position(PARROT_INTERP,
553
569
    ARGIN(const PMC *filehandle))
554
570
        __attribute__nonnull__(2);
555
571
 
556
572
PARROT_EXPORT
557
 
INTVAL Parrot_io_get_flags(SHIM_INTERP, ARGIN(const PMC *filehandle))
 
573
INTVAL Parrot_io_get_flags(PARROT_INTERP, ARGIN(const PMC *filehandle))
558
574
        __attribute__nonnull__(2);
559
575
 
560
576
PARROT_EXPORT
561
577
PARROT_WARN_UNUSED_RESULT
562
 
PIOHANDLE Parrot_io_get_os_handle(SHIM_INTERP, ARGIN(const PMC *filehandle))
 
578
PIOHANDLE Parrot_io_get_os_handle(PARROT_INTERP,
 
579
    ARGIN(const PMC *filehandle))
563
580
        __attribute__nonnull__(2);
564
581
 
565
582
PARROT_EXPORT
569
586
        __attribute__nonnull__(2);
570
587
 
571
588
PARROT_EXPORT
572
 
void Parrot_io_set_file_position(SHIM_INTERP,
 
589
void Parrot_io_set_file_position(PARROT_INTERP,
573
590
    ARGMOD(PMC *filehandle),
574
591
    PIOOFF_T file_pos)
575
592
        __attribute__nonnull__(2)
576
593
        FUNC_MODIFIES(*filehandle);
577
594
 
578
595
PARROT_EXPORT
579
 
void Parrot_io_set_flags(SHIM_INTERP, ARGIN(PMC *filehandle), INTVAL flags)
 
596
void Parrot_io_set_flags(PARROT_INTERP,
 
597
    ARGIN(PMC *filehandle),
 
598
    INTVAL flags)
580
599
        __attribute__nonnull__(2);
581
600
 
582
601
PARROT_EXPORT
583
 
void Parrot_io_set_os_handle(SHIM_INTERP,
 
602
void Parrot_io_set_os_handle(PARROT_INTERP,
584
603
    ARGMOD(PMC *filehandle),
585
604
    PIOHANDLE file_descriptor)
586
605
        __attribute__nonnull__(2)
593
612
        FUNC_MODIFIES(*filehandle);
594
613
 
595
614
PARROT_CAN_RETURN_NULL
596
 
INTVAL Parrot_io_get_buffer_flags(SHIM_INTERP, ARGIN(const PMC *filehandle))
 
615
INTVAL Parrot_io_get_buffer_flags(PARROT_INTERP,
 
616
    ARGIN(const PMC *filehandle))
597
617
        __attribute__nonnull__(2);
598
618
 
599
619
PARROT_CAN_RETURN_NULL
600
620
PARROT_WARN_UNUSED_RESULT
601
 
size_t Parrot_io_get_buffer_size(SHIM_INTERP, ARGIN(const PMC *filehandle))
 
621
size_t Parrot_io_get_buffer_size(PARROT_INTERP,
 
622
    ARGIN(const PMC *filehandle))
602
623
        __attribute__nonnull__(2);
603
624
 
604
625
PARROT_WARN_UNUSED_RESULT
610
631
        __attribute__nonnull__(2)
611
632
        FUNC_MODIFIES(*buf);
612
633
 
613
 
void Parrot_io_set_buffer_end(SHIM_INTERP,
 
634
void Parrot_io_set_buffer_end(PARROT_INTERP,
614
635
    ARGMOD(PMC *filehandle),
615
636
    ARGIN_NULLOK(unsigned char *new_end))
616
637
        __attribute__nonnull__(2)
617
638
        FUNC_MODIFIES(*filehandle);
618
639
 
619
 
void Parrot_io_set_buffer_flags(SHIM_INTERP,
 
640
void Parrot_io_set_buffer_flags(PARROT_INTERP,
620
641
    ARGMOD(PMC *filehandle),
621
642
    INTVAL new_flags)
622
643
        __attribute__nonnull__(2)
623
644
        FUNC_MODIFIES(*filehandle);
624
645
 
625
 
void Parrot_io_set_buffer_next(SHIM_INTERP,
 
646
void Parrot_io_set_buffer_next(PARROT_INTERP,
626
647
    ARGMOD(PMC *filehandle),
627
648
    ARGIN_NULLOK(unsigned char *new_next))
628
649
        __attribute__nonnull__(2)
629
650
        FUNC_MODIFIES(*filehandle);
630
651
 
631
 
void Parrot_io_set_buffer_size(SHIM_INTERP,
 
652
void Parrot_io_set_buffer_size(PARROT_INTERP,
632
653
    ARGMOD(PMC *filehandle),
633
654
    size_t new_size)
634
655
        __attribute__nonnull__(2)
635
656
        FUNC_MODIFIES(*filehandle);
636
657
 
637
 
void Parrot_io_set_buffer_start(SHIM_INTERP,
 
658
void Parrot_io_set_buffer_start(PARROT_INTERP,
638
659
    ARGMOD(PMC *filehandle),
639
660
    ARGIN_NULLOK(unsigned char *new_start))
640
661
        __attribute__nonnull__(2)
776
797
        FUNC_MODIFIES(*socket);
777
798
 
778
799
PARROT_EXPORT
779
 
void Parrot_io_socket_initialize_handle(SHIM_INTERP, ARGMOD(PMC *socket))
 
800
void Parrot_io_socket_initialize_handle(PARROT_INTERP, ARGMOD(PMC *socket))
780
801
        __attribute__nonnull__(2)
781
802
        FUNC_MODIFIES(*socket);
782
803