• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

oga's tools


Commit MetaInfo

Revision11997a65d58ba9e47bf7101edf34d6ef2c905446 (tree)
Zeit2013-12-31 18:28:25
Autoroga <oga@mxg....>
Commiteroga

Log Message

2013/12/31 lsc V0.05 fix no env(COLUMNS, LINES) prob.

Ändern Zusammenfassung

Diff

--- a/lsc.c
+++ b/lsc.c
@@ -5,6 +5,7 @@
55 * 1995.08.21 V0.02 support 3050RX
66 * 1995.08.21 V0.03 support symbolic link.
77 * 2004.10.13 V0.04 support linux and fix link check
8+ * 2013.12.31 V0.05 fix no env prob
89 *
910 */
1011
@@ -30,7 +31,7 @@
3031 #define CALXY x*y_max+y+off_y*x_max*y_max
3132
3233 int x_max = 0, y_max = 0, off_y = 0, max_file_len = 0;
33-int env_x, env_y;
34+int env_x = 0, env_y = 0; /* V0.05-C */
3435
3536 char dirf[MAX_ENT];
3637
@@ -149,8 +150,12 @@ char *b[];
149150 }
150151 */
151152 #else
152- env_x = atoi(getenv("COLUMNS"));
153- env_y = atoi(getenv("LINES"));
153+ if (getenv("COLUMNS")) { /* V0.05-A */
154+ env_x = atoi(getenv("COLUMNS"));
155+ }
156+ if (getenv("LINES")) { /* V0.05-A */
157+ env_y = atoi(getenv("LINES"));
158+ }
154159 if (env_x == 0)
155160 env_x = 80;
156161 if (env_y == 0)