From 6837c5ac80e3624c6dc3a82d03e50d68b2f5a989 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 26 Oct 2026 17:13:36 +0100 Subject: Second run of making variable and function names more readable, urlencoder now matches overall naming scheme --- scan_urlencoded_query.h | 61 ------------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 scan_urlencoded_query.h (limited to 'scan_urlencoded_query.h') diff --git a/scan_urlencoded_query.h b/scan_urlencoded_query.h deleted file mode 100644 index 24e09fd..0000000 --- a/scan_urlencoded_query.h +++ /dev/null @@ -1,61 +0,0 @@ -/* This software was written by Dirk Engling - It is considered beerware. Prost. Skol. Cheers or whatever. - - $id$ */ - -#ifndef SCAN_URLENCODED_QUERY_H__ -#define SCAN_URLENCODED_QUERY_H__ - -#include -#include -#include - -typedef struct { - const char *key; - int value; -} ot_keywords; - -typedef enum { - SCAN_PATH = 1, - SCAN_SEARCHPATH_PARAM = 2, - SCAN_SEARCHPATH_VALUE = 4, - SCAN_SEARCHPATH_TERMINATOR = 8 -} SCAN_SEARCHPATH_FLAG; - -/* string in: pointer to source - out: pointer to next scan position - deststring pointer to destination - flags determines, what to parse - returns number of valid converted characters in deststring - or -1 for parse error - or -2 for terminator found -*/ -ssize_t scan_urlencoded_query(char **string, char *deststring, SCAN_SEARCHPATH_FLAG flags); - -/* string in: pointer to source - out: pointer to next scan position - flags determines, what to parse - returns value for matched keyword - or -1 for parse error - or -2 for terminator found - or -3 for no keyword matched - */ -int scan_find_keywords(const ot_keywords *keywords, char **string, SCAN_SEARCHPATH_FLAG flags); - -/* string in: pointer to value of a param=value pair to skip - out: pointer to next scan position on return -*/ -void scan_urlencoded_skipvalue(char **string); - -/* data pointer to len chars of string - len length of chars in data to parse - number number to receive result - returns number of bytes not parsed, mostly !=0 means fail - */ -ssize_t scan_fixed_int(char *data, size_t len, int *number); - -/* The other direction: percent encode len bytes from src into dest and return - how many characters were written. dest needs room for three times len. */ -size_t urlencoded_format(char *dest, const uint8_t *src, size_t len); - -#endif -- cgit v1.3