summaryrefslogtreecommitdiffstats
path: root/1/20.c
diff options
context:
space:
mode:
Diffstat (limited to '1/20.c')
-rw-r--r--1/20.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/1/20.c b/1/20.c
index a4f38cb..7ec32ac 100644
--- a/1/20.c
+++ b/1/20.c
@@ -8,14 +8,15 @@ void detab(char to[], char from[], int n);
/* detabs input by replacing tabs with specified number of blanks */
int main(int argc, char *argv[]) {
+ int tabw;
char s[MAXLEN], dtab[MAXLEN];
- int tabw = atoi(argv[1]);
- printf("Enter text to detab and press ctrl+d\n");
+ tabw = atoi(argv[1]);
+ printf("Enter text to detab and press ctrl+d\n");
+
getstr(s);
detab(dtab, s, tabw);
-
printf("\nTab width: %d\n", tabw);
printf("%s\n", dtab);