From patchwork Sat Jul 27 21:25:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 14781 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6952F17233; Sat, 27 Jul 2019 22:26:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0FD171714B for ; Sat, 27 Jul 2019 22:26:07 +0100 (BST) Received: from localhost ([::1]:47384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrUCc-0005Iz-Og for patchwork@mira.cbaines.net; Sat, 27 Jul 2019 17:26:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51614) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrUCZ-0005H2-77 for guix-patches@gnu.org; Sat, 27 Jul 2019 17:26:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrUCX-0002vf-SO for guix-patches@gnu.org; Sat, 27 Jul 2019 17:26:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36664) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrUCX-0002vP-OL for guix-patches@gnu.org; Sat, 27 Jul 2019 17:26:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hrUCX-0007eF-KU for guix-patches@gnu.org; Sat, 27 Jul 2019 17:26:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36825] [PATCH 1/2] gnu: Add ascii2binary. References: <20190727212338.567-1-h.goebel@crazy-compilers.com> In-Reply-To: <20190727212338.567-1-h.goebel@crazy-compilers.com> Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Jul 2019 21:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36825 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36825@debbugs.gnu.org Received: via spool by 36825-submit@debbugs.gnu.org id=B36825.156426274629367 (code B ref 36825); Sat, 27 Jul 2019 21:26:01 +0000 Received: (at 36825) by debbugs.gnu.org; 27 Jul 2019 21:25:46 +0000 Received: from localhost ([127.0.0.1]:45483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrUCC-0007dQ-S4 for submit@debbugs.gnu.org; Sat, 27 Jul 2019 17:25:46 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:45149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrUCA-0007dB-1e for 36825@debbugs.gnu.org; Sat, 27 Jul 2019 17:25:39 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 45wzWj1fhmz1rQBk for <36825@debbugs.gnu.org>; Sat, 27 Jul 2019 23:25:36 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 45wzWh61bPz1qqkD for <36825@debbugs.gnu.org>; Sat, 27 Jul 2019 23:25:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Dmzorfo0j0Ws for <36825@debbugs.gnu.org>; Sat, 27 Jul 2019 23:25:35 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-55-53.dynamic.mnet-online.de [188.174.55.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for <36825@debbugs.gnu.org>; Sat, 27 Jul 2019 23:25:35 +0200 (CEST) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 23C6E60170 for <36825@debbugs.gnu.org>; Sat, 27 Jul 2019 23:26:04 +0200 (CEST) From: Hartmut Goebel Date: Sat, 27 Jul 2019 23:25:33 +0200 Message-Id: <20190727212534.631-1-h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/textutils.scm (ascii2binary): New variable. --- gnu/packages/textutils.scm | 46 +++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index d1dc14e6d7..aeb1953b99 100644 --- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2016 Marius Bakke ;;; Copyright © 2017 Eric Bavier ;;; Copyright © 2017 Rene Saavedra -;;; Copyright © 2017 Hartmut Goebel +;;; Copyright © 2017,2019 Hartmut Goebel ;;; Copyright © 2017 Kei Kebreau ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2018 Tobias Geerinckx-Rice @@ -321,6 +321,50 @@ input bits thoroughly but are not suitable for cryptography.") ;; entails." (license license:public-domain))) +(define-public ascii2binary + (package + (name "ascii2binary") + (version "2.14") + (source + (origin + (method url-fetch) + (uri (string-append "http://billposer.org/Software/Downloads/" + "ascii2binary-" version ".tar.bz2")) + (sha256 + (base32 "0dc9fxcdmppbs9s06jvq61zbk552laxps0xyk098gj41697ihd96")))) + (build-system gnu-build-system) + (native-inputs + `(("gettext" ,gettext-minimal))) + (home-page "https://billposer.org/Software/a2b.html") + (synopsis "Convert between ASCII, hexadecimal and binary representations") + (description "The two programs are useful for generating test data, for +inspecting binary files, and for interfacing programs that generate textual +output to programs that require binary input and conversely. They can also be +useful when it is desired to reformat numbers. + +@itemize + +@item @command{ascii2binary} reads input consisting of ascii or hexadecimal + representation numbers separated by whitespace and produces as output + the binary equivalents. The type and precision of the binary output + is selected using command line flags. + +@item @command{binary2ascii} reads input consisting of binary numbers + and converts them to their ascii or hexadecimal representation. + Command line flags specify the type and size of the binary numbers + and provide control over the format of the output. + Unsigned integers may be written out in binary, octal, decimal, + or hexadecimal. + + Signed integers may be written out only in binary or decimal. Floating + point numbers may be written out only decimal, either in standard or + scientific notation. (If you want to examine the binary representation + of floating point numbers, just treat the input as a sequence of unsigned + characters.) + +@end itemize") + (license license:gpl3))) + (define-public libconfig (package (name "libconfig")