From b05b881fa8e217edd4d329302c27177029cee01d Mon Sep 17 00:00:00 2001 From: mccallum Date: Wed, 24 Jan 1996 15:06:04 +0000 Subject: [PATCH] ([CStream -encodeWithName:valuesOfCTypes:...]): New method. ([CStream -decodeWithName:valuesOfCTypes:...]): New method. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@805 72102866-910b-0410-8b05-ffd578937521 --- Source/CStream.m | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Source/CStream.m b/Source/CStream.m index 4af0ce3fc..d72e31919 100644 --- a/Source/CStream.m +++ b/Source/CStream.m @@ -172,6 +172,40 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException"; /* Encoding/decoding indentation */ +- (void) encodeWithName: (id ) name + valuesOfCTypes: (const char *) types, ... +{ + va_list ap; + + [self encodeName: name]; + va_start (ap, types); + while (*types) + { + [self encodeValueOfCType: types + at: va_arg(ap, void*) + withName: NULL]; + types = objc_skip_typespec (types); + } + va_end (ap); +} + +- (void) decodeWithName: (id *)name + valuesOfCTypes: (const char *)types, ... +{ + va_list ap; + + [self decodeName: name]; + va_start (ap, types); + while (*types) + { + [self decodeValueOfCType: types + at: va_arg (ap, void*) + withName: NULL]; + types = objc_skip_typespec (types); + } + va_end (ap); +} + - (void) encodeIndent { /* Do nothing */