ZoriaRPG

ZScript String Processor v0.3.7

Jul 1st, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 18.08 KB | None | 0 0
  1. //String Processor
  2. //v0.3.7
  3.  
  4. int Preprocess_Buffer[214747];
  5.  
  6. //Settings
  7. const int CHAR_EOS = 10; //Mark the end of a string read into the buffer.
  8. const int CHAR_EOS2 = 36; //... Default is either CHAR_LF (10) or CHAR_DOLLAR (36;)
  9.  
  10. const int CHAR_ADDRESS = 36; // By default, we use $ to denote the start of an address.
  11. const int CHAR_ADR_END = 58; //By default, we mark the end of an address wirth a colon (:)
  12.  
  13. //Array indices
  14. //adr_index[]
  15. //! We'll be using these to store the values used by the processor, instead of wasting a bunch of registers.
  16.  
  17. const int STRP_STRING_PTR = 0;
  18. const int STRP_STR_INDEX = 1;
  19. const int STRP_END_ADR = 2;
  20. //3, 4, 5, reserved
  21. const int STRP_checking_adr = 6;
  22. const int STRP_end_of_string = 7;
  23. const int STRP_matched_adr = 8;
  24. const int STRP_adr_lookup = 9;
  25. const int STRP_q = 10; //loops
  26. const int STRP_w = 11;
  27. const int STRP_e = 12;
  28. const int STRP_r = 13;
  29. const int STRP_t = 14;
  30. const int STRP_y = 15;
  31. const int STRP_u = 16;
  32. const int STRP_i = 17;
  33.  
  34.  
  35. void Testpreprocessor(int address){
  36.     PreProcessString(address);
  37.     TraceNL(); TraceS(Preprocess_Buffer); TraceNL();
  38. }
  39.  
  40. int PreProcessString(int address){
  41.    
  42.     //Simple vars
  43.     int adr_lookup; //A place to store the last located address in a string.
  44.     int matched_adr;
  45.     int end_of_string;
  46.     int checking_adr;
  47.    
  48.     //Arrays and Buffers
  49.     int adr_buffer[6]; //A place to store the string address as char.
  50.     int read_adr_buffer[6];
  51.     int q = 0; int e = 0; int r = 0; int t = 0; int u; int i; int w;
  52.     int a; int s; int d; int f; int g; int h; int j;
  53.     int b;
  54.     int adr_index[20]; //3 is the length of the string tied to the address.
  55.     //We will eventuall merge the q through i vars into this array as follows:
  56.     //0 is the string pointer, 1 is the index with the $ token
  57.     //2 is the index of the colon, so we know where to end the loop.
  58.     //3, 4, 5, are reserved
  59.     //checking_adr = 6, end_of_string = 7, matched_rd = 8, adr_lookup = 9
  60.     //q = 10, w = 11, e = 12, r = 13, t = 14, y = 15, u = 16, i = 17,
  61.     //18, 19, 20 unused (thus far)
  62.  
  63.    
  64.    
  65.     //Create string tables, and load them with strings. The format is:
  66.     // $######:String
  67.     // DOLLAR NUMBER COLON TEXT
  68.     int string1[]=
  69.     "$00001:This is the first entry in our string table.
  70.     $00002:This is the second.$00003:This is the third.
  71.        
  72.     ";
  73.     int string2[]=
  74.     "$00004:This is number four.
  75.     $00005:THis is number five.
  76.        
  77.     ";
  78.     int string3[]="$00006:This is our sixth string.$00007:Seven and counting.
  79.        
  80.        
  81.     ";
  82.     int string4[]="$00008:Eighth.
  83.        
  84.        
  85.     ";
  86.     int string5[]="$00009:Nine and still going.
  87.        
  88.        
  89.     ";
  90.     int string6[]="$00010:Address ten, anyone?$00011:Now address eleven.
  91.        
  92.        
  93.     ";
  94.     int string7[]="$00012:Twelve, aned climbing.
  95.        
  96.        
  97.     ";
  98.     int string8[]="$00013:Lucky thirteen.
  99.        
  100.        
  101.     ";
  102.     int string9[]="$00014:The burgular.
  103.        
  104.        
  105.     ";
  106.     int string10[]="$00015:Last set, last address, number fifteen.
  107.        
  108.        
  109.     ";
  110.    
  111.    
  112.     //Store all the string table pointers in an array.
  113.     int strings[]={string1,string2,string3,string4,string5,string6,string7,string8,string9,string10};
  114.    
  115.     int sttr[]="Pointer for string: ";
  116.     TraceNL(); TraceS(sttr); Trace(string1);
  117.     TraceNL(); TraceS(sttr); Trace(string2);
  118.     TraceNL(); TraceS(sttr); Trace(string3);
  119.     TraceNL(); TraceS(sttr); Trace(string4);
  120.     TraceNL(); TraceS(sttr); Trace(string5);
  121.     TraceNL(); TraceS(sttr); Trace(string6);
  122.     TraceNL(); TraceS(sttr); Trace(string7);
  123.     TraceNL(); TraceS(sttr); Trace(string8);
  124.     TraceNL(); TraceS(sttr); Trace(string9);
  125.     TraceNL(); TraceS(sttr); Trace(string10);
  126.    
  127.     //! Get the address:
  128.    
  129.    
  130.     int y; // Temporarily holds array pointers.
  131.    
  132.     //Convert the addres to char and store it in the buffer.
  133.     itoa(adr_buffer,address);
  134.    
  135.         //Load each big string table from the array with their pointers
  136.     for ( ; q <= SizeOfArray(strings); q++ ) { //! <= is intentional here.
  137.         int debug_q[]="THe present 'q' loop is: ";
  138.         TraceNL(); TraceS(debug_q); Trace(q); TraceNL();
  139.         //end_of_string = 0;
  140.         if ( q == SizeOfArray(strings) ) return -1; //break;
  141.             //A safety break from the loop if we scan every string for the address
  142.             //and we don't find it.
  143.        
  144.         //while ( !matched_adr && !end_of_string ) {
  145.             int debug4[]="!matched_adr && !end_of_string";
  146.             TraceNL(); TraceS(debug4); TraceNL();
  147.             //Scan the string, and find the $ char
  148.             s = strings[q];
  149.             for ( ; w <= SizeOfArray(strings[q]); w++ ) {
  150.                 if ( w == SizeOfArray(s) ) {
  151.                     end_of_string = 1; //We finished parsing this string. Time to try the next one.
  152.                     //if ( q < SizeOfArray(strings)-1 ) q++;
  153.                     //else
  154.                         break; //Returns to 'q' loop, and sets the next string pointer in the list, to scan it.
  155.                 }
  156.                 if ( matched_adr ) break; //Eits the for loop, back to tht while loop, and the string is copied to the processing buffer.
  157.                
  158.                 //If the loop is still running...
  159.                 a = strings[q]; b = a[w];
  160.                 int trc[]="Tracing a: ";
  161.                 TraceNL(); TraceS(trc); Trace(a); TraceNL();
  162.                 if ( IsChar(CHAR_ADDRESS,b) ) {
  163.                     int tr[]="Tracing b: ";
  164.                     TraceNL(); TraceS(tr); Trace(b);
  165.                     //We found an address, let's store it.
  166.                     adr_index[STRP_STRING_PTR] = strings[q]; adr_index[STRP_STR_INDEX] = w;
  167.                     int tr2[]="tracing adr_index[STRP_STRING_PTR]): ";
  168.                    
  169.                     TraceNL(); TraceS(tr2); Trace(adr_index[STRP_STRING_PTR]);
  170.                    
  171.                     int tr3[]="Tracing adr_index[STRP_STR_INDEX]): ";
  172.                     TraceNL(); TraceS(tr3); Trace(adr_index[STRP_STR_INDEX]);
  173.                         //0 is the string pointer, 1 is the index with the $ token
  174.                     d = adr_index[STRP_STRING_PTR];
  175.                     int tr4[]="Assigned d";
  176.                     TraceNL(); TraceS(tr4); TraceNL();
  177.                     for ( e = adr_index[STRP_STR_INDEX]; e < SizeOfArray(adr_index[STRP_STRING_PTR]); e++ ) {
  178.                         //Find a colon
  179.                         //y = adr_index[STRP_STR_INDEX];
  180.                         y = adr_index[STRP_STRING_PTR];
  181.                         if ( IsChar(CHAR_ADR_END,y[e]) ) {
  182.                             //We found a colon, so store it...
  183.                             adr_index[STRP_END_ADR] = e;
  184.                             int str_end_addr[]="We've found the end of an address, at index: ";
  185.                             TraceNL(); TraceS(str_end_addr); Trace(e); TraceNL();
  186.                            
  187.                             //2 is the index of the colon, so we know where to end the loop.
  188.                             //Copy the address into the buffer, and compare the two buffers.
  189.                            
  190.                             int str_flush_t[]="Flushing 't'";
  191.                             TraceNL(); TraceS(str_flush_t); TraceNL();
  192.                            
  193.                             t = 0; //Clear this, as we'll need it.
  194.                            
  195.                             int str_rloop[]="We've reached the 'r' loop";
  196.                             TraceNL(); TraceS(str_rloop); TraceNL();
  197.                             for ( r = adr_index[STRP_STR_INDEX]; r < adr_index[STRP_END_ADR]; r++ ) {
  198.                                 y = adr_index[STRP_STRING_PTR];
  199.                                 int str_debug[]="Tracing the pointer during r-loop $address xfer.";
  200.                                 TraceNL(); TraceS(str_debug); Trace(y);
  201.                                
  202.                                 read_adr_buffer[t] = y[r+1];
  203.                                 t++; //Store into the buffer.
  204.                                 checking_adr = 1;
  205.                             }
  206.                             if ( checking_adr ) {
  207.                                 //read_adr_buffer[t+1] = 0; //Set NULL.
  208.                                 int debug2[]="Print the address that we read into the buffer: ";
  209.                                 TraceNL(); TraceS(debug2); TraceS(read_adr_buffer); TraceNL();
  210.                                 break;
  211.                             }
  212.                         }
  213.                     }
  214.                     //Compare the read buffer to the lookup buffer.
  215.                     //Store the value we read into read_adr_buffer by
  216.                     //converting it into a number:
  217.                    
  218.                     int str_atoi[]="We reached atio()";
  219.                     TraceNL(); TraceS(str_atoi); TraceNL();
  220.                      
  221.                     adr_lookup = atoi(read_adr_buffer);
  222.                    
  223.                     int str_atoi2[]="The atoi result is: ";
  224.                     TraceS(str_atoi2);
  225.                     Trace(adr_lookup); TraceNL();
  226.                    
  227.                     //See if it matches:
  228.                    
  229.                     if ( adr_lookup == address ) {
  230.                         int str_adl[]= "We reached the address lookup == address check";
  231.                         TraceNL(); TraceS(str_adl); TraceNL();
  232.                         matched_adr = 1;
  233.                         break;
  234.                     }
  235.                     else {
  236.                         int str_adl0[]="We reached address_lookup = 0";
  237.                         TraceNL(); TraceS(str_adl0); TraceNL();
  238.                         matched_adr = 0;
  239.                        
  240.                         //! try editing from here.
  241.                        
  242.                         //if we've reached the end of a string, load the next one
  243.                         //unless we've run out of string sets.
  244.                         continue;
  245.                     }
  246.                    
  247.                     //for ( u = 0; q < 6; u++ ) {
  248.                         //if ( read_adr_buffer[u] == adr_buffer[u] ) matched_adr = 1;
  249.                     //  else {
  250.                     //      matched_adr = 0; //not a match
  251.                     //      //Go back to w, and start on the position next in the list.
  252.                     //      break;
  253.                     //  }
  254.                     //}
  255.                 }
  256.             }
  257.             //if ( matched_adr ) {
  258.             //  int str_mb1[]="We reached the matched_adr break #1";
  259.             //  TraceNL(); TraceS(str_mb1); TraceNL();
  260.             //  break; //Exit the while loop.
  261.             //}
  262.         //}
  263.         if ( matched_adr ) {
  264.             int str_mb2[]="We reached the matched_adr break #2";
  265.                 TraceNL(); TraceS(str_mb2); TraceNL();
  266.             i = 0;
  267.             adr_index[STRP_END_ADR]++; //Start one char after the colon.
  268.            
  269.             //Store the string:
  270.             //Use the values that we recorded for the pointer, the first index, and the last index, and copy the string to our main buffer for processing.
  271.             int striy[]="We've reached the i-y loop";
  272.             TraceNL(); TraceS(striy); TraceNL();
  273.             for ( ; adr_index[STRP_END_ADR] < SizeOfArray(adr_index[STRP_STRING_PTR]); adr_index[STRP_END_ADR]++ ) {
  274.                 y = adr_index[STRP_STRING_PTR];
  275.                 //u = adr_index[STRP_STRING_PTR];
  276.                 if ( y[adr_index[STRP_END_ADR]] != CHAR_EOS || y[adr_index[STRP_END_ADR]] != CHAR_EOS2 ) {
  277.                     Preprocess_Buffer[i] = y[adr_index[STRP_END_ADR]];
  278.                     i++;
  279.                 }
  280.                 if ( y[adr_index[STRP_END_ADR]] == CHAR_EOS || y[adr_index[STRP_END_ADR]] == CHAR_EOS2 ) break;
  281.             }
  282.            
  283.             break; //Exit the q loop...
  284.         }
  285.     }
  286.     //If the q loop breaks, the function ends.
  287.     return 1; //The function tells us that it was successful in finding a string, and that it stored it in the buffer.
  288.     //We can call if ( PreProcessString(ADDRESS) ) and store it while we check that it was stored.
  289. }
  290.  
  291.  
  292. global script active{
  293.     void run(){
  294.         Testpreprocessor(4);
  295.     }
  296. }
  297.  
  298. //As preProcessString, except that it is supplied with the pointer to an array with pointers stored in it, externally.
  299. //Thus you can build a custom table function, and call PreProcessString from anywhere, globally.
  300. int PreProcessString(int lookup_list, int address){
  301.    
  302.     //Simple vars
  303.     int adr_lookup; //A place to store the last located address in a string.
  304.     int matched_adr;
  305.     int end_of_string;
  306.     int checking_adr;
  307.    
  308.     //Arrays and Buffers
  309.     int adr_buffer[6]; //A place to store the string address as char.
  310.     int read_adr_buffer[6];
  311.     int q = 0; int e = 0; int r = 0; int t = 0; int u; int i; int w;
  312.     int a; int s; int d; int f; int g; int h; int j;
  313.     int b;
  314.     int adr_index[20]; //3 is the length of the string tied to the address.
  315.     //We will eventuall merge the q through i vars into this array as follows:
  316.     //0 is the string pointer, 1 is the index with the $ token
  317.     //2 is the index of the colon, so we know where to end the loop.
  318.     //3, 4, 5, are reserved
  319.     //checking_adr = 6, end_of_string = 7, matched_rd = 8, adr_lookup = 9
  320.     //q = 10, w = 11, e = 12, r = 13, t = 14, y = 15, u = 16, i = 17,
  321.     //18, 19, 20 unused (thus far)
  322.  
  323.    
  324.    
  325.     //Create string tables, and load them with strings. The format is:
  326.     // $######:String
  327.     // DOLLAR NUMBER COLON TEXT
  328.     int string1[]=
  329.     "$00001:This is the first entry in our string table.
  330.     $00002:This is the second.$00003:This is the third.
  331.        
  332.     ";
  333.     int string2[]=
  334.     "$00004:This is number four.
  335.     $00005:THis is number five.
  336.        
  337.     ";
  338.     int string3[]="$00006:This is our sixth string.$00007:Seven and counting.
  339.        
  340.        
  341.     ";
  342.     int string4[]="$00008:Eighth.
  343.        
  344.        
  345.     ";
  346.     int string5[]="$00009:Nine and still going.
  347.        
  348.        
  349.     ";
  350.     int string6[]="$00010:Address ten, anyone?$00011:Now address eleven.
  351.        
  352.        
  353.     ";
  354.     int string7[]="$00012:Twelve, aned climbing.
  355.        
  356.        
  357.     ";
  358.     int string8[]="$00013:Lucky thirteen.
  359.        
  360.        
  361.     ";
  362.     int string9[]="$00014:The burgular.
  363.        
  364.        
  365.     ";
  366.     int string10[]="$00015:Last set, last address, number fifteen.
  367.        
  368.        
  369.     ";
  370.    
  371.    
  372.     //Store all the string table pointers in an array.
  373.     int strings[]={string1,string2,string3,string4,string5,string6,string7,string8,string9,string10};
  374.    
  375.     int sttr[]="Pointer for string: ";
  376.     TraceNL(); TraceS(sttr); Trace(string1);
  377.     TraceNL(); TraceS(sttr); Trace(string2);
  378.     TraceNL(); TraceS(sttr); Trace(string3);
  379.     TraceNL(); TraceS(sttr); Trace(string4);
  380.     TraceNL(); TraceS(sttr); Trace(string5);
  381.     TraceNL(); TraceS(sttr); Trace(string6);
  382.     TraceNL(); TraceS(sttr); Trace(string7);
  383.     TraceNL(); TraceS(sttr); Trace(string8);
  384.     TraceNL(); TraceS(sttr); Trace(string9);
  385.     TraceNL(); TraceS(sttr); Trace(string10);
  386.    
  387.     //! Get the address:
  388.    
  389.    
  390.     int y; // Temporarily holds array pointers.
  391.    
  392.     //Convert the addres to char and store it in the buffer.
  393.     itoa(adr_buffer,address);
  394.    
  395.         //Load each big string table from the array with their pointers
  396.     for ( ; q <= SizeOfArray(strings); q++ ) { //! <= is intentional here.
  397.         int debug_q[]="THe present 'q' loop is: ";
  398.         TraceNL(); TraceS(debug_q); Trace(q); TraceNL();
  399.        
  400.         if ( q == SizeOfArray(strings) ) return -1; //break;
  401.             //A safety break from the loop if we scan every string for the address
  402.             //and we don't find it.
  403.        
  404.         while ( !matched_adr && !end_of_string ) {
  405.             //Scan the string, and find the $ char
  406.             s = strings[q];
  407.             for ( ; w <= SizeOfArray(strings[q]); w++ ) {
  408.                 if ( w == SizeOfArray(s) ) {
  409.                     end_of_string = 1; //We finished parsing this string. Time to try the next one.
  410.                     break; //Returns to 'q' loop, and sets the next string pointer in the list, to scan it.
  411.                 }
  412.                 if ( matched_adr ) break; //Eits the for loop, back to tht while loop, and the string is copied to the processing buffer.
  413.                
  414.                 //If the loop is still running...
  415.                 a = strings[q]; b = a[w];
  416.                 int trc[]="Tracing a: ";
  417.                 TraceNL(); TraceS(trc); Trace(a); TraceNL();
  418.                 if ( IsChar(CHAR_ADDRESS,b) ) {
  419.                     int tr[]="Tracing b: ";
  420.                     TraceNL(); TraceS(tr); Trace(b);
  421.                     //We found an address, let's store it.
  422.                     adr_index[STRP_STRING_PTR] = strings[q]; adr_index[STRP_STR_INDEX] = w;
  423.                     int tr2[]="tracing adr_index[STRP_STRING_PTR]): ";
  424.                    
  425.                     TraceNL(); TraceS(tr2); Trace(adr_index[STRP_STRING_PTR]);
  426.                    
  427.                     int tr3[]="Tracing adr_index[STRP_STR_INDEX]): ";
  428.                     TraceNL(); TraceS(tr3); Trace(adr_index[STRP_STR_INDEX]);
  429.                         //0 is the string pointer, 1 is the index with the $ token
  430.                     d = adr_index[STRP_STRING_PTR];
  431.                     int tr4[]="Assigned d";
  432.                     TraceNL(); TraceS(tr4); TraceNL();
  433.                     for ( e = adr_index[STRP_STR_INDEX]; e < SizeOfArray(adr_index[STRP_STRING_PTR]); e++ ) {
  434.                         //Find a colon
  435.                         //y = adr_index[STRP_STR_INDEX];
  436.                         y = adr_index[STRP_STRING_PTR];
  437.                         if ( IsChar(CHAR_ADR_END,y[e]) ) {
  438.                             //We found a colon, so store it...
  439.                             adr_index[STRP_END_ADR] = e;
  440.                             int str_end_addr[]="We've found the end of an address, at index: ";
  441.                             TraceNL(); TraceS(str_end_addr); Trace(e); TraceNL();
  442.                            
  443.                             //2 is the index of the colon, so we know where to end the loop.
  444.                             //Copy the address into the buffer, and compare the two buffers.
  445.                            
  446.                             int str_flush_t[]="Flushing 't'";
  447.                             TraceNL(); TraceS(str_flush_t); TraceNL();
  448.                            
  449.                             t = 0; //Clear this, as we'll need it.
  450.                            
  451.                             int str_rloop[]="We've reached the 'r' loop";
  452.                             TraceNL(); TraceS(str_rloop); TraceNL();
  453.                             for ( r = adr_index[STRP_STR_INDEX]; r < adr_index[STRP_END_ADR]; r++ ) {
  454.                                 y = adr_index[STRP_STRING_PTR];
  455.                                 int str_debug[]="Tracing the pointer during r-loop $address xfer.";
  456.                                 TraceNL(); TraceS(str_debug); Trace(y);
  457.                                
  458.                                 read_adr_buffer[t] = y[r+1];
  459.                                 t++; //Store into the buffer.
  460.                                 checking_adr = 1;
  461.                             }
  462.                             if ( checking_adr ) {
  463.                                 //read_adr_buffer[t+1] = 0; //Set NULL.
  464.                                 int debug2[]="Print the address that we read into the buffer: ";
  465.                                 TraceNL(); TraceS(debug2); TraceS(read_adr_buffer); TraceNL();
  466.                                 break;
  467.                             }
  468.                         }
  469.                     }
  470.                     //Compare the read buffer to the lookup buffer.
  471.                     //Store the value we read into read_adr_buffer by
  472.                     //converting it into a number:
  473.                    
  474.                     int str_atoi[]="We reached atio()";
  475.                     TraceNL(); TraceS(str_atoi); TraceNL();
  476.                      
  477.                     adr_lookup = atoi(read_adr_buffer);
  478.                    
  479.                     int str_atoi2[]="The atoi result is: ";
  480.                     TraceS(str_atoi2);
  481.                     Trace(adr_lookup); TraceNL();
  482.                    
  483.                     //See if it matches:
  484.                    
  485.                     if ( adr_lookup == address ) {
  486.                         int str_adl[]= "We reached the address lookup == address check";
  487.                         TraceNL(); TraceS(str_adl); TraceNL();
  488.                         matched_adr = 1;
  489.                         break;
  490.                     }
  491.                     else {
  492.                         int str_adl0[]="We reached address_lookup = 0";
  493.                         TraceNL(); TraceS(str_adl0); TraceNL();
  494.                         matched_adr = 0;
  495.                         continue;
  496.                     }
  497.                    
  498.                     //for ( u = 0; q < 6; u++ ) {
  499.                         //if ( read_adr_buffer[u] == adr_buffer[u] ) matched_adr = 1;
  500.                     //  else {
  501.                     //      matched_adr = 0; //not a match
  502.                     //      //Go back to w, and start on the position next in the list.
  503.                     //      break;
  504.                     //  }
  505.                     //}
  506.                 }
  507.             }
  508.             if ( matched_adr ) {
  509.                 int str_mb1[]="We reached the matched_adr break #1";
  510.                 TraceNL(); TraceS(str_mb1); TraceNL();
  511.                 break; //Exit the while loop.
  512.             }
  513.         }
  514.         if ( matched_adr ) {
  515.             int str_mb2[]="We reached the matched_adr break #2";
  516.                 TraceNL(); TraceS(str_mb2); TraceNL();
  517.             i = 0;
  518.             adr_index[STRP_END_ADR]++; //Start one char after the colon.
  519.            
  520.             //Store the string:
  521.             //Use the values that we recorded for the pointer, the first index, and the last index, and copy the string to our main buffer for processing.
  522.             int striy[]="We've reached the i-y loop";
  523.             TraceNL(); TraceS(striy); TraceNL();
  524.             for ( ; adr_index[STRP_END_ADR] < SizeOfArray(adr_index[STRP_STRING_PTR]); adr_index[STRP_END_ADR]++ ) {
  525.                 y = adr_index[STRP_STRING_PTR];
  526.                 //u = adr_index[STRP_STRING_PTR];
  527.                 if ( y[adr_index[STRP_END_ADR]] != CHAR_EOS || y[adr_index[STRP_END_ADR]] != CHAR_EOS2 ) {
  528.                     Preprocess_Buffer[i] = y[adr_index[STRP_END_ADR]];
  529.                     i++;
  530.                 }
  531.                 if ( y[adr_index[STRP_END_ADR]] == CHAR_EOS || y[adr_index[STRP_END_ADR]] == CHAR_EOS2 ) break;
  532.             }
  533.            
  534.             break; //Exit the q loop...
  535.         }
  536.     }
  537.     //If the q loop breaks, the function ends.
  538.     return 1; //The function tells us that it was successful in finding a string, and that it stored it in the buffer.
  539.     //We can call if ( PreProcessString(ADDRESS) ) and store it while we check that it was stored.
  540. }
Add Comment
Please, Sign In to add comment