CVS Repository/ src/ games/ cribbage/ io.c


OpenBSD release(s):
1.23 (79 78 77 76),  1.22 (75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59),  1.19 (58 57 56),  1.14 (55 54 53 52),  1.13 (51 50 49 48),  1.12 (47),  1.11 (46 45),  1.10 (44 43 42 41 40 39 38 37 36),  1.9 (35 34),  1.7 (33 32 31),  1.6 (30),  1.5 (29 28 27),  1.4 (26 25 24),  1.3 (23 22),  1.1.1.1 (21 20), 
Tags:
1.1.1.1 (netbsd_1_1), 
revision 1.23/ (Download) - annotate - Mon, 03 Jun 2024 09:43:10 UTC by otto
OpenBSD release(s): 79 78 77 76
Changes since 1.22: +8 -11 (diff)
Fix input handling wrt redrawing. The new version of curses does
not like shortcutting switching windows, especially if you're also
using libc for i/o. Reported by Don Wilburn; ok jsg@

revision 1.22/ (Download) - annotate - Sun, 10 Jan 2016 13:35:09 UTC by mestre
OpenBSD release(s): 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59
Changes since 1.21: +1 -2 (diff)
As per style(9), remove remaining lint-style comments from games/

OK tb@

revision 1.21/ (Download) - annotate - Thu, 31 Dec 2015 18:10:20 UTC by mestre
Changes since 1.20: +1 -5 (diff)
Include only needed header files per each source file

This one was also OK'ed by tb@

revision 1.20/ (Download) - annotate - Sat, 24 Oct 2015 18:04:06 UTC by mmcc
Changes since 1.19: +6 -6 (diff)
Cast ctype functions' arguments to unsigned char.

ok guenther@

revision 1.19/ (Download) - annotate - Fri, 09 May 2014 23:56:26 UTC by schwarze
OpenBSD release(s): 58 57 56
Changes since 1.18: +12 -18 (diff)
Various cleanup in incard():
* get_line() always returns the same non-NULL pointer,
so testing the return value is useless.
* Garbage collect the unused variable *line.
* Check for end-of-buffer before parsing the next word instead of after it.
* Skip strlen() when the length has been measured three lines before anyway.
* Do not initialize local variables over and over again.
feedback and ok pjanzen@

revision 1.18/ (Download) - annotate - Fri, 09 May 2014 23:39:10 UTC by schwarze
Changes since 1.17: +5 -5 (diff)
Fix a mini-bug reported by pjanzen@:
When entering card names, you can use multiple words (like KING OF SPADES).
If you entered more than one consecutive blank character between words,
the function incard() took that as end-of-string and ignored the rest.
Fix this by dropping duplicate blanks up front, in get_line().
Patch simplified by me, ok pjanzen@.

While here, use beep(3) in an adjacent line instead of manually fiddling
with control characters, suggested by pjanzen@.

revision 1.17/ (Download) - annotate - Fri, 09 May 2014 03:13:24 UTC by schwarze
Changes since 1.16: +24 -24 (diff)
KNF: unify style and reduce indentation in get_line(), no binary change
ok cmp(1)

revision 1.16/ (Download) - annotate - Fri, 09 May 2014 02:47:25 UTC by schwarze
Changes since 1.15: +3 -2 (diff)
After entering an invalid three-letter card name, one letter card names
stopped working because the third letter remained in the buffer,
incard() skipped the NUL and used the old garbage.
Fix this bug reported by pjanzen@, but in a simpler way than he
suggested, by just clearing any trailing garbage from the buffer.
ok pjanzen@

revision 1.15/ (Download) - annotate - Fri, 09 May 2014 00:03:41 UTC by schwarze
Changes since 1.14: +22 -23 (diff)
Various cleanup:
1. Style: Don't use variables as format strings.
NetBSD rev. 1.26 (May 23, 2011) joerg@NetBSD via maintainer pjanzen@.
2. Style: Avoid needless pointer arithmetics.
NetBSD rev. 1.27 (Oct 13, 2012) dholland@NetBSD via pjanzen@,
who also applied some KNF to the indentation while here.
3. End curses before printing fatal error messages; from pjanzen@.

revision 1.14/ (Download) - annotate - Sun, 04 Mar 2012 04:05:15 UTC by fgsch
OpenBSD release(s): 55 54 53 52
Changes since 1.13: +5 -5 (diff)
In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.

revision 1.13/ (Download) - annotate - Mon, 10 May 2010 08:53:12 UTC by nicm
OpenBSD release(s): 51 50 49 48
Changes since 1.12: +2 -2 (diff)
Rename use of some builtins that makes gcc4 warn.

ok millert

revision 1.12/ (Download) - annotate - Tue, 27 Oct 2009 23:59:24 UTC by deraadt
OpenBSD release(s): 47
Changes since 1.11: +1 -9 (diff)
rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

revision 1.11/ (Download) - annotate - Wed, 03 Dec 2008 15:43:17 UTC by sthen
OpenBSD release(s): 46 45
Changes since 1.10: +2 -2 (diff)
Some more ambigous -> ambiguous pointed out by mbalmer (there are
others, these are the ones from code unlikely to be re-merged with
upstream sources).

revision 1.10/ (Download) - annotate - Sat, 10 Jul 2004 07:26:23 UTC by deraadt
OpenBSD release(s): 44 43 42 41 40 39 38 37 36
Changes since 1.9: +17 -42 (diff)
more ansi; khalek@linuxgamers.net

revision 1.9/ (Download) - annotate - Tue, 03 Jun 2003 03:01:39 UTC by millert
OpenBSD release(s): 35 34
Changes since 1.8: +2 -6 (diff)
Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

revision 1.8/ (Download) - annotate - Fri, 25 Apr 2003 21:19:55 UTC by tdeval
Changes since 1.7: +3 -3 (diff)
strings... ok henning@, millert@, tedu@

revision 1.7/ (Download) - annotate - Tue, 19 Feb 2002 19:39:36 UTC by millert
OpenBSD release(s): 33 32 31
Changes since 1.6: +1 -26 (diff)
We live in an ANSI C world.  Remove lots of gratuitous #ifdef __STDC__ cruft.

revision 1.6/ (Download) - annotate - Fri, 17 Aug 2001 23:14:30 UTC by pjanzen
OpenBSD release(s): 30
Changes since 1.5: +15 -6 (diff)
Better handling of out-of-range numbers.
Extraneous prompt and related comma splice removed.

revision 1.5/ (Download) - annotate - Mon, 29 Nov 1999 06:42:20 UTC by millert
OpenBSD release(s): 29 28 27
Changes since 1.4: +7 -7 (diff)
Kill BOOLEAN, just use the curses/c++ bool type instead.

revision 1.4/ (Download) - annotate - Wed, 19 Aug 1998 07:40:22 UTC by pjanzen
OpenBSD release(s): 26 25 24
Changes since 1.3: +27 -26 (diff)
tags, formatting, ANSI-fication, prototypes, de-typos, and the occasional
initialization, removal of unused variable, or other minor fix.  Most
changes are from or inspired by NetBSD.

revision 1.3/ (Download) - annotate - Fri, 25 Jul 1997 19:34:05 UTC by mickey
OpenBSD release(s): 23 22
Changes since 1.2: +5 -5 (diff)
#if __STDC__ --> #ifdef __STDC__

revision 1.2/ (Download) - annotate - Thu, 24 Jul 1997 15:08:24 UTC by deraadt
Changes since 1.1: +3 -1 (diff)
Clean up play, let player see play more often, improve display timing.
Preliminary work from PR 2055 (as reverse patches); phil

revision 1.1/ (Download) - annotate - Wed, 18 Oct 1995 08:48:48 UTC by deraadt
Branch point for: 1.1.1.1
Initial revision

revision 1.1.1.1/ (Download) - annotate - Wed, 18 Oct 1995 08:48:48 UTC by deraadt
OpenBSD release(s): 21 20
Tags: netbsd_1_1
Changes since 1.1: None
initial import of NetBSD tree