[Negitoro-svn] [147] tview 0.2.1

Back to archive index

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 @@
 /* ƒeƒLƒXƒgƒrƒ…[ƒ[ */
 
-/* Ver 0.2 by JsZ ƒtƒ@ƒCƒ‹–¼‚ƃtƒ@ƒCƒ‹ƒTƒCƒY‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½ */
+/* Ver 0.2.0 up ƒtƒ@ƒCƒ‹–¼‚ƃtƒ@ƒCƒ‹ƒTƒCƒY‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½(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.hj */
 
 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ƒ@ƒCƒ‹ƒTƒCƒY‚ƃ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;




Negitoro-svn メーリングリストの案内
Back to archive index