zsh-workers
 help / color / mirror / code / Atom feed
* PRINT_TYPESET vs PRINT_WHENCE_CSH
@ 2014-11-08 20:46 Bart Schaefer
  2014-11-08 21:42 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2014-11-08 20:46 UTC (permalink / raw)
  To: zsh-workers

Either these sets of flags shouldn't overlap at all, or it shouldn't matter
that they both start at (1<<0) ... or there's some reason to imply that
whence and typeset are related?

I suspect it doesn't matter since PRINT_WHENCE_* are only in hashtable.c
whereas the other PRINT_* are only params.c, but ...

/* flags for controlling printing of hash table nodes */
#define PRINT_NAMEONLY		(1<<0)
#define PRINT_TYPE		(1<<1)
#define PRINT_LIST		(1<<2)
#define PRINT_KV_PAIR		(1<<3)
#define PRINT_INCLUDEVALUE	(1<<4)
#define PRINT_TYPESET		(1<<5)

/* flags for printing for the whence builtin */
#define PRINT_WHENCE_CSH	(1<<5)
#define PRINT_WHENCE_VERBOSE	(1<<6)
#define PRINT_WHENCE_SIMPLE	(1<<7)
#define PRINT_WHENCE_FUNCDEF	(1<<9)
#define PRINT_WHENCE_WORD	(1<<10)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PRINT_TYPESET vs PRINT_WHENCE_CSH
  2014-11-08 20:46 PRINT_TYPESET vs PRINT_WHENCE_CSH Bart Schaefer
@ 2014-11-08 21:42 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2014-11-08 21:42 UTC (permalink / raw)
  To: zsh-workers

On Sat, 08 Nov 2014 12:46:04 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Either these sets of flags shouldn't overlap at all, or it shouldn't matter
> that they both start at (1<<0) ... or there's some reason to imply that
> whence and typeset are related?

I think I added PRINT_TYPESET in 2002 without looking at the others;
they should be kept separate for neatness though it doesn't actually
matter in practice since they apply to different types of node.

We seemed to lose bit 8 at some point.

diff --git a/Src/zsh.h b/Src/zsh.h
index d284c7a..031deaf 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -1865,9 +1865,9 @@ typedef groupset *Groupset;
 #define PRINT_TYPESET		(1<<5)
 
 /* flags for printing for the whence builtin */
-#define PRINT_WHENCE_CSH	(1<<5)
-#define PRINT_WHENCE_VERBOSE	(1<<6)
-#define PRINT_WHENCE_SIMPLE	(1<<7)
+#define PRINT_WHENCE_CSH	(1<<6)
+#define PRINT_WHENCE_VERBOSE	(1<<7)
+#define PRINT_WHENCE_SIMPLE	(1<<8)
 #define PRINT_WHENCE_FUNCDEF	(1<<9)
 #define PRINT_WHENCE_WORD	(1<<10)
 

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-08 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-08 20:46 PRINT_TYPESET vs PRINT_WHENCE_CSH Bart Schaefer
2014-11-08 21:42 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).