1# Copyright 2005-2018 ECMWF. 2# 3# This software is licensed under the terms of the Apache Licence Version 2.0 4# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5# 6# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by 7# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. 8# 9 10position startOfHeaders; 11 12ascii[4] SOH : hidden ; 13ascii[3] nnn : dump; 14ascii[3] crcrlf : hidden; 15ascii[2] TT : dump; 16ascii[2] AA : dump; 17ascii[2] II : dump; 18ascii[1] sp1 : hidden; 19ascii[4] CCCC : dump; 20ascii[1] sp2 : hidden; 21ascii[2] YY : dump; 22ascii[2] GG : dump; 23ascii[2] gg : dump; 24 25lookup[2] lBB (29,BB) ; 26if (lBB is 'RR' || lBB is 'CC' || lBB is 'AA' ) { 27 ascii[1] sp3 : hidden; 28 ascii[3] BBB : dump; 29} else { 30 constant BBB="NNN"; 31} 32alias ls.BBB=BBB; 33 34alias ls.count=count; 35alias ls.TT=TT; 36alias ls.AA=AA; 37alias ls.II=II; 38alias ls.CCCC=CCCC; 39alias ls.YY=YY; 40alias ls.GG=GG; 41alias ls.gg=gg; 42position endOfHeadersMaker; 43 44message[4] theMessage; 45 46meta lengthOfHeaders evaluate( endOfHeadersMaker-startOfHeaders); 47meta md5Headers md5(startOfHeaders,lengthOfHeaders); 48 49ascii[4] endMark ; 50position totalLength; 51alias ls.totalLength=totalLength; 52 53 54