Bläddra i källkod

Do not use htons/htonl in makefont.c, since we already have hton16/hton32

which do not require to initialise winsock on Windows. Addresses #48.
tags/v0.99.beta17
Sam Hocevar sam 15 år sedan
förälder
incheckning
a4cd497318
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. +3
    -2
      tools/makefont.c

+ 3
- 2
tools/makefont.c Visa fil

@@ -30,6 +30,7 @@
#include <pango/pango.h>
#include <pango/pangoft2.h>

#include "caca_stubs.h"
#include "caca.h"

/* Split our big strings into chunks of 480 characters, because it is
@@ -434,13 +435,13 @@ static int printf_unicode(struct glyph *g)

static int printf_u32(char const *fmt, uint32_t i)
{
uint32_t ni = htonl(i);
uint32_t ni = hton32(i);
return printf_hex(fmt, (uint8_t *)&ni, 4);
}

static int printf_u16(char const *fmt, uint16_t i)
{
uint16_t ni = htons(i);
uint16_t ni = hton16(i);
return printf_hex(fmt, (uint8_t *)&ni, 2);
}



Laddar…
Avbryt
Spara