From: William Ahern on
In comp.unix.programmer Joe Wright <joewwright(a)comcast.net> wrote:
> Tim Streater wrote:
<snip>
> > Revolting. Looks like a DOS editor. When was this written, 1980?
> >
> It's WordStar for Unix. It's well written and functional. Why would you be
> revolted by it? What's wrong with a DOS editor? 1980 was a really great
> year. Get a grip.

In 1994 or 1995 I happened upon a BBS that allowed me to shell out to the
Slackware Linux host. A few weeks, and many, many hours downloading the
install set over my 2400 baud modem later, I was using this new "Linux"
thing almost exclusively.

joe was and perhaps is still the default editor on Slackware.

Around the same time I began taking a distance course at the University of
West Florida. The course was taught through e-mail and the university's
netnews system, introducing me to tin and elm (and joe again, because the
school used Slackware).

I'm reading this thread in tin, am typing this post in joe, and I only
switched from elm to mutt 3 or 4 years ago.

If it ain't broken....
From: Rich Webb on
On Tue, 02 Mar 2010 23:12:18 +0000, Tim Streater
<timstreater(a)waitrose.com> wrote:

>On 02/03/2010 22:27, Joe Wright wrote:

>> My most used editor on Windows is EDIT.COM and on Unix of course, vi.
>
>Fortunately I don't deal with Windows. On OS X, I use vi only where I
>have to. Hmmm, vi, that has *modes* doesn't it, such as you can't use
>the arrow keys while in insert mode.

Take a look at gvim (graphic + vi + improved). It still has the ability
to work over a simple terminal, with the separate command and insert
modes, but nowadays it can also work just like a "regular" text editor
with the expected behavior of the arrow keys, home/end, mouse drag to
select text, and the whole nine yards.

--
Rich Webb Norfolk, VA
From: Richard Heathfield on
Ben Bacarisse wrote:

<snip>

> They were arguing about what editor *other* people should use and that
> is widely thought to be an argument that never ends. :-)

s/widely/widely but wrongly/

Everybody should use vim, obviously. End of argument.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Where do I put the smiley on this occasion?
From: Vladimir Jovic on
Scott Lurndal wrote:
> I personally place the condition operator at the front, as William does, but
> nested.
>
> if ((pointer1 != NULL)
> && (pointer1->field7 == 0x152)) {
> return;
> }

if ( ( pointer1 =! NULL )
&& ( pointer1->field7 = 0x152 ) ) {
return;
}

ops && ops
From: io_x on

"Poster Matt" <postermatt(a)no_spam_for_me.org> ha scritto nel messaggio
news:ujehn.44277$Ym4.21796(a)text.news.virginmedia.com...
> Hi,
>
> I've a few questions concerning style when programming C on UNIX systems. I
> don't want to look like an amateur. :)

all code here came from the poster "Peter Nilsson" from
news:f6245590-e586-4cb0-88f8-37afcebe15d4(a)s25g2000prd.googlegroups.com

so you say the professional coder style
#include <string.h>
#include <stdlib.h>

static char *replace2_search
(
size_t n,
const char *s,
const char *p, size_t pz,
const char *q, size_t qz
)
{
const char *f;
size_t z;
char *r;

if (pz == 0 || !(f = strstr(s, p)))
{
z = strlen(s);
r = malloc(n + z + 1);
if (r) strcpy(r + n, s);
}
else
{
z = f - s;
r = replace2_search(n + z + qz, f + pz, p, pz, q, qz);
if (r)
{
memcpy(r + n, s, z);
memcpy(r + n + z, q, qz);
}
}

return r;
}

char *replace2(const char *s, const char *p, const char *q)
{
return replace2_search(0, s, p, strlen(p), q, strlen(q));
}

that can not be seen in my monitor editor,
here too in the editor of the news
is better than my amatorish stile
#include <string.h>
#include <stdlib.h>

char* replace2_search(size_t n, char* s,
char* p, size_t pz,
char* q, size_t qz )
{char *f, *r;
size_t z;
if(pz==0 || !(f = strstr(s, p)))
{z= strlen(s); r= (char*) malloc(n+z+1);
if(r)
strcpy(r+n, s);
}
else
{z= f-s;
r= replace2_search(n+z+qz, f+pz, p, pz, q, qz);
if(r){memcpy(r+n, s, z);
memcpy(r+n+z, q, qz);
}
}
return r;
}

char* replace2(char *s, char *p, char *q)
{if(s==0||p==0||q==0) return 0;
return replace2_search(0, s, p, strlen(p), q, strlen(q));
}

that can be seen in one aye shot




First  |  Prev  |  Next  |  Last
Pages: 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
Prev: integer
Next: shared memory question