On Saturday 04 April 2009 08:02:40 Colin D Bennett wrote: > What if you switch back and forth between normal and rescue mode > many times in a row? The stack will grow with each call and eventually > the stack will overflow and Bad Things will happen.
Yes. > Now you could also return function pointers instead of using > switch/case with enum constants, but it's the same concept. Then > setjmp is another similar way to do it without implementing a central > dispatcher like grub_main above. Exactly. For those who know the concept of continuation, setjmp/longjmp is very handy. This makes some kind of programs to be written easily and simply. Regards, Okuji _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel