您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

50 行
1.1 KiB

  1. /*
  2. * unicode libcaca Unicode rendering test program
  3. * Copyright (c) 2006 Sam Hocevar <sam@zoy.org>
  4. * All Rights Reserved
  5. *
  6. * $Id$
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the Do What The Fuck You Want To
  10. * Public License, Version 2, as published by Sam Hocevar. See
  11. * http://sam.zoy.org/wtfpl/COPYING for more details.
  12. */
  13. #include "config.h"
  14. #if defined(HAVE_INTTYPES_H)
  15. # include <inttypes.h>
  16. #else
  17. typedef unsigned char uint8_t;
  18. typedef unsigned short uint16_t;
  19. typedef unsigned int uint32_t;
  20. #endif
  21. #include "cucul.h"
  22. #include "caca.h"
  23. int main(void)
  24. {
  25. cucul_t *qq;
  26. caca_t *kk;
  27. qq = cucul_init();
  28. kk = caca_attach(qq);
  29. cucul_putstr(qq, 1, 1, "This is ASCII: [ abc DEF 123 !@# ]");
  30. cucul_putstr(qq, 1, 2, "This is Unicode: [ äβç ΔЗҒ ░▒▓ ♩♔✈ ]");
  31. cucul_putstr(qq, 1, 4, "If the two lines do not have the same length, there is a bug somewhere.");
  32. caca_display(kk);
  33. while(!caca_get_event(kk, CACA_EVENT_KEY_PRESS));
  34. caca_detach(kk);
  35. cucul_end(qq);
  36. return 0;
  37. }