~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/common/string/base64.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 * additional information or have any questions.
29
29
 */
30
30
 
 
31
 
31
32
/*******************************************************************************
32
33
*   Header Files                                                               *
33
34
*******************************************************************************/
34
35
#include <iprt/base64.h>
 
36
#include "internal/iprt.h"
 
37
 
35
38
#include <iprt/assert.h>
36
39
#include <iprt/err.h>
37
40
#include <iprt/ctype.h>
215
218
        *ppszEnd = (char *)pszString;
216
219
    return cb;
217
220
}
 
221
RT_EXPORT_SYMBOL(RTBase64DecodedSize);
218
222
 
219
223
 
220
224
/**
247
251
    /*
248
252
     * Process input in groups of 4 input / 3 output chars.
249
253
     */
250
 
    uint8_t     u8Trio[3];
 
254
    uint8_t     u8Trio[3] = { 0, 0, 0 }; /* shuts up gcc */
251
255
    uint8_t    *pbData    = (uint8_t *)pvData;
252
256
    uint8_t     u8        = BASE64_INVALID;
253
257
    unsigned    c6Bits    = 0;
398
402
        *pcbActual = pbData - (uint8_t *)pvData;
399
403
    return VINF_SUCCESS;
400
404
}
 
405
RT_EXPORT_SYMBOL(RTBase64Decode);
401
406
 
402
407
 
403
408
/**
435
440
    cch -= (cch % RTBASE64_LINE_LEN) == 0;
436
441
    return cch;
437
442
}
 
443
RT_EXPORT_SYMBOL(RTBase64EncodedLength);
438
444
 
439
445
 
440
446
/**
533
539
        *pcchActual = pchDst - pszBuf;
534
540
    return VINF_SUCCESS;
535
541
}
 
542
RT_EXPORT_SYMBOL(RTBase64Encode);
536
543