From: mickey Date: Tue, 7 May 1996 12:34:37 +0000 (+0000) Subject: show symtab name when no less than 3 of them. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8adbad6b21e3cf476fff81589f3d489110d1f90a;p=openbsd show symtab name when no less than 3 of them. --- diff --git a/sys/ddb/db_hangman.c b/sys/ddb/db_hangman.c index f4b2d4d786e..9c0a330387a 100644 --- a/sys/ddb/db_hangman.c +++ b/sys/ddb/db_hangman.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_hangman.c,v 1.1 1996/05/05 12:23:14 mickey Exp $ */ +/* $OpenBSD: db_hangman.c,v 1.2 1996/05/07 12:34:37 mickey Exp $ */ /* * Copyright (c) 1996 Theo de Raadt, Michael Shalayeff @@ -72,6 +72,10 @@ db_randomsym(lenp) /* choose random symbol from the table */ q = db_qualify(X_db_isym(stab, db_random(X_db_nsyms(stab))),stab->name); + /* don't show symtab name if there are less than 3 of 'em */ + if (db_nsymtabs < 3) + while(*p++ != ':'); + /* strlen(q) && ignoring underscores and colons */ for ((*lenp) = 0, p = q; *p; p++) if (ISALPHA(*p))