mirror of https://github.com/BOINC/boinc.git
parent
1d0f048e7b
commit
dad78a8c80
|
@ -7955,3 +7955,12 @@ David 28 Nov 2003
|
||||||
|
|
||||||
client/
|
client/
|
||||||
cs_files.C
|
cs_files.C
|
||||||
|
|
||||||
|
Karl 2003-11-28
|
||||||
|
- new base64_encode() and base64_decode() functions.
|
||||||
|
- small fixes to Makefiles
|
||||||
|
|
||||||
|
lib/
|
||||||
|
parse.h
|
||||||
|
base64.C (new)
|
||||||
|
Makefile.am
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
include $(top_srcdir)/Makefile.incl
|
include $(top_srcdir)/Makefile.incl
|
||||||
|
|
||||||
bin_PROGRAMS = md5_test shmem_test crypt_prog
|
bin_PROGRAMS = crypt_prog
|
||||||
EXTRA_PROGRAMS = msg_test synch_test
|
EXTRA_PROGRAMS = md5_test shmem_test msg_test synch_test
|
||||||
noinst_LIBRARIES = libboinc.a
|
noinst_LIBRARIES = libboinc.a
|
||||||
#libboinc_graphics.a
|
#libboinc_graphics.a
|
||||||
EXTRA_DIST = result_state.h
|
EXTRA_DIST = result_state.h
|
||||||
|
@ -13,7 +13,8 @@ libboinc_a_SOURCES = \
|
||||||
../api/mfile.C \
|
../api/mfile.C \
|
||||||
app_ipc.C \
|
app_ipc.C \
|
||||||
parse.C \
|
parse.C \
|
||||||
xml_util.C \
|
base64.C \
|
||||||
|
xml_util.C \
|
||||||
filesys.C \
|
filesys.C \
|
||||||
language.C \
|
language.C \
|
||||||
util.C \
|
util.C \
|
||||||
|
|
121
lib/Makefile.in
121
lib/Makefile.in
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.7 from Makefile.am.
|
# Makefile.in generated by automake 1.7.9 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -113,6 +113,7 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||||
am__include = @am__include@
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
build = @build@
|
build = @build@
|
||||||
|
@ -170,8 +171,8 @@ AM_CPPFLAGS = \
|
||||||
# programs linking to it:
|
# programs linking to it:
|
||||||
LIBRSA = $(top_builddir)/RSAEuro/source/librsaeuro.a
|
LIBRSA = $(top_builddir)/RSAEuro/source/librsaeuro.a
|
||||||
|
|
||||||
bin_PROGRAMS = md5_test shmem_test crypt_prog
|
bin_PROGRAMS = crypt_prog
|
||||||
EXTRA_PROGRAMS = msg_test synch_test
|
EXTRA_PROGRAMS = md5_test shmem_test msg_test synch_test
|
||||||
noinst_LIBRARIES = libboinc.a
|
noinst_LIBRARIES = libboinc.a
|
||||||
#libboinc_graphics.a
|
#libboinc_graphics.a
|
||||||
EXTRA_DIST = result_state.h
|
EXTRA_DIST = result_state.h
|
||||||
|
@ -181,7 +182,8 @@ libboinc_a_SOURCES = \
|
||||||
../api/mfile.C \
|
../api/mfile.C \
|
||||||
app_ipc.C \
|
app_ipc.C \
|
||||||
parse.C \
|
parse.C \
|
||||||
xml_util.C \
|
base64.C \
|
||||||
|
xml_util.C \
|
||||||
filesys.C \
|
filesys.C \
|
||||||
language.C \
|
language.C \
|
||||||
util.C \
|
util.C \
|
||||||
|
@ -215,6 +217,7 @@ crypt_prog_SOURCES = crypt_prog.C crypt.C md5.c md5_file.C
|
||||||
crypt_prog_DEPENDENCIES = $(LIBRSA)
|
crypt_prog_DEPENDENCIES = $(LIBRSA)
|
||||||
crypt_prog_LDADD = $(RSA_LIBS)
|
crypt_prog_LDADD = $(RSA_LIBS)
|
||||||
subdir = lib
|
subdir = lib
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
|
@ -223,12 +226,13 @@ LIBRARIES = $(noinst_LIBRARIES)
|
||||||
libboinc_a_AR = $(AR) cru
|
libboinc_a_AR = $(AR) cru
|
||||||
libboinc_a_LIBADD =
|
libboinc_a_LIBADD =
|
||||||
am_libboinc_a_OBJECTS = boinc_api.$(OBJEXT) mfile.$(OBJEXT) \
|
am_libboinc_a_OBJECTS = boinc_api.$(OBJEXT) mfile.$(OBJEXT) \
|
||||||
app_ipc.$(OBJEXT) parse.$(OBJEXT) xml_util.$(OBJEXT) \
|
app_ipc.$(OBJEXT) parse.$(OBJEXT) base64.$(OBJEXT) \
|
||||||
filesys.$(OBJEXT) language.$(OBJEXT) util.$(OBJEXT) \
|
xml_util.$(OBJEXT) filesys.$(OBJEXT) language.$(OBJEXT) \
|
||||||
md5.$(OBJEXT) md5_file.$(OBJEXT) shmem.$(OBJEXT)
|
util.$(OBJEXT) md5.$(OBJEXT) md5_file.$(OBJEXT) shmem.$(OBJEXT)
|
||||||
libboinc_a_OBJECTS = $(am_libboinc_a_OBJECTS)
|
libboinc_a_OBJECTS = $(am_libboinc_a_OBJECTS)
|
||||||
EXTRA_PROGRAMS = msg_test$(EXEEXT) synch_test$(EXEEXT)
|
EXTRA_PROGRAMS = md5_test$(EXEEXT) shmem_test$(EXEEXT) msg_test$(EXEEXT) \
|
||||||
bin_PROGRAMS = md5_test$(EXEEXT) shmem_test$(EXEEXT) crypt_prog$(EXEEXT)
|
synch_test$(EXEEXT)
|
||||||
|
bin_PROGRAMS = crypt_prog$(EXEEXT)
|
||||||
PROGRAMS = $(bin_PROGRAMS)
|
PROGRAMS = $(bin_PROGRAMS)
|
||||||
|
|
||||||
am_crypt_prog_OBJECTS = crypt_prog.$(OBJEXT) crypt.$(OBJEXT) \
|
am_crypt_prog_OBJECTS = crypt_prog.$(OBJEXT) crypt.$(OBJEXT) \
|
||||||
|
@ -260,16 +264,16 @@ synch_test_LDFLAGS =
|
||||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
am__depfiles_maybe = depfiles
|
am__depfiles_maybe = depfiles
|
||||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/app_ipc.Po ./$(DEPDIR)/boinc_api.Po \
|
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/app_ipc.Po ./$(DEPDIR)/base64.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/crypt.Po ./$(DEPDIR)/crypt_prog.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/boinc_api.Po ./$(DEPDIR)/crypt.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/filesys.Po ./$(DEPDIR)/language.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/crypt_prog.Po ./$(DEPDIR)/filesys.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/md5.Po ./$(DEPDIR)/md5_file.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/language.Po ./$(DEPDIR)/md5.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/md5_test.Po ./$(DEPDIR)/mfile.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/md5_file.Po ./$(DEPDIR)/md5_test.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/msg_queue.Po ./$(DEPDIR)/msg_test.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/mfile.Po ./$(DEPDIR)/msg_queue.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/parse.Po ./$(DEPDIR)/shmem.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/msg_test.Po ./$(DEPDIR)/parse.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/shmem_test.Po ./$(DEPDIR)/synch.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/shmem.Po ./$(DEPDIR)/shmem_test.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/synch_test.Po ./$(DEPDIR)/util.Po \
|
@AMDEP_TRUE@ ./$(DEPDIR)/synch.Po ./$(DEPDIR)/synch_test.Po \
|
||||||
@AMDEP_TRUE@ ./$(DEPDIR)/xml_util.Po
|
@AMDEP_TRUE@ ./$(DEPDIR)/util.Po ./$(DEPDIR)/xml_util.Po
|
||||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||||
CXXLD = $(CXX)
|
CXXLD = $(CXX)
|
||||||
|
@ -282,7 +286,8 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
DIST_SOURCES = $(libboinc_a_SOURCES) $(crypt_prog_SOURCES) \
|
DIST_SOURCES = $(libboinc_a_SOURCES) $(crypt_prog_SOURCES) \
|
||||||
$(md5_test_SOURCES) $(msg_test_SOURCES) $(shmem_test_SOURCES) \
|
$(md5_test_SOURCES) $(msg_test_SOURCES) $(shmem_test_SOURCES) \
|
||||||
$(synch_test_SOURCES)
|
$(synch_test_SOURCES)
|
||||||
DIST_COMMON = $(top_srcdir)/Makefile.incl Makefile.am Makefile.in
|
DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/Makefile.incl \
|
||||||
|
Makefile.am
|
||||||
SOURCES = $(libboinc_a_SOURCES) $(crypt_prog_SOURCES) $(md5_test_SOURCES) $(msg_test_SOURCES) $(shmem_test_SOURCES) $(synch_test_SOURCES)
|
SOURCES = $(libboinc_a_SOURCES) $(crypt_prog_SOURCES) $(md5_test_SOURCES) $(msg_test_SOURCES) $(shmem_test_SOURCES) $(synch_test_SOURCES)
|
||||||
|
|
||||||
all: all-am
|
all: all-am
|
||||||
|
@ -299,8 +304,6 @@ AR = ar
|
||||||
|
|
||||||
clean-noinstLIBRARIES:
|
clean-noinstLIBRARIES:
|
||||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||||
boinc_api.$(OBJEXT): ../api/boinc_api.C
|
|
||||||
mfile.$(OBJEXT): ../api/mfile.C
|
|
||||||
libboinc.a: $(libboinc_a_OBJECTS) $(libboinc_a_DEPENDENCIES)
|
libboinc.a: $(libboinc_a_OBJECTS) $(libboinc_a_DEPENDENCIES)
|
||||||
-rm -f libboinc.a
|
-rm -f libboinc.a
|
||||||
$(libboinc_a_AR) libboinc.a $(libboinc_a_OBJECTS) $(libboinc_a_LIBADD)
|
$(libboinc_a_AR) libboinc.a $(libboinc_a_OBJECTS) $(libboinc_a_LIBADD)
|
||||||
|
@ -352,6 +355,7 @@ distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app_ipc.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app_ipc.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boinc_api.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boinc_api.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt_prog.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt_prog.Po@am__quote@
|
||||||
|
@ -371,13 +375,10 @@ distclean-compile:
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml_util.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml_util.Po@am__quote@
|
||||||
|
|
||||||
distclean-depend:
|
|
||||||
-rm -rf ./$(DEPDIR)
|
|
||||||
|
|
||||||
.C.o:
|
.C.o:
|
||||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||||
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||||
@am__fastdepCXX_TRUE@ fi
|
@am__fastdepCXX_TRUE@ fi
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@ -387,19 +388,19 @@ distclean-depend:
|
||||||
|
|
||||||
.C.obj:
|
.C.obj:
|
||||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||||
@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
|
@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||||
@am__fastdepCXX_TRUE@ fi
|
@am__fastdepCXX_TRUE@ fi
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
|
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
|
||||||
|
|
||||||
boinc_api.o: ../api/boinc_api.C
|
boinc_api.o: ../api/boinc_api.C
|
||||||
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT boinc_api.o -MD -MP -MF "$(DEPDIR)/boinc_api.Tpo" \
|
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT boinc_api.o -MD -MP -MF "$(DEPDIR)/boinc_api.Tpo" \
|
||||||
@am__fastdepCXX_TRUE@ -c -o boinc_api.o `test -f '../api/boinc_api.C' || echo '$(srcdir)/'`../api/boinc_api.C; \
|
@am__fastdepCXX_TRUE@ -c -o boinc_api.o `test -f '../api/boinc_api.C' || echo '$(srcdir)/'`../api/boinc_api.C; \
|
||||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/boinc_api.Tpo" "$(DEPDIR)/boinc_api.Po"; \
|
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/boinc_api.Tpo" "$(DEPDIR)/boinc_api.Po"; \
|
||||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/boinc_api.Tpo"; exit 1; \
|
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/boinc_api.Tpo"; exit 1; \
|
||||||
@am__fastdepCXX_TRUE@ fi
|
@am__fastdepCXX_TRUE@ fi
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../api/boinc_api.C' object='boinc_api.o' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../api/boinc_api.C' object='boinc_api.o' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@ -409,19 +410,19 @@ boinc_api.o: ../api/boinc_api.C
|
||||||
|
|
||||||
boinc_api.obj: ../api/boinc_api.C
|
boinc_api.obj: ../api/boinc_api.C
|
||||||
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT boinc_api.obj -MD -MP -MF "$(DEPDIR)/boinc_api.Tpo" \
|
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT boinc_api.obj -MD -MP -MF "$(DEPDIR)/boinc_api.Tpo" \
|
||||||
@am__fastdepCXX_TRUE@ -c -o boinc_api.obj `if test -f '../api/boinc_api.C'; then $(CYGPATH_W) '../api/boinc_api.C'; else $(CYGPATH_W) '$(srcdir)/../api/boinc_api.C'`; \
|
@am__fastdepCXX_TRUE@ -c -o boinc_api.obj `if test -f '../api/boinc_api.C'; then $(CYGPATH_W) '../api/boinc_api.C'; else $(CYGPATH_W) '$(srcdir)/../api/boinc_api.C'; fi`; \
|
||||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/boinc_api.Tpo" "$(DEPDIR)/boinc_api.Po"; \
|
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/boinc_api.Tpo" "$(DEPDIR)/boinc_api.Po"; \
|
||||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/boinc_api.Tpo"; exit 1; \
|
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/boinc_api.Tpo"; exit 1; \
|
||||||
@am__fastdepCXX_TRUE@ fi
|
@am__fastdepCXX_TRUE@ fi
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../api/boinc_api.C' object='boinc_api.obj' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../api/boinc_api.C' object='boinc_api.obj' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/boinc_api.Po' tmpdepfile='$(DEPDIR)/boinc_api.TPo' @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/boinc_api.Po' tmpdepfile='$(DEPDIR)/boinc_api.TPo' @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o boinc_api.obj `if test -f '../api/boinc_api.C'; then $(CYGPATH_W) '../api/boinc_api.C'; else $(CYGPATH_W) '$(srcdir)/../api/boinc_api.C'`
|
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o boinc_api.obj `if test -f '../api/boinc_api.C'; then $(CYGPATH_W) '../api/boinc_api.C'; else $(CYGPATH_W) '$(srcdir)/../api/boinc_api.C'; fi`
|
||||||
|
|
||||||
mfile.o: ../api/mfile.C
|
mfile.o: ../api/mfile.C
|
||||||
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mfile.o -MD -MP -MF "$(DEPDIR)/mfile.Tpo" \
|
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mfile.o -MD -MP -MF "$(DEPDIR)/mfile.Tpo" \
|
||||||
@am__fastdepCXX_TRUE@ -c -o mfile.o `test -f '../api/mfile.C' || echo '$(srcdir)/'`../api/mfile.C; \
|
@am__fastdepCXX_TRUE@ -c -o mfile.o `test -f '../api/mfile.C' || echo '$(srcdir)/'`../api/mfile.C; \
|
||||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/mfile.Tpo" "$(DEPDIR)/mfile.Po"; \
|
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/mfile.Tpo" "$(DEPDIR)/mfile.Po"; \
|
||||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/mfile.Tpo"; exit 1; \
|
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/mfile.Tpo"; exit 1; \
|
||||||
@am__fastdepCXX_TRUE@ fi
|
@am__fastdepCXX_TRUE@ fi
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../api/mfile.C' object='mfile.o' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../api/mfile.C' object='mfile.o' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@ -431,19 +432,19 @@ mfile.o: ../api/mfile.C
|
||||||
|
|
||||||
mfile.obj: ../api/mfile.C
|
mfile.obj: ../api/mfile.C
|
||||||
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mfile.obj -MD -MP -MF "$(DEPDIR)/mfile.Tpo" \
|
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mfile.obj -MD -MP -MF "$(DEPDIR)/mfile.Tpo" \
|
||||||
@am__fastdepCXX_TRUE@ -c -o mfile.obj `if test -f '../api/mfile.C'; then $(CYGPATH_W) '../api/mfile.C'; else $(CYGPATH_W) '$(srcdir)/../api/mfile.C'`; \
|
@am__fastdepCXX_TRUE@ -c -o mfile.obj `if test -f '../api/mfile.C'; then $(CYGPATH_W) '../api/mfile.C'; else $(CYGPATH_W) '$(srcdir)/../api/mfile.C'; fi`; \
|
||||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/mfile.Tpo" "$(DEPDIR)/mfile.Po"; \
|
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/mfile.Tpo" "$(DEPDIR)/mfile.Po"; \
|
||||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/mfile.Tpo"; exit 1; \
|
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/mfile.Tpo"; exit 1; \
|
||||||
@am__fastdepCXX_TRUE@ fi
|
@am__fastdepCXX_TRUE@ fi
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../api/mfile.C' object='mfile.obj' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../api/mfile.C' object='mfile.obj' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/mfile.Po' tmpdepfile='$(DEPDIR)/mfile.TPo' @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/mfile.Po' tmpdepfile='$(DEPDIR)/mfile.TPo' @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o mfile.obj `if test -f '../api/mfile.C'; then $(CYGPATH_W) '../api/mfile.C'; else $(CYGPATH_W) '$(srcdir)/../api/mfile.C'`
|
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o mfile.obj `if test -f '../api/mfile.C'; then $(CYGPATH_W) '../api/mfile.C'; else $(CYGPATH_W) '$(srcdir)/../api/mfile.C'; fi`
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||||
@am__fastdepCC_TRUE@ fi
|
@am__fastdepCC_TRUE@ fi
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@ -453,14 +454,14 @@ mfile.obj: ../api/mfile.C
|
||||||
|
|
||||||
.c.obj:
|
.c.obj:
|
||||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
|
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||||
@am__fastdepCC_TRUE@ fi
|
@am__fastdepCC_TRUE@ fi
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
|
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
|
||||||
uninstall-info-am:
|
uninstall-info-am:
|
||||||
|
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
|
@ -522,11 +523,13 @@ top_distdir = ..
|
||||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
distdir: $(DISTFILES)
|
||||||
$(mkinstalldirs) $(distdir)/$(top_srcdir)
|
$(mkinstalldirs) $(distdir)/..
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||||
list='$(DISTFILES)'; for file in $$list; do \
|
list='$(DISTFILES)'; for file in $$list; do \
|
||||||
case $$file in \
|
case $$file in \
|
||||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||||
esac; \
|
esac; \
|
||||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
@ -553,7 +556,6 @@ all-am: Makefile $(LIBRARIES) $(PROGRAMS)
|
||||||
|
|
||||||
installdirs:
|
installdirs:
|
||||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||||
|
|
||||||
install: install-am
|
install: install-am
|
||||||
install-exec: install-exec-am
|
install-exec: install-exec-am
|
||||||
install-data: install-data-am
|
install-data: install-data-am
|
||||||
|
@ -565,7 +567,7 @@ install-am: all-am
|
||||||
installcheck: installcheck-am
|
installcheck: installcheck-am
|
||||||
install-strip:
|
install-strip:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
INSTALL_STRIP_FLAG=-s \
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
`test -z '$(STRIP)' || \
|
`test -z '$(STRIP)' || \
|
||||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
@ -573,7 +575,7 @@ mostlyclean-generic:
|
||||||
clean-generic:
|
clean-generic:
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
-rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@ -584,9 +586,10 @@ clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
|
||||||
mostlyclean-am
|
mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
distclean-am: clean-am distclean-compile distclean-depend \
|
-rm -f Makefile
|
||||||
distclean-generic distclean-tags
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
dvi: dvi-am
|
dvi: dvi-am
|
||||||
|
|
||||||
|
@ -607,7 +610,8 @@ install-man:
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
mostlyclean: mostlyclean-am
|
mostlyclean: mostlyclean-am
|
||||||
|
@ -626,15 +630,14 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||||
|
|
||||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||||
clean-generic clean-noinstLIBRARIES ctags distclean \
|
clean-generic clean-noinstLIBRARIES ctags distclean \
|
||||||
distclean-compile distclean-depend distclean-generic \
|
distclean-compile distclean-generic distclean-tags distdir dvi \
|
||||||
distclean-tags distdir dvi dvi-am info info-am install \
|
dvi-am info info-am install install-am install-binPROGRAMS \
|
||||||
install-am install-binPROGRAMS install-data install-data-am \
|
install-data install-data-am install-exec install-exec-am \
|
||||||
install-exec install-exec-am install-info install-info-am \
|
install-info install-info-am install-man install-strip \
|
||||||
install-man install-strip installcheck installcheck-am \
|
installcheck installcheck-am installdirs maintainer-clean \
|
||||||
installdirs maintainer-clean maintainer-clean-generic \
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
|
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||||
ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \
|
uninstall-am uninstall-binPROGRAMS uninstall-info-am
|
||||||
uninstall-info-am
|
|
||||||
|
|
||||||
|
|
||||||
$(LIBRSA):
|
$(LIBRSA):
|
||||||
|
|
|
@ -0,0 +1,176 @@
|
||||||
|
// Copyright 2003 Regents of the University of California
|
||||||
|
|
||||||
|
#include "parse.h"
|
||||||
|
|
||||||
|
// Table of characters coding the 64 values.
|
||||||
|
static char base64_value_to_char[64] =
|
||||||
|
{
|
||||||
|
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', // 0- 9
|
||||||
|
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', // 10-19
|
||||||
|
'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', // 20-29
|
||||||
|
'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 30-39
|
||||||
|
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', // 40-49
|
||||||
|
'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', // 50-59
|
||||||
|
'8', '9', '+', '/' // 60-63
|
||||||
|
};
|
||||||
|
|
||||||
|
// Table of base64 values for first 128 characters.
|
||||||
|
static short base64_char_to_value[128] =
|
||||||
|
{
|
||||||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0- 9
|
||||||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10- 19
|
||||||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20- 29
|
||||||
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 30- 39
|
||||||
|
-1, -1, -1, 62, -1, -1, -1, 63, 52, 53, // 40- 49
|
||||||
|
54, 55, 56, 57, 58, 59, 60, 61, -1, -1, // 50- 59
|
||||||
|
-1, -1, -1, -1, -1, 0, 1, 2, 3, 4, // 60- 69
|
||||||
|
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 70- 79
|
||||||
|
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 80- 89
|
||||||
|
25, -1, -1, -1, -1, -1, -1, 26, 27, 28, // 90- 99
|
||||||
|
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // 100-109
|
||||||
|
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, // 110-119
|
||||||
|
49, 50, 51, -1, -1, -1, -1, -1 // 120-127
|
||||||
|
};
|
||||||
|
|
||||||
|
/* The following diagram shows the logical steps by which three octets
|
||||||
|
get transformed into four base64 characters.
|
||||||
|
|
||||||
|
.--------. .--------. .--------.
|
||||||
|
|aaaaaabb| |bbbbcccc| |ccdddddd|
|
||||||
|
`--------' `--------' `--------'
|
||||||
|
6 2 4 4 2 6
|
||||||
|
.--------+--------+--------+--------.
|
||||||
|
|00aaaaaa|00bbbbbb|00cccccc|00dddddd|
|
||||||
|
`--------+--------+--------+--------'
|
||||||
|
|
||||||
|
.--------+--------+--------+--------.
|
||||||
|
|AAAAAAAA|BBBBBBBB|CCCCCCCC|DDDDDDDD|
|
||||||
|
`--------+--------+--------+--------'
|
||||||
|
|
||||||
|
The octets are divided into 6 bit chunks, which are then encoded into
|
||||||
|
base64 characters. */
|
||||||
|
|
||||||
|
string base64_encode (const char* from, size_t length) throw(InvalidBase64Exception)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
result.reserve(length + length/3 + 1);
|
||||||
|
size_t i = 0;
|
||||||
|
int c;
|
||||||
|
unsigned int value;
|
||||||
|
|
||||||
|
while (i < length)
|
||||||
|
{
|
||||||
|
c = from[i++];
|
||||||
|
|
||||||
|
// Process first byte of a triplet.
|
||||||
|
result += base64_value_to_char[0x3f & c >> 2];
|
||||||
|
value = (0x03 & c) << 4;
|
||||||
|
|
||||||
|
// Process second byte of a triplet.
|
||||||
|
if (i == length)
|
||||||
|
{
|
||||||
|
result += base64_value_to_char[value];
|
||||||
|
result += '=';
|
||||||
|
result += '=';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
c = from[i++];
|
||||||
|
|
||||||
|
result += base64_value_to_char[value | (0x0f & c >> 4)];
|
||||||
|
value = (0x0f & c) << 2;
|
||||||
|
|
||||||
|
// Process third byte of a triplet.
|
||||||
|
if (i == length)
|
||||||
|
{
|
||||||
|
result += base64_value_to_char[value];
|
||||||
|
result += '=';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
c = from[i++];
|
||||||
|
|
||||||
|
result += base64_value_to_char[value | (0x03 & c >> 6)];
|
||||||
|
result += base64_value_to_char[0x3f & c];
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define IS_ASCII(Character) \
|
||||||
|
((Character) < 128)
|
||||||
|
#define IS_BASE64(Character) \
|
||||||
|
(IS_ASCII (Character) && base64_char_to_value[Character] >= 0)
|
||||||
|
#define IS_BASE64_IGNORABLE(Character) \
|
||||||
|
((Character) == ' ' || (Character) == '\t' || (Character) == '\n' \
|
||||||
|
|| (Character) == '\f' || (Character) == '\r')
|
||||||
|
|
||||||
|
#define READ_QUADRUPLET_BYTE(retval) \
|
||||||
|
do { \
|
||||||
|
if (i == length) return result; \
|
||||||
|
c = from[i++]; \
|
||||||
|
} \
|
||||||
|
while (IS_BASE64_IGNORABLE (c))
|
||||||
|
|
||||||
|
string base64_decode (const char* from, size_t length) throw(InvalidBase64Exception)
|
||||||
|
{
|
||||||
|
size_t i = 0;
|
||||||
|
string result;
|
||||||
|
unsigned char c;
|
||||||
|
unsigned long value;
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
// Process first byte of a quadruplet.
|
||||||
|
|
||||||
|
READ_QUADRUPLET_BYTE();
|
||||||
|
|
||||||
|
if (!IS_BASE64 (c))
|
||||||
|
throw InvalidBase64Exception();
|
||||||
|
value = base64_char_to_value[c] << 18;
|
||||||
|
|
||||||
|
// Process second byte of a quadruplet.
|
||||||
|
|
||||||
|
READ_QUADRUPLET_BYTE();
|
||||||
|
|
||||||
|
if (!IS_BASE64 (c))
|
||||||
|
throw InvalidBase64Exception();
|
||||||
|
value |= base64_char_to_value[c] << 12;
|
||||||
|
|
||||||
|
c = (unsigned char) (value >> 16);
|
||||||
|
result += c;
|
||||||
|
|
||||||
|
// Process third byte of a quadruplet.
|
||||||
|
|
||||||
|
READ_QUADRUPLET_BYTE();
|
||||||
|
if (c == '=')
|
||||||
|
{
|
||||||
|
READ_QUADRUPLET_BYTE();
|
||||||
|
|
||||||
|
if (c != '=')
|
||||||
|
throw InvalidBase64Exception();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IS_BASE64 (c))
|
||||||
|
throw InvalidBase64Exception();
|
||||||
|
value |= base64_char_to_value[c] << 6;
|
||||||
|
|
||||||
|
c = (unsigned char) (0xff & value >> 8);
|
||||||
|
result += c;
|
||||||
|
|
||||||
|
// Process fourth byte of a quadruplet.
|
||||||
|
|
||||||
|
READ_QUADRUPLET_BYTE();
|
||||||
|
|
||||||
|
if (c == '=')
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!IS_BASE64 (c))
|
||||||
|
throw InvalidBase64Exception();
|
||||||
|
value |= base64_char_to_value[c];
|
||||||
|
|
||||||
|
c = (unsigned char) (0xff & value);
|
||||||
|
result += c;
|
||||||
|
}
|
||||||
|
}
|
|
@ -42,3 +42,10 @@ extern void replace_element(char* buf, char* start, char* end, char* replacement
|
||||||
extern char* sgets(char* buf, int len, char* &in);
|
extern char* sgets(char* buf, int len, char* &in);
|
||||||
extern bool extract_xml_record(const std::string &field, const char *tag, std::string &record);
|
extern bool extract_xml_record(const std::string &field, const char *tag, std::string &record);
|
||||||
|
|
||||||
|
class InvalidBase64Exception
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
string base64_encode (const char* from, size_t length) throw(InvalidBase64Exception);
|
||||||
|
string base64_decode (const char* from, size_t length) throw(InvalidBase64Exception);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue