| 45 | static void fxBufferName(txString dst, txString src, txSize size); |
| 46 | |
| 47 | txString fxAdornStringC(txMachine* the, txString prefix, txSlot* string, txString suffix) |
| 48 | { |
| 49 | txSize stringSize = mxStringLength(string->value.string); |
| 50 | txSize prefixSize = prefix ? mxStringLength(prefix) : 0; |
| 51 | txSize suffixSize = suffix ? mxStringLength(suffix) : 0; |
| 52 | txSize resultSize = fxAddChunkSizes(the, fxAddChunkSizes(the, fxAddChunkSizes(the, stringSize, prefixSize), suffixSize), 1); |
| 53 | txString result = (txString)fxNewChunk(the, resultSize); |
| 54 | if (prefix && prefixSize) |
| 55 | c_memcpy(result, prefix, prefixSize); |
| 56 | if (stringSize) |
| 57 | c_memcpy(result + prefixSize, string->value.string, stringSize); |
| 58 | if (suffix && suffixSize) |
| 59 | c_memcpy(result + prefixSize + stringSize, suffix, suffixSize); |
| 60 | result[prefixSize + stringSize + suffixSize] = 0; |
| 61 | string->kind = XS_STRING_KIND; |
| 62 | string->value.string = result; |
| 63 | return result; |
| 64 | } |
| 65 | |
| 66 | txSlot* fxArgToCallback(txMachine* the, txInteger argi) |
| 67 | { |
no test coverage detected