X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fyenc.qh;h=e71c68ef63683aa0caeb762f79971c32c83fb577;hb=cee83985e3adc137911beaaa9196cc6800912cd0;hp=a8389e240f4e9ec0041ae5609a75c2ee9baae84a;hpb=068324d293df795dbc41de75f38256b8c6c35607;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/yenc.qh b/qcsrc/lib/yenc.qh index a8389e240..e71c68ef6 100644 --- a/qcsrc/lib/yenc.qh +++ b/qcsrc/lib/yenc.qh @@ -3,7 +3,7 @@ #include "test.qh" #define yenc_single(c, ret) \ - MACRO_BEGIN { \ + MACRO_BEGIN \ int conv = c; \ conv += 42; \ if (conv >= 256) conv -= 256; \ @@ -26,17 +26,15 @@ break; \ } \ } \ - } MACRO_END + MACRO_END #define ydec_single(stringiter, ret) \ - MACRO_BEGIN { \ + MACRO_BEGIN \ int conv = STRING_ITERATOR_GET(stringiter); \ if (conv <= 0) { \ ret = -1; \ } else { \ - bool esc = false; \ if (conv == '=') { \ - esc = true; \ conv = STRING_ITERATOR_GET(stringiter); \ conv -= 64; \ } \ @@ -44,7 +42,7 @@ conv -= 42; \ ret = conv; \ } \ - } MACRO_END + MACRO_END TEST(yEnc, EncodeDecode) {