From: Scott Schwartz <schwartz@bio.cse.psu.edu>
To: "Mark H. Wilkinson" <mhw@kremvax.demon.co.uk>
Cc: Sam Fans <sam-fans@hawkwind.utcs.toronto.edu>,
Bengt Kleberg <bengt@softwell.se>
Subject: Re: 9libs, new sam release, experimental wily release
Date: Mon, 14 Jun 1999 20:39:48 -0400 [thread overview]
Date: Mon, 14 Jun 1999 20:39:48 -0400 [thread overview]
Message-ID: <19990615003948.8333.qmail@g.bio.cse.psu.edu> (raw)
In-Reply-To: Your message of "Mon, 14 Jun 1999 20:46:50 BST." <199906142046.20514.9libs.badum@kremvax.demon.co.uk>
"Mark H. Wilkinson" <mhw@kremvax.demon.co.uk> writes:
| It looks like your patches hadn't made it into the Bell Labs source,
| although I do remember some of them being posted to sam-fans. If you
| forward them to Bengt and myself we'll get them integrated.
Here they are. (Hopefully I haven't introduced any new problems
today; I did tweak some things.)
The program I use in my xinitrc to load the font property looks like this:
#!/bin/rc
F=``(){sed -e 's/$/ \\n\\/'}
{
echo -n '*p9font: '
echo $F
echo -n '*p9fixed: '
echo $F
} | xrdb -merge
I use it like:
load9font <$home/lib/unicode.9.font
Wily users might want to do this slightly differently, since that
requires a proportional font for one case.
cd ./libXg
===================================================================
RCS file: rdfontfile.c,v
retrieving revision 1.1
diff -c -r1.1 rdfontfile.c
*** /tmp/T0s0Qol_ Mon Jun 14 20:25:00 1999
--- rdfontfile.c Mon Jun 14 18:06:11 1999
***************
*** 13,27 ****
return s;
}
! Font *
! rdfontfile(char *name, int ldepth)
{
! Font *fnt;
! Cachesubf *c;
! int fd, i;
! char *buf, *s, *t;
struct stat sbuf;
! unsigned long min, max;
fd = open(name, O_RDONLY);
if (fd < 0)
--- 13,25 ----
return s;
}
! char *
! file2string(char* name)
{
! int fd;
struct stat sbuf;
! char *buf;
! int i;
fd = open(name, O_RDONLY);
if (fd < 0)
***************
*** 44,54 ****
free(buf);
return 0;
}
! s = buf;
fnt = (Font *)malloc(sizeof(Font));
! if (fnt == 0)
! goto Err1;
memset((void*)fnt, 0, sizeof(Font));
fnt->name = (char *)malloc(strlen(name)+1);
if (fnt->name==0)
--- 42,73 ----
free(buf);
return 0;
}
+ return buf;
+ }
! Font *
! rdfontfile(char *name, int ldepth)
! {
! return rdfontstring(name, file2string(name), ldepth);
! }
!
! Font*
! rdfontstring(char *name, char *s, int ldepth)
! {
! Font *fnt;
! Cachesubf *c;
! int i;
! char *t;
! struct stat sbuf;
! unsigned long min, max;
!
! if (s == 0)
! return 0;
fnt = (Font *)malloc(sizeof(Font));
! if (fnt == 0) {
! Err1:
! return 0;
! }
memset((void*)fnt, 0, sizeof(Font));
fnt->name = (char *)malloc(strlen(name)+1);
if (fnt->name==0)
***************
*** 97,117 ****
c->min = min;
c->max = max;
t = s;
! while (*s && *s!='\n' && *s!='\t')
s++;
! *s++ = 0;
c->f = (Subfont *)0;
! c->name = (char *)malloc(strlen(t)+1);
if (c->name == 0)
{
free(c);
goto Err3;
}
! strcpy(c->name, t);
s = skip(s);
fnt->nsubf++;
} while(*s);
- free(buf);
return fnt;
}
--- 116,139 ----
c->min = min;
c->max = max;
t = s;
! while (*s && *s!='\n' && *s!='\t' && *s!=' ')
s++;
! /* *s++ = 0; */
c->f = (Subfont *)0;
! c->name = (char *)malloc(s-t+1);
if (c->name == 0)
{
free(c);
goto Err3;
}
! { int i;
! for (i = 0; i < s-t; ++i) c->name[i] = t[i];
! c->name[i] = 0;
! }
! /* strcpy(c->name, t); */
s = skip(s);
fnt->nsubf++;
} while(*s);
return fnt;
}
***************
*** 127,132 ****
--- 149,155 ----
if (c->f)
subffree(c->f);
free(c->name);
+ free(c);
}
free(f->subf);
free(f);
===================================================================
RCS file: xtbinit.c,v
retrieving revision 1.1
diff -c -r1.1 xtbinit.c
*** /tmp/T0s0Qol_ Mon Jun 14 20:25:00 1999
--- xtbinit.c Mon Jun 14 17:24:10 1999
***************
*** 185,191 ****
font = 0;
subfont = 0;
if (fontname) {
! font = rdfontfile(fontname, screen.ldepth);
if (!font || charwidth(font, (Rune) ' ') == 0) {
subfont = getsubfont(fontname);
if (!subfont)
--- 185,193 ----
font = 0;
subfont = 0;
if (fontname) {
! font = (fontname[0] == '.' || fontname[0] == '/')
! ? rdfontfile(fontname, screen.ldepth)
! : rdfontstring("p9font", fontname, screen.ldepth);
if (!font || charwidth(font, (Rune) ' ') == 0) {
subfont = getsubfont(fontname);
if (!subfont)
cd ./include
===================================================================
RCS file: libg.h,v
retrieving revision 1.1
diff -c -r1.1 libg.h
*** /tmp/T0gdJVh_ Mon Jun 14 20:25:01 1999
--- libg.h Mon Jun 14 02:15:54 1999
***************
*** 201,206 ****
--- 201,207 ----
extern int bitbltclip(void*);
extern Subfont* getsubfont(char*);
extern Font *rdfontfile(char*, int);
+ extern Font *rdfontstring(char*, char*, int);
extern void ffree(Font*);
extern Font *mkfont(Subfont*);
extern void subffree(Subfont*);
cd ./sam-9libs/sam
===================================================================
RCS file: sam.c,v
retrieving revision 1.1
diff -c -r1.1 sam.c
*** /tmp/T002r2br Mon Jun 14 20:25:01 1999
--- sam.c Mon Jun 14 02:27:09 1999
***************
*** 151,157 ****
continue;
if(io == -1){
sprint(buf, "%s/sam.save", home);
! io = create(buf, 1, 0777);
if(io<0)
return;
}
--- 151,157 ----
continue;
if(io == -1){
sprint(buf, "%s/sam.save", home);
! io = create(buf, 1, 0700);
if(io<0)
return;
}
===================================================================
RCS file: shell.c,v
retrieving revision 1.1
diff -c -r1.1 shell.c
*** /tmp/T002r2br Mon Jun 14 20:25:01 1999
--- shell.c Mon Jun 14 02:28:37 1999
***************
*** 34,40 ****
remove(errfile);
if((pid=fork()) == 0){
if(downloaded){ /* also put nasty fd's into errfile */
! fd = create(errfile, 1, 0666L);
if(fd < 0)
fd = create("/dev/null", 1, 0666L);
dup(fd, 2);
--- 34,40 ----
remove(errfile);
if((pid=fork()) == 0){
if(downloaded){ /* also put nasty fd's into errfile */
! fd = create(errfile, 1, 0600L);
if(fd < 0)
fd = create("/dev/null", 1, 0666L);
dup(fd, 2);
cd ./sam-9libs/samterm
===================================================================
RCS file: samterm.h,v
retrieving revision 1.1
diff -c -r1.1 samterm.h
*** /tmp/T00P2og_ Mon Jun 14 20:25:01 1999
--- samterm.h Mon Jun 14 17:51:13 1999
***************
*** 2,8 ****
#define SAMTERM
#define RUNESIZE sizeof(Rune)
! #define MAXFILES 256
#define NL 5
enum{
--- 2,8 ----
#define SAMTERM
#define RUNESIZE sizeof(Rune)
! #define MAXFILES (4*1024)
#define NL 5
enum{
prev parent reply other threads:[~1999-06-15 21:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-10 23:04 Mark H. Wilkinson
1999-06-14 6:44 ` Scott Schwartz
1999-06-14 19:46 ` Mark H. Wilkinson
1999-06-15 0:10 ` Scott Schwartz
1999-06-15 0:39 ` Scott Schwartz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990615003948.8333.qmail@g.bio.cse.psu.edu \
--to=schwartz@bio.cse.psu.edu \
--cc=bengt@softwell.se \
--cc=mhw@kremvax.demon.co.uk \
--cc=sam-fans@hawkwind.utcs.toronto.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).