<commit_before>#include <stdint.h>
#include <string.h>
#include <FS.h>
#include <time.h>
#include <TFT_eSPI.h>
#include "display.h"
#include "dbg.h"

// These read 16- and 32-bit types from the SD card file.
// BMP data is stored little-endian, Arduino is little-endian too.
// May need to reverse subscript order if porting elsewhere.
static uint16_t read16(File &f) {
	uint16_t result;
	size_t n = f.read((uint8_t *)&result, sizeof(result));
	return result;
}

static uint32_t read32(File &f) {
	uint32_t result;
	size_t n = f.read((uint8_t *)&result, sizeof(result));
	return result;
}

// from Adafruit's spitftbitmap ST7735 example
int display_bmp(const char *filename, uint8_t x, uint8_t y) {
	int			bmpWidth, bmpHeight;	 // W+H in pixels
	uint8_t	bmpDepth;							// Bit depth (currently must be 24)
	uint32_t bmpImageoffset;				// Start of image data in file
	uint32_t rowSize;							 // Not always = bmpWidth; may have padding
	uint8_t buf[60];
	uint8_t	buffidx = sizeof(buf);			// Current position in buffer
	boolean	flip		= true;				// BMP is stored bottom-to-top
	int			w, h, row, col;
	uint8_t	r, g, b;<commit_msg>formatting<commit_after>#include <stdint.h>
#include <string.h>
#include <FS.h>
#include <time.h>
#include <TFT_eSPI.h>
#include "display.h"
#include "dbg.h"

// These read 16- and 32-bit types from the SD card file.
// BMP data is stored little-endian, Arduino is little-endian too.
// May need to reverse subscript order if porting elsewhere.
static uint16_t read16(File &f) {
	uint16_t result;
	size_t n = f.read((uint8_t *)&result, sizeof(result));
	return result;
}

static uint32_t read32(File &f) {
	uint32_t result;
	size_t n = f.read((uint8_t *)&result, sizeof(result));
	return result;
}

// from Adafruit's spitftbitmap ST7735 example
int display_bmp(const char *filename, uint8_t x, uint8_t y) {
	int bmpWidth, bmpHeight;	// W+H in pixels
	uint8_t	bmpDepth;		// Bit depth (currently must be 24)
	uint32_t bmpImageoffset;	// Start of image data in file
	uint32_t rowSize;	// Not always = bmpWidth; may have padding
	uint8_t buf[60];
	uint8_t	buffidx = sizeof(buf);	// Current position in buffer
	boolean	flip = true;		// BMP is stored bottom-to-top
	int w, h, row, col;
	uint8_t	r, g, b;
{'fraction_non_alphanumeric': 0.11870503597122302, 'fraction_numerical': 0.03237410071942446, 'mean_word_length': 3.9008810572687223, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '285042', 'n_tokens_mistral': 910, 'n_tokens_neox': 845, 'n_words': 273}