svnno****@sourc*****
svnno****@sourc*****
2011年 1月 18日 (火) 00:29:27 JST
Revision: 147 http://sourceforge.jp/projects/negitoro/svn/view?view=rev&revision=147 Author: is2os Date: 2011-01-18 00:29:27 +0900 (Tue, 18 Jan 2011) Log Message: ----------- tview 0.2.1 [tview.c] ã»r142ã®ã³ã¼ãã¬ãã¥ã¼ã§ã®ææããã£ãã¯ã¹ [strtok.c] ã»ãã¡ã¤ã«åé¤ Modified Paths: -------------- trunk/apps/tview/tview.c Removed Paths: ------------- trunk/apps/tview/strtok.c Deleted: trunk/apps/tview/strtok.c =================================================================== --- trunk/apps/tview/strtok.c 2011-01-14 17:35:57 UTC (rev 146) +++ trunk/apps/tview/strtok.c 2011-01-17 15:29:27 UTC (rev 147) @@ -1,34 +0,0 @@ -/* strtok.c */ -/* NULLð·×Ä0Éu«·¦½àÌ by JsZ */ - -/* -* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. -* See the copyright notice in the ACK home directory, in the file "Copyright". -*/ -/* $Header: strspn.c,v 1.1 89/05/11 10:09:09 eck Exp $ */ - -#include <string.h> - -char *strtok(register char *string, const char *separators) -{ - register char *s1, *s2; - static char *savestring; - - if (string == 0) { - string = savestring; - if (string == 0) return 0; - } - - s1 = string + strspn(string, separators); - if (*s1 == '\0') { - savestring = 0; - return 0; - } - - s2 = strpbrk(s1, separators); - if (s2 != 0) *s2++ = '\0'; - savestring = s2; - - return s1; -} - Modified: trunk/apps/tview/tview.c =================================================================== --- trunk/apps/tview/tview.c 2011-01-14 17:35:57 UTC (rev 146) +++ trunk/apps/tview/tview.c 2011-01-17 15:29:27 UTC (rev 147) @@ -1,14 +1,16 @@ /* eLXgr [[ */ -/* Ver 0.2 by JsZ t@C¼Æt@CTCYð\¦·éæ¤Éµ½ */ +/* Ver 0.2.0 up t@C¼Æt@CTCYð\¦·éæ¤Éµ½(JsZ) */ +/* Ver 0.2.1 fix ÅåÌsð45©ç43É */ +/* strtokðgíÈ¢æ¤Éµ½ */ +/* ŬÌð30ÉÅèµ½(JsZ) */ + #include "apilib.h" #include <stdio.h> #include <string.h> -#include "strtok.c" - int strtol(char *s, char **endp, int base); /* WÖistdlib.hj */ char *skipspace(char *p); @@ -42,8 +44,8 @@ if (h < 1) { h = 1; } - if (h > 45) { - h = 45; + if (h > 43) { + h = 43; } } else if (p[1] == 't') { t = strtol(p + 2, &p, 0); @@ -84,8 +86,7 @@ /* t@CTCYÆt@C¼ð\¦ */ sprintf(s2, "%d byte", j); api_putstrwin(win, (w * 8 + 9) - strlen(s2) * 8, h * 16 + 37 - 3, 0, strlen(s2), s2); - sprintf(s2, "%s", strtok(q, " ")); - api_putstrwin(win, 6, h * 16 + 37 - 3, 0, strlen(s2), s2); + api_putstrwin(win, 6, h * 16 + 37 - 3, 0, strlen(q), q); if (j >= 240 * 1024 - 1) { j = 240 * 1024 - 2;