MCPcopy Create free account
hub / github.com/Tencent/UnLua / dot

Function dot

Plugins/UnLuaExtensions/LuaSocket/Source/src/mime.cpp:813–828  ·  view source on GitHub ↗

-------------------------------------------------------------------------*\ * Takes one byte and stuff it if needed. \*-------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

811* Takes one byte and stuff it if needed.
812\*-------------------------------------------------------------------------*/
813static size_t dot(int c, size_t state, luaL_Buffer *buffer)
814{
815 luaL_addchar(buffer, (char) c);
816 switch (c) {
817 case '\r':
818 return 1;
819 case '\n':
820 return (state == 1)? 2: 0;
821 case '.':
822 if (state == 2)
823 luaL_addchar(buffer, '.');
824 /* Falls through. */
825 default:
826 return 0;
827 }
828}
829
830/*-------------------------------------------------------------------------*\
831* Incrementally applies smtp stuffing to a string

Callers 1

mime_global_dotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected