~ubuntu-branches/ubuntu/vivid/amanda/vivid

« back to all changes in this revision

Viewing changes to perl/Amanda/Cmdline.c

  • Committer: Bazaar Package Importer
  • Author(s): Bdale Garbee
  • Date: 2010-03-15 15:23:20 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20100315152320-58hvrk65ql5nvuqg
Tags: 1:2.6.1p2-1
* new upstream version
* move more files out of amanda-common that really belong elsewhere
* deliver /usr/lib/amanda/application/am[gs]tar setuid, closes: #558094
* leave user backup groups alone on purge, closes: #572933

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ----------------------------------------------------------------------------
2
2
 * This file was automatically generated by SWIG (http://www.swig.org).
3
 
 * Version 1.3.35
 
3
 * Version 1.3.39
4
4
 * 
5
5
 * This file is not intended to be easily readable and contains a number of 
6
6
 * coding conventions designed to improve portability and efficiency. Do not make
10
10
 
11
11
#define SWIGPERL
12
12
#define SWIG_CASTRANK_MODE
 
13
 
13
14
/* -----------------------------------------------------------------------------
14
15
 *  This section contains generic SWIG labels for method/variable
15
16
 *  declarations/attributes, and other compiler dependent labels.
52
53
# endif
53
54
#endif
54
55
 
 
56
#ifndef SWIG_MSC_UNSUPPRESS_4505
 
57
# if defined(_MSC_VER)
 
58
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
 
59
# endif 
 
60
#endif
 
61
 
55
62
#ifndef SWIGUNUSEDPARM
56
63
# ifdef __cplusplus
57
64
#   define SWIGUNUSEDPARM(p)
116
123
/* -----------------------------------------------------------------------------
117
124
 * swigrun.swg
118
125
 *
119
 
 * This file contains generic CAPI SWIG runtime support for pointer
 
126
 * This file contains generic C API SWIG runtime support for pointer
120
127
 * type checking.
121
128
 * ----------------------------------------------------------------------------- */
122
129
 
135
142
 
136
143
/*
137
144
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
138
 
  creating a static or dynamic library from the swig runtime code.
139
 
  In 99.9% of the cases, swig just needs to declare them as 'static'.
 
145
  creating a static or dynamic library from the SWIG runtime code.
 
146
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
140
147
  
141
 
  But only do this if is strictly necessary, ie, if you have problems
142
 
  with your compiler or so.
 
148
  But only do this if strictly necessary, ie, if you have problems
 
149
  with your compiler or suchlike.
143
150
*/
144
151
 
145
152
#ifndef SWIGRUNTIME
166
173
/* 
167
174
   Flags/methods for returning states.
168
175
   
169
 
   The swig conversion methods, as ConvertPtr, return and integer 
 
176
   The SWIG conversion methods, as ConvertPtr, return and integer 
170
177
   that tells if the conversion was successful or not. And if not,
171
178
   an error code can be returned (see swigerrors.swg for the codes).
172
179
   
173
180
   Use the following macros/flags to set or process the returning
174
181
   states.
175
182
   
176
 
   In old swig versions, you usually write code as:
 
183
   In old versions of SWIG, code such as the following was usually written:
177
184
 
178
185
     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
179
186
       // success code
181
188
       //fail code
182
189
     }
183
190
 
184
 
   Now you can be more explicit as:
 
191
   Now you can be more explicit:
185
192
 
186
193
    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
187
194
    if (SWIG_IsOK(res)) {
190
197
      // fail code
191
198
    }
192
199
 
193
 
   that seems to be the same, but now you can also do
 
200
   which is the same really, but now you can also do
194
201
 
195
202
    Type *ptr;
196
203
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
208
215
    
209
216
   I.e., now SWIG_ConvertPtr can return new objects and you can
210
217
   identify the case and take care of the deallocation. Of course that
211
 
   requires also to SWIG_ConvertPtr to return new result values, as
 
218
   also requires SWIG_ConvertPtr to return new result values, such as
212
219
 
213
220
      int SWIG_ConvertPtr(obj, ptr,...) {         
214
221
        if (<obj is ok>) {                             
226
233
 
227
234
   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
228
235
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
229
 
   swig errors code.
 
236
   SWIG errors code.
230
237
 
231
238
   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
232
239
   allows to return the 'cast rank', for example, if you have this
240
247
      fooi(1)   // cast rank '0'
241
248
 
242
249
   just use the SWIG_AddCast()/SWIG_CheckState()
243
 
 
244
 
 
245
 
 */
 
250
*/
 
251
 
246
252
#define SWIG_OK                    (0) 
247
253
#define SWIG_ERROR                 (-1)
248
254
#define SWIG_IsOK(r)               (r >= 0)
267
273
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
268
274
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
269
275
 
270
 
 
271
276
/* Cast-Rank Mode */
272
277
#if defined(SWIG_CASTRANK_MODE)
273
278
#  ifndef SWIG_TypeRank
290
295
#endif
291
296
 
292
297
 
293
 
 
294
 
 
295
298
#include <string.h>
296
299
 
297
300
#ifdef __cplusplus
388
391
}
389
392
 
390
393
 
391
 
/* think of this as a c++ template<> or a scheme macro */
392
 
#define SWIG_TypeCheck_Template(comparison, ty)         \
393
 
  if (ty) {                                             \
394
 
    swig_cast_info *iter = ty->cast;                    \
395
 
    while (iter) {                                      \
396
 
      if (comparison) {                                 \
397
 
        if (iter == ty->cast) return iter;              \
398
 
        /* Move iter to the top of the linked list */   \
399
 
        iter->prev->next = iter->next;                  \
400
 
        if (iter->next)                                 \
401
 
          iter->next->prev = iter->prev;                \
402
 
        iter->next = ty->cast;                          \
403
 
        iter->prev = 0;                                 \
404
 
        if (ty->cast) ty->cast->prev = iter;            \
405
 
        ty->cast = iter;                                \
406
 
        return iter;                                    \
407
 
      }                                                 \
408
 
      iter = iter->next;                                \
409
 
    }                                                   \
410
 
  }                                                     \
411
 
  return 0
412
 
 
413
394
/*
414
395
  Check the typename
415
396
*/
416
397
SWIGRUNTIME swig_cast_info *
417
398
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
418
 
  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
 
399
  if (ty) {
 
400
    swig_cast_info *iter = ty->cast;
 
401
    while (iter) {
 
402
      if (strcmp(iter->type->name, c) == 0) {
 
403
        if (iter == ty->cast)
 
404
          return iter;
 
405
        /* Move iter to the top of the linked list */
 
406
        iter->prev->next = iter->next;
 
407
        if (iter->next)
 
408
          iter->next->prev = iter->prev;
 
409
        iter->next = ty->cast;
 
410
        iter->prev = 0;
 
411
        if (ty->cast) ty->cast->prev = iter;
 
412
        ty->cast = iter;
 
413
        return iter;
 
414
      }
 
415
      iter = iter->next;
 
416
    }
 
417
  }
 
418
  return 0;
419
419
}
420
420
 
421
 
/* Same as previous function, except strcmp is replaced with a pointer comparison */
 
421
/* 
 
422
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
 
423
*/
422
424
SWIGRUNTIME swig_cast_info *
423
 
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
424
 
  SWIG_TypeCheck_Template(iter->type == from, into);
 
425
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
 
426
  if (ty) {
 
427
    swig_cast_info *iter = ty->cast;
 
428
    while (iter) {
 
429
      if (iter->type == from) {
 
430
        if (iter == ty->cast)
 
431
          return iter;
 
432
        /* Move iter to the top of the linked list */
 
433
        iter->prev->next = iter->next;
 
434
        if (iter->next)
 
435
          iter->next->prev = iter->prev;
 
436
        iter->next = ty->cast;
 
437
        iter->prev = 0;
 
438
        if (ty->cast) ty->cast->prev = iter;
 
439
        ty->cast = iter;
 
440
        return iter;
 
441
      }
 
442
      iter = iter->next;
 
443
    }
 
444
  }
 
445
  return 0;
425
446
}
426
447
 
427
448
/*
1060
1081
  }
1061
1082
}
1062
1083
 
 
1084
/* Identical to SWIG_TypeCheck, except for strcmp comparison */
1063
1085
SWIGRUNTIME swig_cast_info *
1064
1086
SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1065
 
  SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) 
1066
 
                            || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty);
 
1087
  if (ty) {
 
1088
    swig_cast_info *iter = ty->cast;
 
1089
    while (iter) {
 
1090
      if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) ||
 
1091
            (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) {
 
1092
        if (iter == ty->cast)
 
1093
          return iter;
 
1094
        /* Move iter to the top of the linked list */
 
1095
        iter->prev->next = iter->next;
 
1096
        if (iter->next)
 
1097
          iter->next->prev = iter->prev;
 
1098
        iter->next = ty->cast;
 
1099
        iter->prev = 0;
 
1100
        if (ty->cast) ty->cast->prev = iter;
 
1101
        ty->cast = iter;
 
1102
        return iter;
 
1103
      }
 
1104
      iter = iter->next;
 
1105
    }
 
1106
  }
 
1107
  return 0;
1067
1108
}
1068
1109
 
1069
 
 
1070
1110
/* Function for getting a pointer value */
1071
1111
 
1072
1112
SWIGRUNTIME int
1414
1454
#ifdef open
1415
1455
  #undef open
1416
1456
#endif
 
1457
#ifdef readdir
 
1458
  #undef readdir
 
1459
#endif
 
1460
#ifdef bind
 
1461
  #undef bind
 
1462
#endif
1417
1463
 
1418
1464
 
1419
1465
 
1448
1494
#define SWIG_name   "Amanda::Cmdlinec::boot_Amanda__Cmdline"
1449
1495
#define SWIG_prefix "Amanda::Cmdlinec::"
1450
1496
 
1451
 
#define SWIGVERSION 0x010335 
 
1497
#define SWIGVERSION 0x010339 
1452
1498
#define SWIG_VERSION SWIGVERSION
1453
1499
 
1454
1500
 
1525
1571
SWIGINTERN int
1526
1572
SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1527
1573
{
 
1574
  if (SvMAGICAL(obj)) {
 
1575
     SV *tmp = sv_newmortal();
 
1576
     SvSetSV(tmp, obj);
 
1577
     obj = tmp;
 
1578
  }
1528
1579
  if (SvPOK(obj)) {
1529
1580
    STRLEN len = 0;
1530
1581
    char *cstr = SvPV(obj, len); 
1717
1768
#endif
1718
1769
 
1719
1770
#ifdef PERL_OBJECT
1720
 
#define MAGIC_CLASS _wrap_Amanda::Cmdline_var::
1721
 
class _wrap_Amanda::Cmdline_var : public CPerlObj {
 
1771
#define MAGIC_CLASS _wrap_Amanda__Cmdline_var::
 
1772
class _wrap_Amanda__Cmdline_var : public CPerlObj {
1722
1773
public:
1723
1774
#else
1724
1775
#define MAGIC_CLASS
1744
1795
XS(_wrap_dumpspec_t_host_get) {
1745
1796
  {
1746
1797
    dumpspec_t *arg1 = (dumpspec_t *) 0 ;
1747
 
    char *result = 0 ;
1748
1798
    void *argp1 = 0 ;
1749
1799
    int res1 = 0 ;
1750
1800
    int argvi = 0;
 
1801
    char *result = 0 ;
1751
1802
    dXSARGS;
1752
1803
    
1753
1804
    if ((items < 1) || (items > 1)) {
1772
1823
XS(_wrap_dumpspec_t_disk_get) {
1773
1824
  {
1774
1825
    dumpspec_t *arg1 = (dumpspec_t *) 0 ;
1775
 
    char *result = 0 ;
1776
1826
    void *argp1 = 0 ;
1777
1827
    int res1 = 0 ;
1778
1828
    int argvi = 0;
 
1829
    char *result = 0 ;
1779
1830
    dXSARGS;
1780
1831
    
1781
1832
    if ((items < 1) || (items > 1)) {
1800
1851
XS(_wrap_dumpspec_t_datestamp_get) {
1801
1852
  {
1802
1853
    dumpspec_t *arg1 = (dumpspec_t *) 0 ;
1803
 
    char *result = 0 ;
1804
1854
    void *argp1 = 0 ;
1805
1855
    int res1 = 0 ;
1806
1856
    int argvi = 0;
 
1857
    char *result = 0 ;
1807
1858
    dXSARGS;
1808
1859
    
1809
1860
    if ((items < 1) || (items > 1)) {
1828
1879
XS(_wrap_dumpspec_t_level_get) {
1829
1880
  {
1830
1881
    dumpspec_t *arg1 = (dumpspec_t *) 0 ;
1831
 
    char *result = 0 ;
1832
1882
    void *argp1 = 0 ;
1833
1883
    int res1 = 0 ;
1834
1884
    int argvi = 0;
 
1885
    char *result = 0 ;
1835
1886
    dXSARGS;
1836
1887
    
1837
1888
    if ((items < 1) || (items > 1)) {
1859
1910
    char *arg2 = (char *) 0 ;
1860
1911
    char *arg3 = (char *) 0 ;
1861
1912
    char *arg4 = (char *) 0 ;
 
1913
    int res1 ;
 
1914
    char *buf1 = 0 ;
 
1915
    int alloc1 = 0 ;
 
1916
    int res2 ;
 
1917
    char *buf2 = 0 ;
 
1918
    int alloc2 = 0 ;
 
1919
    int res3 ;
 
1920
    char *buf3 = 0 ;
 
1921
    int alloc3 = 0 ;
 
1922
    int res4 ;
 
1923
    char *buf4 = 0 ;
 
1924
    int alloc4 = 0 ;
 
1925
    int argvi = 0;
1862
1926
    dumpspec_t *result = 0 ;
1863
 
    int res1 ;
1864
 
    char *buf1 = 0 ;
1865
 
    int alloc1 = 0 ;
1866
 
    int res2 ;
1867
 
    char *buf2 = 0 ;
1868
 
    int alloc2 = 0 ;
1869
 
    int res3 ;
1870
 
    char *buf3 = 0 ;
1871
 
    int alloc3 = 0 ;
1872
 
    int res4 ;
1873
 
    char *buf4 = 0 ;
1874
 
    int alloc4 = 0 ;
1875
 
    int argvi = 0;
1876
1927
    dXSARGS;
1877
1928
    
1878
1929
    if ((items < 4) || (items > 4)) {
1932
1983
    }
1933
1984
    arg1 = (dumpspec_t *)(argp1);
1934
1985
    delete_dumpspec_t(arg1);
1935
 
    
1936
 
    
 
1986
    ST(argvi) = sv_newmortal();
1937
1987
    
1938
1988
    XSRETURN(argvi);
1939
1989
  fail:
1946
1996
XS(_wrap_dumpspec_t_format) {
1947
1997
  {
1948
1998
    dumpspec_t *arg1 = (dumpspec_t *) 0 ;
1949
 
    char *result = 0 ;
1950
1999
    void *argp1 = 0 ;
1951
2000
    int res1 = 0 ;
1952
2001
    int argvi = 0;
 
2002
    char *result = 0 ;
1953
2003
    dXSARGS;
1954
2004
    
1955
2005
    if ((items < 1) || (items > 1)) {
1978
2028
    char *arg2 = (char *) 0 ;
1979
2029
    char *arg3 = (char *) 0 ;
1980
2030
    char *arg4 = (char *) 0 ;
1981
 
    char *result = 0 ;
1982
2031
    int res1 ;
1983
2032
    char *buf1 = 0 ;
1984
2033
    int alloc1 = 0 ;
1992
2041
    char *buf4 = 0 ;
1993
2042
    int alloc4 = 0 ;
1994
2043
    int argvi = 0;
 
2044
    char *result = 0 ;
1995
2045
    dXSARGS;
1996
2046
    
1997
2047
    if ((items < 4) || (items > 4)) {
2039
2089
    int arg1 ;
2040
2090
    char **arg2 = (char **) 0 ;
2041
2091
    int arg3 ;
 
2092
    int argvi = 0;
2042
2093
    amglue_dumpspec_list *result = 0 ;
2043
 
    int argvi = 0;
2044
2094
    dXSARGS;
2045
2095
    
2046
2096
    if ((items < 2) || (items > 2)) {
2471
2521
  }
2472
2522
  
2473
2523
  SWIG_TypeClientData(SWIGTYPE_p_dumpspec_t, (void*) "Amanda::Cmdline::dumpspec_t");
2474
 
  /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
 
2524
  /*@SWIG:/usr/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do {
2475
2525
    SV *sv = get_sv((char*) SWIG_prefix "CMDLINE_PARSE_DATESTAMP", TRUE | 0x2 | GV_ADDMULTI);
2476
2526
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(CMDLINE_PARSE_DATESTAMP)));
2477
2527
    SvREADONLY_on(sv);
2478
2528
  } while(0) /*@SWIG@*/;
2479
 
  /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
 
2529
  /*@SWIG:/usr/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do {
2480
2530
    SV *sv = get_sv((char*) SWIG_prefix "CMDLINE_PARSE_LEVEL", TRUE | 0x2 | GV_ADDMULTI);
2481
2531
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(CMDLINE_PARSE_LEVEL)));
2482
2532
    SvREADONLY_on(sv);
2483
2533
  } while(0) /*@SWIG@*/;
2484
 
  /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
 
2534
  /*@SWIG:/usr/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do {
2485
2535
    SV *sv = get_sv((char*) SWIG_prefix "CMDLINE_EMPTY_TO_WILDCARD", TRUE | 0x2 | GV_ADDMULTI);
2486
2536
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(CMDLINE_EMPTY_TO_WILDCARD)));
2487
2537
    SvREADONLY_on(sv);