|
|
researchv9-SUN3(old)
#include "copyright.h"
/* $Header: /var/lib/cvsd/repos/research/researchv9/X11/src/X.V11R1/lib/X/XSetFPath.c,v 1.1.1.1 2018/04/24 17:22:00 root Exp $ */
/* Copyright Massachusetts Institute of Technology 1986 */
#include "Xlibint.h"
XSetFontPath (dpy, directories, ndirs)
register Display *dpy;
char **directories;
int ndirs;
{
register int n = 0;
register int i;
register int nbytes;
char *p;
register xSetFontPathReq *req;
LockDisplay(dpy);
GetReq (SetFontPath, req);
req->nFonts = ndirs;
for (i = 0; i < ndirs; i++) {
n += strlen (directories[i]) + 1;
}
nbytes = (n + 3) & ~3;
BufAlloc (char *, p, nbytes);
/*
* pack into counted strings.
*/
for (i = 0; i < ndirs; i++) {
register int length = strlen (directories[i]);
*p = length;
bcopy (directories[i], p + 1, length);
p += length + 1;
}
req->length += nbytes >> 2;
UnlockDisplay(dpy);
SyncHandle();
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.