Changeset 4300
- Timestamp:
- Jan 24, 2010, 10:58:17 PM (12 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/codec/export.c
r4299 r4300 993 993 static uint8_t _rgb_to_troff_index(uint32_t color) 994 994 { 995 int i; 996 uint8_t r = 0; 997 for(i = 0; i < 3; i++) 998 { 999 r += ((color >> (8*i+7))&1) << i; 1000 } 1001 return r; 995 int i; 996 uint8_t r = 0; 997 for(i = 0; i < 3; i++) 998 r += ((color >> (8 * i + 7)) & 1) << i; 999 1000 return r; 1002 1001 } 1003 1002 … … 1015 1014 int started = 0; 1016 1015 1017 /* Each char is at most 1016 /* Each char is at most 1018 1017 * 2x\mM (2x10) 1019 1018 * + \fB + \fI + \fR (9) … … 1038 1037 for(x = 0; x < cv->width; x++) 1039 1038 { 1040 1041 1042 1043 1044 1045 1046 1047 1039 uint32_t fg = _rgb_to_troff_index(_caca_attr_to_rgb24fg(lineattr[x])); 1040 uint32_t bg = _rgb_to_troff_index(_caca_attr_to_rgb24bg(lineattr[x])); 1041 uint32_t ch = linechar[x]; 1042 1043 if(fg != prevfg || !started) 1044 cur += sprintf(cur, "\\m[%s]", colors[fg]); 1045 if(bg != prevbg || !started) 1046 cur += sprintf(cur, "\\M[%s]", colors[bg]); 1048 1047 if(lineattr[x] & CACA_BOLD) 1049 1048 cur += sprintf(cur, "\\fB"); … … 1062 1061 prevbg = bg; 1063 1062 started = 1; 1064 1063 } 1065 1064 1066 1065 /* Add unbreakable space at the end of lines, else spaces are dropped */ -
libcaca/trunk/doc
- Property svn:ignore
-
old new 2 2 Makefile.in 3 3 doxygen.cfg 4 doxygen.log 4 5 man 5 6 html
-
- Property svn:ignore
-
libcaca/trunk/examples
- Property svn:ignore
-
old new 3 3 .libs 4 4 .deps 5 blit 6 canvas 7 colors 8 conio 9 conio-snake 10 demo 11 demo0 12 dithering 13 driver 14 event 15 export 16 figfont 17 font 18 font2tga 19 frames 20 fullwidth 21 gamma 5 22 hsv 6 23 import 7 canvas 8 export 9 gamma 24 input 25 mouse 26 spritedit 27 swallow 28 text 29 transform 30 trifiller 31 truecolor 10 32 unicode 11 figfont12 demo013 transform14 dithering15 event16 colors17 font18 spritedit19 frames20 truecolor21 font2tga22 text23 demo24 swallow25 blit26 driver27 input28 fullwidth29 conio30 conio-snake31 33 *.exe 32 34 *.user
-
- Property svn:ignore
-
libcaca/trunk/java
-
Property
svn:ignore
set to
Makefile.in
Makefile
.libs
.deps
*.a
-
Property
svn:ignore
set to
-
libcaca/trunk/kernel/Makefile.am
r4298 r4300 21 21 rm -f bootsect.bin kern.bin kernel.map 22 22 23 echo-sources: ; echo $(SOURCES) 24 -
libcaca/trunk/kernel/kernel.c
r4160 r4300 1 1 /* 2 * libcaca 2 * libcaca 3 3 * libcaca Colour ASCII-Art library 4 4 * Copyright (c) 2006 Sam Hocevar <sam@hocevar.net> … … 35 35 struct processor_info processor_info; 36 36 struct floppy_info floppy_info; 37 37 38 38 printf("_start at 0x%x\n", _start); 39 39 printf("kmain() at 0x%x\n", kmain); 40 40 printf("Types : char[%d] short[%d] int[%d] unsigned long long[%d]\n", sizeof(char), sizeof(short), sizeof(int), sizeof(unsigned long long)); 41 41 42 42 enable_interrupt(1); // Enable Keyboard Interrupt (IRQ1) 43 43 enable_interrupt(0); // Enable IRQ0 (timer) 44 44 enable_interrupt(13); 45 45 timer_phase(100); // Fire IRQ0 each 1/100s 46 47 46 47 48 48 processor_get_info(&processor_info); 49 49 processor_print_info(&processor_info); … … 54 54 /* Caca is delicious */ 55 55 printf("Filling memory with 0xCACA, starting from 0x%x\n", end); 56 56 57 57 char *ptr = end; 58 58 while (1) -
libcaca/trunk/kernel/kernel.h
r4159 r4300 1 1 /* 2 * libcaca 2 * libcaca 3 3 * libcaca Colour ASCII-Art library 4 4 * Copyright (c) 2006 Sam Hocevar <sam@hocevar.net> … … 27 27 void enable_interrupt(char i); 28 28 29 #define cli __asm__("cli" : : ) 30 #define sti __asm__("sti" : : ) 29 31 30 #define cli __asm__("cli"::) 31 #define sti __asm__("sti"::) 32 33 #define rdtsc(low,high) \ 34 __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) 35 32 #define rdtsc(low, high) \ 33 __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) 36 34 37 35 /* The application's entry point */ -
libcaca/trunk/kernel/klibc.h
- Property svn:executable deleted
-
libcaca/trunk/kernel/multiboot.h
r568 r4300 1 1 /* multiboot.h - the header for Multiboot */ 2 2 /* Copyright (C) 1999 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify 5 5 it under the terms of the GNU General Public License as published by 6 6 the Free Software Foundation; either version 2 of the License, or 7 7 (at your option) any later version. 8 8 9 9 This program is distributed in the hope that it will be useful, 10 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 12 GNU General Public License for more details. 13 13 14 14 You should have received a copy of the GNU General Public License 15 15 along with this program; if not, write to the Free Software … … 19 19 20 20 /* The magic number for the Multiboot header. */ 21 #define MULTIBOOT_HEADER_MAGIC 21 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002 22 22 23 23 /* The flags for the Multiboot header. */ 24 #define MULTIBOOT_HEADER_FLAGS 24 #define MULTIBOOT_HEADER_FLAGS 0x00010003 25 25 26 26 /* The magic number passed by a Multiboot-compliant boot loader. */ 27 #define MULTIBOOT_BOOTLOADER_MAGIC 27 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002 28 28 29 29 /* The size of our stack (16KB). */ 30 #define STACK_SIZE 30 #define STACK_SIZE 0x4000 31 31 32 32 /* C symbol format. HAVE_ASM_USCORE is defined by configure. */ 33 33 #ifdef HAVE_ASM_USCORE 34 # define EXT_C(sym) 34 # define EXT_C(sym) _ ## sym 35 35 #else 36 # define EXT_C(sym) 36 # define EXT_C(sym) sym 37 37 #endif 38 38 -
libcaca/trunk/test/check-build
r4297 r4300 28 28 # 29 29 failure=0 30 for dir in caca src cxx examples ruby tools; do30 for dir in caca kernel src cxx examples ruby tools; do 31 31 pushd ../$dir >/dev/null 32 32 for x in $(make -s echo-sources); do … … 57 57 warnings="$(grep -c Warning: ../doc/doxygen.log)" 58 58 if test "$warnings" != "0"; then 59 echo "error: $warnings warnings in Doxygen generation" 59 echo "error: $warnings warnings in Doxygen generation:" 60 grep Warning: ../doc/doxygen.log | sed 's/\(.\{75\}\)...*/\1 .../' 60 61 ret=1 61 62 else -
libcaca/trunk/win32/config.h
r3908 r4300 26 26 /* #undef HAVE_INTTYPES_H */ 27 27 /* #undef HAVE_IOCTL */ 28 /* #undef HAVE_JNI_H */ 28 29 /* #undef HAVE_LOCALE_H */ 29 30 #define HAVE_MEMORY_H 1
Note: See TracChangeset
for help on using the changeset viewer.