Snapshot of upstream SQLite 3.45.3
[sqlcipher.git] / ext / wasm / SQLTester / touint8array.c
blobb03ad42f03c60811f1875528e6e0e2d8e13ff9a7
1 /*
2 ** 2023-08-29
3 **
4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing:
6 **
7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give.
11 *************************************************************************
12 ** This file contains a tool for writing out the contents of stdin as
13 ** a comma-separated list of numbers, one per byte.
16 #include <stdio.h>
17 int main(int argc, char const **argv){
18 int i;
19 int rc = 0, colWidth = 30;
20 int ch;
21 printf("[");
22 for( i=0; EOF!=(ch = fgetc(stdin)); ++i ){
23 if( 0!=i ) printf(",");
24 if( i && 0==(i%colWidth) ) puts("");
25 printf("%d",ch);
27 printf("]");
28 return rc;