Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0771c14817
@ -179,6 +179,7 @@ void mf_wordwrap(const struct mf_font_s *font, int16_t width,
|
||||
struct linelen_s current = { 0 };
|
||||
struct linelen_s previous = { 0 };
|
||||
bool full;
|
||||
uint32_t giveUp = 2048; /* Do while-loop a maximum of x times */
|
||||
|
||||
current.start = text;
|
||||
|
||||
@ -214,6 +215,12 @@ void mf_wordwrap(const struct mf_font_s *font, int16_t width,
|
||||
current.last_word.space = 0;
|
||||
current.last_word.chars = 0;
|
||||
}
|
||||
|
||||
giveUp--;
|
||||
if (giveUp == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Dispatch the last lines. */
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <QThread>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
extern "C" void _gosPostInit(void);
|
||||
|
||||
class Thread : public QThread
|
||||
{
|
||||
@ -86,6 +87,12 @@ void* gfxAlloc(size_t sz)
|
||||
return malloc(sz);
|
||||
}
|
||||
|
||||
void* gfxRealloc(void* ptr, size_t oldsz, size_t newsz)
|
||||
{
|
||||
Q_UNUSED(oldsz)
|
||||
return realloc(ptr, newsz);
|
||||
}
|
||||
|
||||
void gfxFree(void* ptr)
|
||||
{
|
||||
free(ptr);
|
||||
|
@ -45,6 +45,7 @@ void _gosDeinit();
|
||||
void gfxHalt(const char* msg);
|
||||
void gfxExit(void);
|
||||
void* gfxAlloc(size_t sz);
|
||||
void* gfxRealloc(void *ptr, size_t oldsz, size_t newsz);
|
||||
void gfxFree(void* ptr);
|
||||
void gfxYield(void);
|
||||
void gfxSleepMilliseconds(delaytime_t ms);
|
||||
|
@ -51,6 +51,8 @@ public:
|
||||
DataFile(const std::vector<dictentry_t> &dictionary,
|
||||
const std::vector<glyphentry_t> &glyphs,
|
||||
const fontinfo_t &fontinfo);
|
||||
|
||||
inline DataFile * clone() const { return new DataFile(GetDictionary(), GetGlyphTable(), GetFontInfo()); }
|
||||
|
||||
// Save to a file (custom format)
|
||||
void Save(std::ostream &file) const;
|
||||
|
@ -443,7 +443,7 @@ static const char *usage_msg =
|
||||
" rlefont_show_encoded <datfile> Show the encoded data for debugging.\n"
|
||||
"\n"
|
||||
"Commands specific to bwfont format:\n"
|
||||
" bwfont_export <datfile> [outfile Export to .c source code.\n"
|
||||
" bwfont_export <datfile> [outfile] Export to .c source code.\n"
|
||||
"";
|
||||
|
||||
typedef status_t (*cmd_t)(const std::vector<std::string> &args);
|
||||
|
Loading…
Reference in New Issue
Block a user