     String toconvert = in.substring(codeIndex + 1);
     return toconvert.toInt();
   }
-  return -2;
+
+  return INT_MIN;
 }
 
 String trim(String in) {
   int spaceIndex = in.indexOf(" ");
   return in.substring(spaceIndex + 1, in.length());
 }
-
-int strtoint(String in) {return in.toInt();}
 
 /*
  * This function does not yet have any GCode parsing functionality,

  globalPos.x = sX.pos;
  globalPos.y = sY.pos;

  updateLCD();
}

void setup() {

    if(xindex > -1) sX.testSpin(xindex * 80);
    if(yindex > -1) sY.testSpin(yindex * 80);

    if(xindex == INT_MIN && yindex == INT_MIN) {
      out.msg(1, "No parameters/Invalid values for G0/G1");
      return false;
    }

    return true;
  }

  int mindex = getIndex('M', in);

  if(mindex == 114) {
    out.pos(0);
    return false;
  }

  out.msg(1, "Incorrect/Unsupported G-Code entered");
  return false;
}

