MCPcopy Create free account
hub / github.com/TASEmulators/fceux / getKeyValuePair

Function getKeyValuePair

src/drivers/Qt/ConsoleDebugger.cpp:4801–4867  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

4799}
4800//----------------------------------------------------------------------------
4801static int getKeyValuePair( int i, const char *stmp, char *id, char *data )
4802{
4803 int j=0;
4804 char literal=0;
4805
4806 id[0] = 0; data[0] = 0;
4807
4808 if ( stmp[i] == 0 ) return i;
4809
4810 while ( isspace(stmp[i]) ) i++;
4811
4812 j=0;
4813 while ( isalnum(stmp[i]) )
4814 {
4815 id[j] = stmp[i]; j++; i++;
4816 }
4817 id[j] = 0;
4818
4819 if ( j == 0 )
4820 {
4821 return i;
4822 }
4823 if ( stmp[i] != '=' )
4824 {
4825 return i;
4826 }
4827 i++; j=0;
4828 if ( stmp[i] == '\"' )
4829 {
4830 literal = 0;
4831 i++;
4832 while ( stmp[i] != 0 )
4833 {
4834 if ( literal )
4835 {
4836 data[j] = stmp[i]; i++; j++;
4837 literal = 0;
4838 }
4839 else
4840 {
4841 if ( stmp[i] == '\\' )
4842 {
4843 literal = 1; i++;
4844 }
4845 else if ( stmp[i] == '\"' )
4846 {
4847 i++; break;
4848 }
4849 else
4850 {
4851 data[j] = stmp[i]; j++; i++;
4852 }
4853 }
4854 }
4855 data[j] = 0;
4856 }
4857 else
4858 {

Callers 1

loadGameDebugBreakpointsFunction · 0.85

Calls 1

isspaceClass · 0.85

Tested by

no test coverage detected