Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jb10320 From: jb10320@uxa.cso.uiuc.edu (Desdinova) Newsgroups: comp.sys.apple2 Subject: Re: Q: Orca/C and p2cstr() Keywords: C, Orca/C Message-ID: <1990Oct9.052526.5151@ux1.cso.uiuc.edu> Date: 9 Oct 90 05:25:26 GMT References: <1020@dg.dg.com> <1990Oct5.154015.3147@ux1.cso.uiuc.edu> <1032@dg.dg.com> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 46 In article <1032@dg.dg.com> bkahn@archive.webo.dg.com (Bruce Kahn) writes: >In article <1990Oct5.154015.3147@ux1.cso.uiuc.edu>, >jb10320@uxa.cso.uiuc.edu (Desdinova) writes: >|> In article <1020@dg.dg.com> bkahn@archive.webo.dg.com (Bruce Kahn) >writes: > > The routine I used to do my in-place conversion was: > int nameLen; > nameLen = replyPtr->filename[0]; > for (loop = 0; loop < nameLen; loop++) > replyPtr->filename[loop] = replyPtr->filename[loop+1]; > replyPtr->filename[nameLen] = 0; I don't see anything wrong with the above code, which is good, since you said it works. There may be something wrong with the library after all. I've never used them since I had to write my own routines to deal with Class-1 strings. >Since characters are 1 byte, my routine also assumes a 1-byte length >Pascal-type string. Since Pascal type strings can be a max of 255 characters >long, they should only be prefixed by a 1 byte length value. Of course, things >may have changed since I took Pascal in college 3 years ago... :) Nope. Are you using and GS/OS specific calls? (NOT Prodos 16, they each have different call mechanisms). Prodos 16 uses 1-byte length strings, GS/OS uses 2-byte lengths. > For my gratification (I dont have my manuals here), what are the various >classes of GS/OS strings? Or better still, which manual should I check out to >see the actual Apple definitions? Definitely the GS/OS manuals. Also, check out the ORCA/C header files for GS/OS, they'll tell you a lot >|> -- >|> Jawaid Bazyar | Blondes in big black cars look better > Bruce >(bkahn@archive.webo.dg.com or kahn@adam.dg.com) -- Jawaid Bazyar | Blondes in big black cars look better wearing Senior/Computer Engineering | their dark sunglasses at night. (unk. wierdo) jb10320@uxa.cso.uiuc.edu | The gin, the gin, glows in the Dark! | (B O'Cult) Apple II Users Unite! Storm the New Product Announcement and Demand Justice!