ref: 4ed833284a1ef29cf1957a0dd63191e84ef2b62e
parent: 4a8a52a51c19aff07d4557bed0ac5868912b6821
author: grobe0ba <[email protected]>
date: Tue Aug 2 09:09:56 EDT 2022
fix up some variables, sort-of
--- a/chat-fmt.c
+++ b/chat-fmt.c
@@ -1,7 +1,6 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
-#include <stdio.h>
#define LINELEN 80
@@ -17,8 +16,6 @@
char *line;
char *tok;
int toklen;
- char *idx;
- int nicklen;
int linelen;
int j;
int f;
@@ -33,9 +30,9 @@
f = 1;
linelen = 0;
tok = line;
- toklen = 0;
while((tok = strtok(tok, " ")) != 0) {
- toklen = strlen(tok);
+ int nicklen = 0;
+ int toklen = strlen(tok);
if (f) {
nicklen = toklen;
linelen = nicklen + 2;