• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

My own rewrite of the BSD morse code recreational utility


Commit MetaInfo

修訂adf1c293cd4ea78f878be8917d22ab0c0a866542 (tree)
時間2021-08-30 01:47:55
作者Joel Matthew Rees <joel.rees@gmai...>
CommiterJoel Matthew Rees

Log Message

getopt madness

Change Summary

差異

--- a/bsdmorse.c
+++ b/bsdmorse.c
@@ -207,7 +207,10 @@ decode(s)
207207 const char *s;
208208 {
209209 int i;
210-
210+
211+/* JMR20210830: give it a way to dodge the getop dash madness: */
212+ if (*s == ' ')
213+ ++s;
211214 for (i = 0; i < 10; i++)
212215 if (strcmp(digit[i], s) == 0) {
213216 putchar('0' + i);