#define CAT_MAX 15 // максимум категорий
#define KW_MAX 15 // максимум ключевых слов, включая имя файла, в категории
#define VLEN_MAX 96 // максимальная длина строки
int stringsearch(const char *buf, const char *str, char *savestr); // ищет в начале buf подстроку str, если есть, то все после '=' копирует в savestr
int main(int argc, char **argv)
{
int catIndex, wordIndex;
char *categorykw[CAT_MAX][KW_MAX] = {
{"/home/live/.jwm/Desktop", "Desktop", "Screensaver", "Accessibility", NULL},
{"/home/live/.jwm/System", "System","Monitor","Security","HardwareSettings","Core", NULL},
{"/home/live/.jwm/Setup","Setup","PackageManager", NULL},
{"/home/live/.jwm/Utility","Utility","Viewer","Development","Building","Debugger","IDE","Profiling","Translation","GUIDesigner","Archiving","TerminalEmulator","Shell", NULL},
{"/home/live/.jwm/Filesystem","File", NULL},
{"/home/live/.jwm/Graphic","Graphic","Photography","Presentation","Chart", NULL},
{"/home/live/.jwm/Office","Office","Document","WordProcessor","WebDevelopment","TextEditor","Dictionary", NULL},
{"/home/live/.jwm/Calculate","Calculat","Finance","Spreadsheet","ProjectManagement", NULL},
{"/home/live/.jwm/Personal","Personal","Calendar","ContactManagement", NULL},
{"/home/live/.jwm/Network","Network","Dialup","HamRadio","RemoteAccess", NULL},
{"/home/live/.jwm/Internet","Internet","WebBrowser","Email","News","InstantMessaging","Telephony","IRCClient","FileTransfer","P2P", NULL},
{"/home/live/.jwm/Multimedia","Video","Player","Music","Audio","Midi","Mixer","Sequencer","Tuner","TV","DiskBurning", NULL},
{"/home/live/.jwm/Game","Game","Amusement","RolePlaying","Simulation", NULL},
{ NULL }
}; // массив имен файлов категорий и ключевых слов к ним