+XS(_wrap_collapse_braced_alternates) {
+ {
+ GPtrArray *arg1 = (GPtrArray *) 0 ;
+ int argvi = 0;
+ char *result = 0 ;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: collapse_braced_alternates(source);");
+ }
+ {
+ AV *av;
+ guint len;
+ int i;
+
+ if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) {
+ SWIG_exception(SWIG_TypeError, "Expected an arrayref");
+ }
+ av = (AV *)SvRV(ST(0));
+
+ len = av_len(av)+1; /* av_len(av) is like $#av */
+ arg1 = g_ptr_array_sized_new(len);
+ for (i = 0; i < len; i++) {
+ SV **elt = av_fetch(av, i, 0);
+ if (!elt || !SvPOK(*elt)) {
+ SWIG_exception(SWIG_TypeError, "Non-string in arrayref");
+ }
+ g_ptr_array_add(arg1, SvPV_nolen(*elt)); /* TODO: handle unicode here */
+ }
+ }
+ result = (char *)collapse_braced_alternates(arg1);
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+ {
+ g_ptr_array_free(arg1, FALSE);
+ }
+ free((char*)result);
+ XSRETURN(argvi);
+ fail:
+ {
+ g_ptr_array_free(arg1, FALSE);
+ }
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_split_quoted_strings) {
+ {
+ gchar *arg1 = (gchar *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ gchar **result = 0 ;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: split_quoted_strings(string);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "split_quoted_strings" "', argument " "1"" of type '" "gchar const *""'");
+ }
+ arg1 = (gchar *)(buf1);
+ result = (gchar **)split_quoted_strings((char const *)arg1);
+ {
+ gchar **iter;
+
+ if (result) {
+ /* Count the DeviceProperties */
+ EXTEND(SP, g_strv_length(result)); /* make room for return values */
+
+ /* Note that we set ST(argvi) several times. the nature of
+ * SWIG's wrapping is such that incrementing argvi points
+ * ST(argvi) to the next location in perl's argument stack.
+ */
+
+ for (iter = result; *iter; iter++) {
+ ST(argvi) = sv_2mortal(newSVpv(*iter, 0));
+ argvi++;
+ }
+ }
+ }
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_get_fs_usage) {
+ {
+ char *arg1 = (char *) 0 ;
+ struct fs_usage *arg2 = (struct fs_usage *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ struct fs_usage fsu2 ;
+ int argvi = 0;
+ dXSARGS;
+
+ {
+ bzero(&fsu2, sizeof(fsu2));
+ arg2 = &fsu2;
+ }
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: get_fs_usage(file);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_fs_usage" "', argument " "1"" of type '" "char const *""'");
+ }
+ arg1 = (char *)(buf1);
+ get_fs_usage_((char const *)arg1,arg2);
+ ST(argvi) = sv_newmortal();
+ {
+ SV *sv;
+ HV *hv;
+
+ /* if there was an error, assume that fsu_blocksize isn't changed,
+ * and return undef. */
+ if (arg2->fsu_blocksize) {
+ SP += argvi; PUTBACK; /* save the perl stack so amglue_newSVi64 doesn't kill it */
+ hv = (HV *)sv_2mortal((SV *)newHV());
+ hv_store(hv, "blocksize", 9, amglue_newSVi64(arg2->fsu_blocksize), 0);
+ hv_store(hv, "blocks", 6, amglue_newSVi64(arg2->fsu_blocks), 0);
+ hv_store(hv, "bfree", 5, amglue_newSVi64(arg2->fsu_bfree), 0);
+ hv_store(hv, "bavail", 6, amglue_newSVi64(arg2->fsu_bavail), 0);
+ hv_store(hv, "bavail_top_bit_set", 18, newSViv(arg2->fsu_bavail_top_bit_set), 0);
+ hv_store(hv, "files", 5, amglue_newSVi64(arg2->fsu_files), 0);
+ hv_store(hv, "ffree", 5, amglue_newSVi64(arg2->fsu_ffree), 0);
+
+ ST(argvi) = newRV((SV *)hv);
+ SPAGAIN; SP -= argvi;
+ argvi++;
+ }
+ }
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_fsync) {
+ {
+ int arg1 ;
+ int argvi = 0;
+ int result;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: fsync(fd);");
+ }
+ {
+ IO *io = NULL;
+ PerlIO *pio = NULL;
+ int fd = -1;
+
+ if (SvIOK(ST(0))) {
+ /* plain old integer */
+ arg1 = SvIV(ST(0));
+ } else {
+ /* try extracting as filehandle */
+
+ /* note: sv_2io may call die() */
+ io = sv_2io(ST(0));
+ if (io) {
+ pio = IoIFP(io);
+ }
+ if (pio) {
+ fd = PerlIO_fileno(pio);
+ }
+ if (fd >= 0) {
+ arg1 = fd;
+ } else {
+ SWIG_exception(SWIG_TypeError, "Expected integer file descriptor "
+ "or file handle for argument 1");
+ }
+ }
+ }
+ result = (int)fsync(arg1);
+ {
+ SV *for_stack;
+ SP += argvi; PUTBACK;
+ for_stack = sv_2mortal(amglue_newSVi64(result));
+ SPAGAIN; SP -= argvi;
+ ST(argvi) = for_stack;
+ argvi++;
+ }
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_set_blocking) {
+ {
+ int arg1 ;
+ gboolean arg2 ;
+ int argvi = 0;
+ int result;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: set_blocking(fd,blocking);");
+ }
+ {
+ IO *io = NULL;
+ PerlIO *pio = NULL;
+ int fd = -1;
+
+ if (SvIOK(ST(0))) {
+ /* plain old integer */
+ arg1 = SvIV(ST(0));
+ } else {
+ /* try extracting as filehandle */
+
+ /* note: sv_2io may call die() */
+ io = sv_2io(ST(0));
+ if (io) {
+ pio = IoIFP(io);
+ }
+ if (pio) {
+ fd = PerlIO_fileno(pio);
+ }
+ if (fd >= 0) {
+ arg1 = fd;
+ } else {
+ SWIG_exception(SWIG_TypeError, "Expected integer file descriptor "
+ "or file handle for argument 1");
+ }
+ }
+ }
+ {
+ arg2 = SvTRUE(ST(1));
+ }
+ result = (int)set_blocking(arg1,arg2);
+ {
+ SV *for_stack;
+ SP += argvi; PUTBACK;
+ for_stack = sv_2mortal(amglue_newSVi64(result));
+ SPAGAIN; SP -= argvi;
+ ST(argvi) = for_stack;
+ argvi++;
+ }
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_new_file_lock) {
+ {
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ file_lock *result = 0 ;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: new_file_lock(filename);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_file_lock" "', argument " "1"" of type '" "char const *""'");
+ }
+ arg1 = (char *)(buf1);
+ result = (file_lock *)new_file_lock((char const *)arg1);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_file_lock, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_file_lock_lock) {
+ {
+ file_lock *arg1 = (file_lock *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ int result;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: file_lock_lock(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_file_lock, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "file_lock_lock" "', argument " "1"" of type '" "file_lock *""'");
+ }
+ arg1 = (file_lock *)(argp1);
+ result = (int)file_lock_lock(arg1);
+ {
+ SV *for_stack;
+ SP += argvi; PUTBACK;
+ for_stack = sv_2mortal(amglue_newSVi64(result));
+ SPAGAIN; SP -= argvi;
+ ST(argvi) = for_stack;
+ argvi++;
+ }
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_file_lock_unlock) {
+ {
+ file_lock *arg1 = (file_lock *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ int result;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: file_lock_unlock(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_file_lock, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "file_lock_unlock" "', argument " "1"" of type '" "file_lock *""'");
+ }
+ arg1 = (file_lock *)(argp1);
+ result = (int)file_lock_unlock(arg1);
+ {
+ SV *for_stack;
+ SP += argvi; PUTBACK;
+ for_stack = sv_2mortal(amglue_newSVi64(result));
+ SPAGAIN; SP -= argvi;
+ ST(argvi) = for_stack;
+ argvi++;
+ }
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_file_lock_write) {
+ {
+ file_lock *arg1 = (file_lock *) 0 ;
+ char *arg2 = (char *) 0 ;
+ size_t arg3 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ int result;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: file_lock_write(self,data,len);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_file_lock, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "file_lock_write" "', argument " "1"" of type '" "file_lock *""'");
+ }
+ arg1 = (file_lock *)(argp1);
+ {
+ arg2 = SvPV(ST(1), arg3);
+ }
+ result = (int)file_lock_write(arg1,(char const *)arg2,arg3);
+ {
+ SV *for_stack;
+ SP += argvi; PUTBACK;
+ for_stack = sv_2mortal(amglue_newSVi64(result));
+ SPAGAIN; SP -= argvi;
+ ST(argvi) = for_stack;
+ argvi++;
+ }
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_file_lock_data) {
+ {
+ file_lock *arg1 = (file_lock *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ SV *result = 0 ;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: file_lock_data(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_file_lock, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "file_lock_data" "', argument " "1"" of type '" "file_lock *""'");
+ }
+ arg1 = (file_lock *)(argp1);
+ result = (SV *)file_lock_data(arg1);
+ {
+ ST(argvi) = result; argvi++;
+ }
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_delete_file_lock) {
+ {
+ file_lock *arg1 = (file_lock *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: delete_file_lock(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_file_lock, SWIG_POINTER_DISOWN | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_file_lock" "', argument " "1"" of type '" "file_lock *""'");
+ }
+ arg1 = (file_lock *)(argp1);
+ free((char *) arg1);
+ ST(argvi) = sv_newmortal();
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_weaken_ref) {
+ {
+ SV *arg1 = (SV *) 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: weaken_ref(rv);");
+ }
+ arg1 = ST(0);
+ weaken_ref(arg1);
+ ST(argvi) = sv_newmortal();
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_gettimeofday) {
+ {
+ int argvi = 0;
+ guint64 result;
+ dXSARGS;
+
+ if ((items < 0) || (items > 0)) {
+ SWIG_croak("Usage: gettimeofday();");
+ }
+ result = gettimeofday_for_perl();
+ {
+ SV *for_stack;
+ SP += argvi; PUTBACK;
+ for_stack = sv_2mortal(amglue_newSVu64(result));
+ SPAGAIN; SP -= argvi;
+ ST(argvi) = for_stack;
+ argvi++;
+ }
+ XSRETURN(argvi);
+ fail:
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_openbsd_fd_inform) {
+ {
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 0) || (items > 0)) {
+ SWIG_croak("Usage: openbsd_fd_inform();");
+ }
+ openbsd_fd_inform();
+ ST(argvi) = sv_newmortal();
+ XSRETURN(argvi);
+ fail:
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_stream_server) {
+ {
+ int arg1 ;
+ in_port_t *arg2 = (in_port_t *) 0 ;
+ size_t arg3 ;
+ size_t arg4 ;
+ gboolean arg5 ;
+ in_port_t port2 ;
+ int argvi = 0;
+ socketfd result;
+ dXSARGS;
+
+ {
+ arg2 = &port2;
+ }
+ if ((items < 4) || (items > 4)) {
+ SWIG_croak("Usage: stream_server(family,sendsize,recvsize,privileged);");
+ }
+ {
+ if (sizeof(signed int) == 1) {
+ arg1 = amglue_SvI8(ST(0));
+ } else if (sizeof(signed int) == 2) {
+ arg1 = amglue_SvI16(ST(0));
+ } else if (sizeof(signed int) == 4) {
+ arg1 = amglue_SvI32(ST(0));
+ } else if (sizeof(signed int) == 8) {
+ arg1 = amglue_SvI64(ST(0));
+ } else {
+ g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
+ }
+ }
+ {
+ if (sizeof(size_t) == 1) {
+ arg3 = amglue_SvU8(ST(1));
+ } else if (sizeof(size_t) == 2) {
+ arg3 = amglue_SvU16(ST(1));
+ } else if (sizeof(size_t) == 4) {
+ arg3 = amglue_SvU32(ST(1));
+ } else if (sizeof(size_t) == 8) {
+ arg3 = amglue_SvU64(ST(1));
+ } else {
+ croak("Unexpected size_t >64 bits?"); /* should be optimized out unless sizeof(size_t) > 8 */
+ }
+ }
+ {
+ if (sizeof(size_t) == 1) {
+ arg4 = amglue_SvU8(ST(2));
+ } else if (sizeof(size_t) == 2) {
+ arg4 = amglue_SvU16(ST(2));
+ } else if (sizeof(size_t) == 4) {
+ arg4 = amglue_SvU32(ST(2));
+ } else if (sizeof(size_t) == 8) {
+ arg4 = amglue_SvU64(ST(2));
+ } else {
+ croak("Unexpected size_t >64 bits?"); /* should be optimized out unless sizeof(size_t) > 8 */
+ }
+ }
+ {
+ arg5 = SvTRUE(ST(3));
+ }
+ result = stream_server(arg1,arg2,arg3,arg4,arg5);
+ {
+ ST(argvi) = sv_2mortal(newSViv(result));
+ argvi++;
+ }
+ {
+ ST(argvi) = sv_2mortal(newSViv(*arg2));
+ argvi++;
+ }
+
+
+
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_stream_accept) {
+ {
+ int arg1 ;
+ int arg2 ;
+ size_t arg3 ;
+ size_t arg4 ;
+ int argvi = 0;
+ socketfd result;
+ dXSARGS;
+
+ if ((items < 4) || (items > 4)) {
+ SWIG_croak("Usage: stream_accept(fd,timeout,sendsize,recvsize);");
+ }
+ {
+ IO *io = NULL;
+ PerlIO *pio = NULL;
+ int fd = -1;
+
+ if (SvIOK(ST(0))) {
+ /* plain old integer */
+ arg1 = SvIV(ST(0));
+ } else {
+ /* try extracting as filehandle */
+
+ /* note: sv_2io may call die() */
+ io = sv_2io(ST(0));
+ if (io) {
+ pio = IoIFP(io);
+ }
+ if (pio) {
+ fd = PerlIO_fileno(pio);
+ }
+ if (fd >= 0) {
+ arg1 = fd;
+ } else {
+ SWIG_exception(SWIG_TypeError, "Expected integer file descriptor "
+ "or file handle for argument 1");
+ }
+ }
+ }
+ {
+ if (sizeof(signed int) == 1) {
+ arg2 = amglue_SvI8(ST(1));
+ } else if (sizeof(signed int) == 2) {
+ arg2 = amglue_SvI16(ST(1));
+ } else if (sizeof(signed int) == 4) {
+ arg2 = amglue_SvI32(ST(1));
+ } else if (sizeof(signed int) == 8) {
+ arg2 = amglue_SvI64(ST(1));
+ } else {
+ g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
+ }
+ }
+ {
+ if (sizeof(size_t) == 1) {
+ arg3 = amglue_SvU8(ST(2));
+ } else if (sizeof(size_t) == 2) {
+ arg3 = amglue_SvU16(ST(2));
+ } else if (sizeof(size_t) == 4) {
+ arg3 = amglue_SvU32(ST(2));
+ } else if (sizeof(size_t) == 8) {
+ arg3 = amglue_SvU64(ST(2));
+ } else {
+ croak("Unexpected size_t >64 bits?"); /* should be optimized out unless sizeof(size_t) > 8 */
+ }
+ }
+ {
+ if (sizeof(size_t) == 1) {
+ arg4 = amglue_SvU8(ST(3));
+ } else if (sizeof(size_t) == 2) {
+ arg4 = amglue_SvU16(ST(3));
+ } else if (sizeof(size_t) == 4) {
+ arg4 = amglue_SvU32(ST(3));
+ } else if (sizeof(size_t) == 8) {
+ arg4 = amglue_SvU64(ST(3));
+ } else {
+ croak("Unexpected size_t >64 bits?"); /* should be optimized out unless sizeof(size_t) > 8 */
+ }
+ }
+ result = stream_accept(arg1,arg2,arg3,arg4);
+ {
+ ST(argvi) = sv_2mortal(newSViv(result));
+ argvi++;
+ }
+
+
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_check_security) {
+ {
+ int arg1 ;
+ char *arg2 = (char *) 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int argvi = 0;
+ char *result = 0 ;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: check_security(fd,userstr);");
+ }
+ {
+ IO *io = NULL;
+ PerlIO *pio = NULL;
+ int fd = -1;
+
+ if (SvIOK(ST(0))) {
+ /* plain old integer */
+ arg1 = SvIV(ST(0));
+ } else {
+ /* try extracting as filehandle */
+
+ /* note: sv_2io may call die() */
+ io = sv_2io(ST(0));
+ if (io) {
+ pio = IoIFP(io);
+ }
+ if (pio) {
+ fd = PerlIO_fileno(pio);
+ }
+ if (fd >= 0) {
+ arg1 = fd;
+ } else {
+ SWIG_exception(SWIG_TypeError, "Expected integer file descriptor "
+ "or file handle for argument 1");
+ }
+ }
+ }
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "check_security" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = (char *)(buf2);
+ result = (char *)check_security_fd(arg1,arg2);
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+ free((char*)result);
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_set_pname) {
+ {
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: set_pname(name);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_pname" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = (char *)(buf1);
+ set_pname(arg1);
+ ST(argvi) = sv_newmortal();
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_get_pname) {
+ {
+ int argvi = 0;
+ char *result = 0 ;
+ dXSARGS;
+
+ if ((items < 0) || (items > 0)) {
+ SWIG_croak("Usage: get_pname();");
+ }
+ result = (char *)get_pname();
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+ XSRETURN(argvi);
+ fail:
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_set_ptype) {
+ {
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: set_ptype(type);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_ptype" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = (char *)(buf1);
+ set_ptype(arg1);
+ ST(argvi) = sv_newmortal();
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_get_ptype) {
+ {
+ int argvi = 0;
+ char *result = 0 ;
+ dXSARGS;
+
+ if ((items < 0) || (items > 0)) {
+ SWIG_croak("Usage: get_ptype();");
+ }
+ result = (char *)get_ptype();
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+ XSRETURN(argvi);
+ fail:
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_set_pcontext) {
+ {
+ pcontext_t arg1 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: set_pcontext(context);");
+ }
+ {
+ if (sizeof(signed int) == 1) {
+ arg1 = amglue_SvI8(ST(0));
+ } else if (sizeof(signed int) == 2) {
+ arg1 = amglue_SvI16(ST(0));
+ } else if (sizeof(signed int) == 4) {
+ arg1 = amglue_SvI32(ST(0));
+ } else if (sizeof(signed int) == 8) {
+ arg1 = amglue_SvI64(ST(0));
+ } else {
+ g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
+ }
+ }
+ set_pcontext(arg1);
+ ST(argvi) = sv_newmortal();
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_get_pcontext) {
+ {
+ int argvi = 0;
+ pcontext_t result;
+ dXSARGS;
+
+ if ((items < 0) || (items > 0)) {
+ SWIG_croak("Usage: get_pcontext();");
+ }
+ result = (pcontext_t)get_pcontext();
+ {
+ SV *for_stack;
+ SP += argvi; PUTBACK;
+ for_stack = sv_2mortal(amglue_newSVi64(result));
+ SPAGAIN; SP -= argvi;
+ ST(argvi) = for_stack;
+ argvi++;
+ }
+ XSRETURN(argvi);
+ fail:
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_safe_cd) {
+ {
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 0) || (items > 0)) {
+ SWIG_croak("Usage: safe_cd();");
+ }
+ safe_cd();
+ ST(argvi) = sv_newmortal();
+ XSRETURN(argvi);
+ fail:
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_check_running_as) {
+ {
+ running_as_flags arg1 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: check_running_as(who);");
+ }
+ {
+ if (sizeof(signed int) == 1) {
+ arg1 = amglue_SvI8(ST(0));
+ } else if (sizeof(signed int) == 2) {
+ arg1 = amglue_SvI16(ST(0));
+ } else if (sizeof(signed int) == 4) {
+ arg1 = amglue_SvI32(ST(0));
+ } else if (sizeof(signed int) == 8) {
+ arg1 = amglue_SvI64(ST(0));
+ } else {
+ g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
+ }
+ }
+ check_running_as(arg1);
+ ST(argvi) = sv_newmortal();
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static swig_type_info _swigt__p_GPtrArray = {"_p_GPtrArray", "GPtrArray *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_char = {"_p_char", "gchar *|char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_double = {"_p_double", "double *|gdouble *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_file_lock = {"_p_file_lock", "struct file_lock *|file_lock *", 0, 0, (void*)"Amanda::Util::file_lock", 0};
+static swig_type_info _swigt__p_float = {"_p_float", "float *|gfloat *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_fs_usage = {"_p_fs_usage", "struct fs_usage *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_in_port_t = {"_p_in_port_t", "in_port_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "int *|pcontext_t *|gboolean *|running_as_flags *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "guchar *|unsigned char *", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+ &_swigt__p_GPtrArray,
+ &_swigt__p_char,
+ &_swigt__p_double,
+ &_swigt__p_file_lock,
+ &_swigt__p_float,
+ &_swigt__p_fs_usage,
+ &_swigt__p_in_port_t,
+ &_swigt__p_int,
+ &_swigt__p_unsigned_char,
+};
+
+static swig_cast_info _swigc__p_GPtrArray[] = { {&_swigt__p_GPtrArray, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_file_lock[] = { {&_swigt__p_file_lock, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_fs_usage[] = { {&_swigt__p_fs_usage, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_in_port_t[] = { {&_swigt__p_in_port_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};