Files
mars-smart/bin/hexasc.c
2026-04-21 02:12:28 +02:00

39 lines
1.1 KiB
C

/* hexasc.c - Convert hex from stdin to text -> stdout
*
* Copyright 2000 Wilmer van der Gaast (lintux@lintux.cx)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// You know, I'm just a former QuickBASIC programmer... (I still am)
// Ah, who cares??? It works... No buffer overruns/etc. AFAIK...
#include <stdio.h>
main()
{
char test;
while (scanf("%x",&test) > 0)
{
if (test == 0)
{
printf ("\n");
return(0);
}
printf("%c",test);
}
printf("\n");
}