Article View: news.software.nntp
Article #55604Re: Is there a hack to support paswords that contain spaces?
From: Jeffrey M. Vinocur
Date: Mon, 10 Dec 2001 22:43
Date: Mon, 10 Dec 2001 22:43
27 lines
2061 bytes
2061 bytes
In article <20011210154233.073$64@newsreader.com>, Curt Welch <curt@kcwc.com> wrote: > >In addition to the argv[] data, you could make the argify routine >return a index into the command line of where each argv[] string >started. So that way, the code that wants to see everything after >argv[0] could simply start at cmd_line[argoffset[0]+strlen(argv[0])]. Yeah, I was thinking about this. It's overkill, actually, if we're willing to depend on the fact that the array is a mutilated copy of the raw string; the offset for argv[i] in the raw string is (argv[i] - argv[0] + x), where x is the amount of whitespace discarded before the beginning of the first argument. But I like the argify-only-the-first-n-arguments idea better. >That would prevent you from having to duplicate the argify routine (and >risk it not being changed in sync at some point in the future). Yes, that would be bad. -- Jeffrey M. Vinocur jeff@litech.org
Technical Details
Message-ID:
<9v3dq9$sh3$1@marduk.litech.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.litech.org!not-for-mailReferences:
<9urfpi$7vi$1@teta.doit.wisc.edu> <1ru1uyalzl.fsf@sex.ifi.uio.no> <9v349h$lro$2@marduk.litech.org> <20011210154233.073$64@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <9v3dq9$sh3$1@marduk.litech.org> Subject: Re: Is there a hack to support paswords that contain spaces? Date: Mon, 10 Dec 2001 22:43:21 +0000 From: jeff@litech.org (Jeffrey M. Vinocur) References: <9urfpi$7vi$1@teta.doit.wisc.edu> <1ru1uyalzl.fsf@sex.ifi.uio.no> <9v349h$lro$2@marduk.litech.org> <20011210154233.073$64@newsreader.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.litech.org!not-for-mail Newsgroups: news.software.nntp Organization: Lithium Technologies Lines: 26 Sender: jeff@litech.org NNTP-Posting-Host: marduk.litech.org X-Trace: marduk.litech.org 1008024201 29219 128.84.154.54 (10 Dec 2001 22:43:21 GMT) X-Complaints-To: usenet@litech.org NNTP-Posting-Date: Mon, 10 Dec 2001 22:43:21 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: jeff@litech.org (Jeffrey M. Vinocur)