From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by hurricane.the-brannons.com (Postfix) with ESMTPS id F300721DE06 for ; Mon, 20 Jul 2020 08:10:54 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id z2so18269762wrp.2 for ; Mon, 20 Jul 2020 08:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geoffair-info.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=STF6jjrnQjvO/6veCEqfP11H6GYhhyqWSLa3E6Bc7Io=; b=duunJIwOnpv/VNhV3c737AV6COt+cWQr4WfTuL3PrgTjmz9ZpsrLbaRgH52bmplOFl /OaqRqYekXukI5PVCJRh7UedkujxuWGgTSMkqOH20w+SfzRVR60YSarjpr96qfhGaT32 Pk1ErUejtZVu/5niqVrrH6lEpwNhZ22MrFupU/qQQ8uHhBjSUoRUWNp1Vs803rqtEZ+G oAERK8n/ucPUTxLkwi86N4J0n6Rl3koJ8B+EVM4BFqnZXQzT5rNaottS+QfToOjaE58f wzpiOhJrXU3gttLzcZ0W6J6NgarB88bBdPU5x8yGUd4NvidJWdV85i7f2Ebq2c9NEcJi xX0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=STF6jjrnQjvO/6veCEqfP11H6GYhhyqWSLa3E6Bc7Io=; b=tF/+s0xSkxzsboU0xWT5bDGXfUE82h42oKSl1F7qYDFNwpEMiUcoTHBIIlnwbi3r6C divDr3VyKXbHAwJFEHbTJGELoKW5RhS3z/QC4MMS1NBzRKfI4sPFqwnutiH8qot18E7y 7p75iTZOuvbohA3nbqmyxJH+clvbrwqwvRwnnmQsrxGWby/aUEqO88BPFclMmTc3oUBp aDN33eqOSguqUbsZgwtpVP5Dy/KWM4OwyQ7TiKH6jr6bvIBDYIW6l/aEQZxZ7tLlxc4t v6LrSGsjMD/vXFT4j81+N/LdFz8lTVQ3S9lDqt8SQDLn/tqxrsV7yB5+8EfKQBRH+zIh v+Fw== X-Gm-Message-State: AOAM531kTA3y06rLp/crEPYMJ2+PLYG9uEb4O85zVCDalgna4jp9cJl+ zRVzH2ox4DKppsMUvu449W6W3fhivLQ= X-Google-Smtp-Source: ABdhPJy59j3cRp+95cWUX5KwgKu9Dw1+kPiF1o27aiFUEy3xMiLNcYVTJ557MA4MP1FE2t/sgWA9tw== X-Received: by 2002:a5d:61c8:: with SMTP id q8mr12614304wrv.160.1595257852269; Mon, 20 Jul 2020 08:10:52 -0700 (PDT) Received: from ?IPv6:2a01:cb04:4ba:c500:51d8:b41c:227f:9ba1? (2a01cb0404bac50051d8b41c227f9ba1.ipv6.abo.wanadoo.fr. [2a01:cb04:4ba:c500:51d8:b41c:227f:9ba1]) by smtp.googlemail.com with ESMTPSA id h11sm10214505wrb.68.2020.07.20.08.09.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2020 08:09:39 -0700 (PDT) Subject: Re: [edbrowse-dev] Processing of Windows .ebrc config file To: Karl Dahlke , Edbrowse-dev@lists.the-brannons.com References: <20200619154910.eklhad@comcast.net> From: Geoff McLane Message-ID: Date: Mon, 20 Jul 2020 17:09:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 In-Reply-To: <20200619154910.eklhad@comcast.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Hi Karl, Thanks for looking into this, and giving an explanation, a historic perspective... I certainly think in the past there could have been a stupid compiler that limited string length, but I am pretty sure it would have died of old age by now... ;=)) Yes, changing main.c line 591 to 'fp = fopen(cfgfil, "wb");` - ie use binary mode - would do the trick... but... But then there is line 618 'int fh = creat(configFile, MODE_private);` to consider, but since this is for unix, maybe no problem... The 0x0d comes from lang\ebrc-* files, in Windows. The remote git repository would only use 0x0a, but depending on your git config, when you clone/pull, line endings are converted to native 0x0d 0x0a... but that is NOT where this 0x0d comes from... See tools/buildsourcestring.pl, lines 85 - 89 - regardless of what is in the input file, which is stripped at line 49 - 51, with 'chomp $line; $line =~ s/\r*$//;', if the OS is Win type then " 0x0d, 0x0a,"; is appended to the hexified array... So if you chose to keep the text mode above, you could remove that if ($OSNAME =~ /Win/) { switch, and ONLY add " 0x0a,", as in unix... But I am also fairly sure these days you could remove lines 83 - 89, etc... that is write the lines as is, in inverted commas... not convert it to a hexified string... Best regards, Geoff.