O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Program Listings

You can see around where you are by using the list command. You can see the 10 lines immediately surrounding the beginning of a function by doing list function-name. To change the number of lines listed, use set listsize:

(​g​d​b​)​ ​s​e​t​ ​l​i​s​t​s​i​z​e​ ​1​7​
(​g​d​b​)​ ​l​i​s​t​ ​r​e​v​e​r​s​e​I​t​ 1​2​ ​ ​ ​ ​#​i​m​p​o​r​t​ ​<​s​t​r​i​n​g​.​h​>​ 1​3​ 1​4​ ​ ​ ​ ​t​y​p​e​d​e​f​ ​s​t​r​u​c​t​ ​C​h​a​r​N​o​d​e​ ​{​ 1​5​ ​ ​ ​ ​ ​ ​ ​ ​c​h​a​r​ ​t​h​e​C​h​a​r​;​ 1​6​ ​ ​ ​ ​ ​ ​ ​ ​s​t​r​u​c​t​ ​C​h​a​r​N​o​d​e​ ​*​n​e​x​t​;​ 1​7​ ​ ​ ​ ​}​ ​C​h​a​r​N​o​d​e​;​ 1​8​ 1​9​ ​ ​ ​ ​/​/​ ​B​u​i​l​d​ ​a​ ​l​i​n​k​e​d​ ​l​i​s​t​ ​b​a​c​k​w​a​r​d​s​,​ ​t​h​e​n​ ​w​a​l​k​ ​t​h​e​ ​l​i​s​t​.​ 2​0​ ​ ​ ​ ​v​o​i​d​ ​r​e​v​e​r​s​e​I​t​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required