MCPcopy Create free account
hub / github.com/dborth/vbagx / LoadPrefsFromMethod

Function LoadPrefsFromMethod

source/preferences.cpp:790–816  ·  view source on GitHub ↗

* Load Preferences from specified filepath ***************************************************************************/

Source from the content-addressed store, hash-verified

788 * Load Preferences from specified filepath
789 ***************************************************************************/
790bool
791LoadPrefsFromMethod (char * path)
792{
793 bool retval = false;
794 int offset = 0;
795 char filepath[MAXPATHLEN];
796 sprintf(filepath, "%s/%s", path, PREF_FILE_NAME);
797
798 AllocSaveBuffer ();
799
800 offset = LoadFile(filepath, SILENT);
801
802 if (offset > 0)
803 retval = decodePrefsData ();
804
805 FreeSaveBuffer ();
806
807 if(retval)
808 {
809 strcpy(prefpath, path);
810
811 if(appPath[0] == 0)
812 strcpy(appPath, prefpath);
813 }
814
815 return retval;
816}
817
818/****************************************************************************
819 * Load Preferences

Callers 1

LoadPrefsFunction · 0.85

Calls 4

AllocSaveBufferFunction · 0.85
LoadFileFunction · 0.85
decodePrefsDataFunction · 0.85
FreeSaveBufferFunction · 0.85

Tested by

no test coverage detected