///////////// ///////////// //int GUI::(lua_State * L) //{} ///////////// bool GUI::is_dropped() // returns true if not dragging { if(is_droppable()) { #ifdef __windows__ #endif #ifdef __gnu_linux__ #endif } return false; }
string Hostname::make_hostname(string sitename) { string hostname; bool lastreplaced = true; // Prevents starting with a dash for(char p : sitename) { if (is_droppable(p)) { continue; } if (!isalnum(p)) { if (!lastreplaced) { hostname += '-'; } lastreplaced = true; } else { hostname += tolower(p); lastreplaced = false; } } if ('-' == hostname[hostname.length() - 1]) { hostname.erase(hostname.length() - 1, 1); } return hostname; }