#if 0 # keithhedger Wed 20 Dec 16:18:20 GMT 2023 kdhedger68713@gmail.com pushd .. make -j3 popd if [[ $USEVALGRIND -eq 1 ]];then VALGRIND="valgrind --leak-check=full" fi if [[ $USEVALGRIND -eq 2 ]];then VALGRIND="valgrind --leak-check=full --show-leak-kinds=all" fi APPNAME=$(basename $0 .cpp) g++ "$0" -O0 -ggdb -I../LFSToolKit -L../LFSToolKit/app/.libs $(pkg-config --cflags --libs x11 xft cairo ) -llfstoolkit -lImlib2 -o $APPNAME||exit 1 LD_LIBRARY_PATH=../LFSToolKit/app/.libs $VALGRIND ./$APPNAME "$@" retval=$? echo "Exit code $retval" rm $APPNAME exit $retval #endif #include #include #include #include #include "lfstk/LFSTKGlobals.h" std::string getentry(std::string keyname,std::vector lines) { std::string retval; std::vector linestok; for(unsigned j=0;j linestok; std::vector lines; std::map> maplines; std::string mapentry; unsigned long currentkey=0; myfile.open(argv[1],std::fstream::in); if(myfile.is_open()) { std::string data; while(std::getline(myfile,data)) { if(data.empty()==false) { data=LFSTK_UtilityClass::LFSTK_strStrip(data); if(data.at(0)=='[') { std::string t=data; mapentry=LFSTK_UtilityClass::LFSTK_strReplaceAllChar(t,"[]","",true); currentkey=LFSTK_UtilityClass::LFSTK_hashFromKey(mapentry); } else maplines[currentkey].push_back(data); lines.push_back(data); } } myfile.close(); } for(int j=0;j"<"<"<"<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-\n"<> maplines3; std::string entry="Desktop Action new-private-window"; //entry="Desktop Entry"; maplines3=LFSTK_UtilityClass::LFSTK_readFullDesktopFile(argv[1]); //std::cerr<first<second.at(0)<"<"<"<"<"<"<