247 lines
10 KiB
C
247 lines
10 KiB
C
|
#ifndef REMO_H
|
|||
|
#define REMO_H
|
|||
|
#include <stdio.h>
|
|||
|
#include <ctype.h>
|
|||
|
#include <string.h>
|
|||
|
#include <stdbool.h>
|
|||
|
|
|||
|
typedef struct {
|
|||
|
const char *str;
|
|||
|
const char *description;
|
|||
|
} remo_t;
|
|||
|
|
|||
|
remo_t remo[] = {
|
|||
|
{"\U0001F600", "Grinning Face"}, // ð
|
|||
|
{"\U0001F601", "Beaming Face with Smiling Eyes"}, // ð
|
|||
|
{"\U0001F602", "Face with Tears of Joy"}, // ð
|
|||
|
{"\U0001F923", "Rolling on the Floor Laughing"}, // ðĪĢ
|
|||
|
{"\U0001F603", "Grinning Face with Big Eyes"}, // ð
|
|||
|
{"\U0001F604", "Grinning Face with Smiling Eyes"}, // ð
|
|||
|
{"\U0001F609", "Winking Face"}, // ð
|
|||
|
{"\U0001F60A", "Smiling Face with Smiling Eyes"}, // ð
|
|||
|
{"\U0001F60D", "Smiling Face with Heart-Eyes"}, // ð
|
|||
|
{"\U0001F618", "Face Blowing a Kiss"}, // ð
|
|||
|
{"\U0001F617", "Kissing Face"}, // ð
|
|||
|
{"\U0001F61A", "Kissing Face with Closed Eyes"}, // ð
|
|||
|
{"\U0001F642", "Slightly Smiling Face"}, // ð
|
|||
|
{"\U0001F643", "Upside-Down Face"}, // ð
|
|||
|
{"\U0001F970", "Smiling Face with Hearts"}, // ðĨ°
|
|||
|
{"\U0001F60B", "Face Savoring Food"}, // ð
|
|||
|
{"\U0001F61B", "Face with Tongue"}, // ð
|
|||
|
{"\U0001F61C", "Winking Face with Tongue"}, // ð
|
|||
|
{"\U0001F92A", "Zany Face"}, // ðĪŠ
|
|||
|
{"\U0001F929", "Star-Struck"}, // ðĪĐ
|
|||
|
{"\U0001F631", "Face Screaming in Fear"}, // ðą
|
|||
|
{"\U0001F62D", "Loudly Crying Face"}, // ð
|
|||
|
{"\U0001F624", "Face with Steam From Nose"}, // ðĪ
|
|||
|
{"\U0001F620", "Angry Face"}, // ð
|
|||
|
{"\U0001F621", "Pouting Face"}, // ðĄ
|
|||
|
{"\U0001F47B", "Ghost"}, // ðŧ
|
|||
|
{"\U0001F480", "Skull"}, // ð
|
|||
|
{"\U0001F4A9", "Pile of Poo"}, // ðĐ
|
|||
|
{"\U0001F47D", "Alien"}, // ð―
|
|||
|
// Geometric Shapes
|
|||
|
{"\U000025A0", "Black Square"}, // â
|
|||
|
{"\U000025B2", "Upward Triangle"}, // âē
|
|||
|
{"\U000025CF", "Black Circle"}, // â
|
|||
|
{"\U000025CB", "White Circle"}, // â
|
|||
|
{"\U00002B1B", "Large Black Square"}, // âŽ
|
|||
|
{"\U00002B1C", "Large White Square"}, // âŽ
|
|||
|
|
|||
|
// Mathematical Symbols
|
|||
|
{"\U00002200", "For All"}, // â
|
|||
|
{"\U00002203", "Exists"}, // â
|
|||
|
{"\U00002205", "Empty Set"}, // â
|
|||
|
{"\U00002207", "Nabla"}, // â
|
|||
|
{"\U0000220F", "N-Ary Product"}, // â
|
|||
|
{"\U00002212", "Minus Sign"}, // â
|
|||
|
{"\U0000221E", "Infinity"}, // â
|
|||
|
|
|||
|
// Arrows
|
|||
|
{"\U00002190", "Left Arrow"}, // â
|
|||
|
{"\U00002191", "Up Arrow"}, // â
|
|||
|
{"\U00002192", "Right Arrow"}, // â
|
|||
|
{"\U00002193", "Down Arrow"}, // â
|
|||
|
{"\U00002195", "Up Down Arrow"}, // â
|
|||
|
{"\U00002197", "Up Right Arrow"}, // â
|
|||
|
{"\U00002198", "Down Right Arrow"}, // â
|
|||
|
{"\U000027A1", "Black Right Arrow"}, // âĄïļ
|
|||
|
|
|||
|
// Dingbats
|
|||
|
{"\U00002714", "Check Mark"}, // âïļ
|
|||
|
{"\U00002716", "Heavy Multiplication X"}, // âïļ
|
|||
|
{"\U00002728", "Sparkles"}, // âĻ
|
|||
|
{"\U00002757", "Exclamation Mark"}, // â
|
|||
|
{"\U0000274C", "Cross Mark"}, // â
|
|||
|
{"\U00002795", "Heavy Plus Sign"}, // â
|
|||
|
|
|||
|
// Miscellaneous Symbols
|
|||
|
{"\U00002600", "Sun"}, // âïļ
|
|||
|
{"\U00002614", "Umbrella with Rain Drops"}, // â
|
|||
|
{"\U00002620", "Skull and Crossbones"}, // â ïļ
|
|||
|
{"\U000026A0", "Warning Sign"}, // â ïļ
|
|||
|
{"\U000026BD", "Soccer Ball"}, // â―
|
|||
|
{"\U000026C4", "Snowman"}, // â
|
|||
|
|
|||
|
// Stars and Asterisks
|
|||
|
{"\U00002733", "Eight Pointed Black Star"}, // âģïļ
|
|||
|
{"\U00002734", "Eight Spoked Asterisk"}, // âīïļ
|
|||
|
{"\U00002B50", "White Star"}, // â
|
|||
|
{"\U0001F31F", "Glowing Star"}, // ð
|
|||
|
{"\U00002728", "Sparkles"}, // âĻ
|
|||
|
// Animals and Nature
|
|||
|
{"\U0001F98A", "Fox"}, // ðĶ
|
|||
|
{"\U0001F415", "Dog"}, // ð
|
|||
|
{"\U0001F431", "Cat Face"}, // ðą
|
|||
|
{"\U0001F435", "Monkey Face"}, // ðĩ
|
|||
|
{"\U0001F408", "Black Cat"}, // ð
|
|||
|
{"\U0001F98C", "Deer"}, // ðĶ
|
|||
|
{"\U0001F344", "Mushroom"}, // ð
|
|||
|
{"\U0001F333", "Tree"}, // ðģ
|
|||
|
|
|||
|
// Weather and Space Symbols
|
|||
|
{"\U0001F308", "Rainbow"}, // ð
|
|||
|
{"\U0001F320", "Shooting Star"}, // ð
|
|||
|
{"\U00002600", "Sun"}, // âïļ
|
|||
|
{"\U00002601", "Cloud"}, // âïļ
|
|||
|
{"\U000026A1", "High Voltage"}, // âĄ
|
|||
|
{"\U0001F525", "Fire"}, // ðĨ
|
|||
|
{"\U000026C4", "Snowman"}, // â
|
|||
|
{"\U0001F30A", "Water Wave"}, // ð
|
|||
|
|
|||
|
// Transport and Map Symbols
|
|||
|
{"\U0001F68C", "Bus"}, // ð
|
|||
|
{"\U0001F697", "Car"}, // ð
|
|||
|
{"\U0001F6B2", "Bicycle"}, // ðē
|
|||
|
{"\U0001F6A2", "Ship"}, // ðĒ
|
|||
|
{"\U0001F681", "Helicopter"}, // ð
|
|||
|
{"\U0001F680", "Rocket"}, // ð
|
|||
|
{"\U0001F6EB", "Airplane"}, // ðŦ
|
|||
|
|
|||
|
// Currency Symbols
|
|||
|
{"\U00000024", "Dollar Sign"}, // $
|
|||
|
{"\U000000A3", "Pound Sign"}, // ÂĢ
|
|||
|
{"\U000000A5", "Yen Sign"}, // ÂĨ
|
|||
|
{"\U000020AC", "Euro Sign"}, // âŽ
|
|||
|
{"\U0001F4B5", "Dollar Banknote"}, // ðĩ
|
|||
|
{"\U0001F4B4", "Yen Banknote"}, // ðī
|
|||
|
|
|||
|
// Card Suits
|
|||
|
{"\U00002660", "Black Spade Suit"}, // â ïļ
|
|||
|
{"\U00002663", "Black Club Suit"}, // âĢïļ
|
|||
|
{"\U00002665", "Black Heart Suit"}, // âĨïļ
|
|||
|
{"\U00002666", "Black Diamond Suit"}, // âĶïļ
|
|||
|
{"\U0001F0CF", "Joker Card"}, // ð
|
|||
|
|
|||
|
// Office Supplies and Objects
|
|||
|
{"\U0001F4DA", "Books"}, // ð
|
|||
|
{"\U0001F4D7", "Green Book"}, // ð
|
|||
|
{"\U0001F4C8", "Chart with Upwards Trend"}, // ð
|
|||
|
{"\U0001F4C9", "Chart with Downwards Trend"}, // ð
|
|||
|
{"\U0001F4B0", "Money Bag"}, // ð°
|
|||
|
{"\U0001F4B8", "Money with Wings"}, // ðļ
|
|||
|
{"\U0001F4E6", "Package"}, // ðĶ
|
|||
|
|
|||
|
// Miscellaneous Symbols
|
|||
|
{"\U00002757", "Exclamation Mark"}, // â
|
|||
|
{"\U00002714", "Check Mark"}, // âïļ
|
|||
|
{"\U0000274C", "Cross Mark"}, // â
|
|||
|
{"\U00002705", "Check Mark Button"}, // â
|
|||
|
{"\U00002B50", "White Star"}, // â
|
|||
|
{"\U0001F31F", "Glowing Star"}, // ð
|
|||
|
{"\U0001F4A1", "Light Bulb"}, // ðĄ
|
|||
|
{"\U0001F4A3", "Bomb"}, // ðĢ
|
|||
|
{"\U0001F4A9", "Pile of Poo"}, // ðĐ
|
|||
|
// Musical Symbols
|
|||
|
{"\U0001F3B5", "Musical Note"}, // ðĩ
|
|||
|
{"\U0001F3B6", "Multiple Musical Notes"}, // ðķ
|
|||
|
{"\U0001F3BC", "Musical Score"}, // ðž
|
|||
|
{"\U0001F399", "Studio Microphone"}, // ðïļ
|
|||
|
{"\U0001F3A4", "Microphone"}, // ðĪ
|
|||
|
|
|||
|
// Food and Drink
|
|||
|
{"\U0001F35F", "Cheese Wedge"}, // ð§
|
|||
|
{"\U0001F355", "Slice of Pizza"}, // ð
|
|||
|
{"\U0001F32D", "Taco"}, // ðŪ
|
|||
|
{"\U0001F37D", "Beer Mug"}, // ðŧ
|
|||
|
{"\U0001F96B", "Cup with Straw"}, // ðĨĪ
|
|||
|
{"\U0001F32E", "Hot Pepper"}, // ðķïļ
|
|||
|
{"\U0001F95A", "Potato"}, // ðĨ
|
|||
|
|
|||
|
// Zodiac Signs
|
|||
|
{"\U00002600", "Aries"}, // â
|
|||
|
{"\U00002601", "Taurus"}, // â
|
|||
|
{"\U00002602", "Gemini"}, // â
|
|||
|
{"\U00002603", "Cancer"}, // â
|
|||
|
{"\U00002604", "Leo"}, // â
|
|||
|
{"\U00002605", "Virgo"}, // â
|
|||
|
{"\U00002606", "Libra"}, // â
|
|||
|
{"\U00002607", "Scorpio"}, // â
|
|||
|
{"\U00002608", "Sagittarius"}, // â
|
|||
|
{"\U00002609", "Capricorn"}, // â
|
|||
|
{"\U0000260A", "Aquarius"}, // â
|
|||
|
{"\U0000260B", "Pisces"}, // â
|
|||
|
|
|||
|
// Miscellaneous Shapes
|
|||
|
{"\U0001F4C8", "Chart Increasing"}, // ð
|
|||
|
{"\U0001F4C9", "Chart Decreasing"}, // ð
|
|||
|
{"\U0001F4CA", "Bar Chart"}, // ð
|
|||
|
{"\U0001F7E6", "Orange Circle"}, // ð
|
|||
|
{"\U0001F7E7", "Yellow Circle"}, // ðĄ
|
|||
|
{"\U0001F7E8", "Green Circle"}, // ðĒ
|
|||
|
{"\U0001F7E9", "Blue Circle"}, // ðĩ
|
|||
|
{"\U0001F7EA", "Purple Circle"}, // ðĢ
|
|||
|
|
|||
|
// Flags
|
|||
|
{"\U0001F1E6\U0001F1E9", "Flag of France"}, // ðŦð·
|
|||
|
{"\U0001F1E8\U0001F1E6", "Flag of Germany"}, // ðĐðŠ
|
|||
|
{"\U0001F1FA\U0001F1F8", "Flag of United States"}, // ðšðļ
|
|||
|
{"\U0001F1E7\U0001F1F7", "Flag of Canada"}, // ðĻðĶ
|
|||
|
{"\U0001F1EE\U0001F1F2", "Flag of Italy"}, // ðŪðđ
|
|||
|
{"\U0001F1F8\U0001F1EC", "Flag of Australia"}, // ðĶðš
|
|||
|
{"\U0001F1F3\U0001F1F4", "Flag of Spain"}, // ðŠðļ
|
|||
|
|
|||
|
// Additional Miscellaneous Symbols
|
|||
|
{"\U0001F4A5", "Collision"}, // ðĨ
|
|||
|
{"\U0001F4A6", "Sweat Droplets"}, // ðĶ
|
|||
|
{"\U0001F4A8", "Dashing Away"}, // ðĻ
|
|||
|
{"\U0001F50B", "Battery"}, // ð
|
|||
|
{"\U0001F4BB", "Laptop Computer"}, // ðŧ
|
|||
|
{"\U0001F4DE", "Telephone"}, // ð
|
|||
|
{"\U0001F4E7", "Incoming Envelope"}, // ð§
|
|||
|
};
|
|||
|
size_t remo_count = sizeof(remo) / sizeof(remo[0]);
|
|||
|
|
|||
|
void rstrtolower(const char *input, char *output) {
|
|||
|
while (*input) {
|
|||
|
*output = tolower(*input);
|
|||
|
input++;
|
|||
|
output++;
|
|||
|
}
|
|||
|
*output = 0;
|
|||
|
}
|
|||
|
bool rstrinstr(const char *haystack, const char *needle) {
|
|||
|
char lower1[strlen(haystack) + 1];
|
|||
|
char lower2[strlen(needle) + 1];
|
|||
|
rstrtolower(haystack, lower1);
|
|||
|
rstrtolower(needle, lower2);
|
|||
|
return strstr(lower1, lower2) ? true : false;
|
|||
|
}
|
|||
|
|
|||
|
void remo_print() {
|
|||
|
|
|||
|
for (size_t i = 0; i < remo_count; i++) {
|
|||
|
printf("%s - %s\n", remo[i].str, remo[i].description);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
const char *remo_get(char *name) {
|
|||
|
for (size_t i = 0; i < remo_count; i++) {
|
|||
|
if (rstrinstr(remo[i].description, name)) {
|
|||
|
return remo[i].str;
|
|||
|
}
|
|||
|
}
|
|||
|
return NULL;
|
|||
|
}
|
|||
|
|
|||
|
#endif
|