MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / Write

Method Write

source/Debugger.cpp:2397–2414  ·  view source on GitHub ↗

Write data into the buffer, expanding it as necessary.

Source from the content-addressed store, hash-verified

2395
2396// Write data into the buffer, expanding it as necessary.
2397int Debugger::Buffer::Write(char *aData, size_t aDataSize)
2398{
2399 if (mFailed) // See WriteF() for comments.
2400 return DEBUGGER_E_INTERNAL_ERROR;
2401
2402 if (aDataSize == -1)
2403 aDataSize = strlen(aData);
2404
2405 if (aDataSize == 0)
2406 return DEBUGGER_E_OK;
2407
2408 if (ExpandIfNecessary(mDataUsed + aDataSize) != DEBUGGER_E_OK)
2409 return DEBUGGER_E_INTERNAL_ERROR;
2410
2411 memcpy(mData + mDataUsed, aData, aDataSize);
2412 mDataUsed += aDataSize;
2413 return DEBUGGER_E_OK;
2414}
2415
2416// Write formatted data into the buffer. Supports %s (char*), %e (char*, "&'<> escaped), %i (int), %u (unsigned int), %p (UINT_PTR).
2417int Debugger::Buffer::WriteF(const char *aFormat, ...)

Callers 8

DEBUGGER_COMMANDFunction · 0.45
WritePropertyXmlMethod · 0.45
property_get_or_valueMethod · 0.45
WriteStreamPacketMethod · 0.45
SendErrorResponseMethod · 0.45
SendResponseMethod · 0.45
ConnectMethod · 0.45
EndPropertyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected