From 05d75afd898d44493717852e5f3c3eae406e5510 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 31 Dec 2003 17:09:03 +0000 Subject: [PATCH] [project @ 2003-12-31 17:09:03 by jmb] Rename login template to "login". Use OS_GBPB9 to get filename of plugin logos. svn path=/import/netsurf/; revision=474 --- !NetSurf/Resources/en/Templates,fec | Bin 4312 -> 4312 bytes riscos/401login.c | 6 ++-- riscos/about.c | 51 ++++++++++++++-------------- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/!NetSurf/Resources/en/Templates,fec b/!NetSurf/Resources/en/Templates,fec index b0416adfc400ca3a9a8596057037e6a315df2b34..9baecfc61420a2057a6ba44c3eecdf418a96d1f6 100644 GIT binary patch delta 1382 zcma)6&ui3B5Pqpvadp~?6@S*IiWeyhZBfuwv9)5M?RIVIkAu*@O(wg+Y+iVI+wJP1 zy%cX^33&0MM@0{^2T^+TkEkaviXH?JyeZasyIHNZqRYNX^37!4%=hNYO3zBq-NT1~ zeSFGTXA5H$gE9IuTLi9GXy8ldb{_!7Qd<~%_nUhZ!6T#nEzi89#&Myf0^f_S`j&oLPEeNizL z&M7lOA8q9kTb2lwaNS;g2{Kvjh4@bEK6|~#6|w|YQD+ds&vR;j-K$Ml$Ar=g6j_}0 zu(Cd~3D;6vtpA{U7+qfWRnn%DJn1$^rlxYVNuBcFizzAkT=eOfHev z8(M4&sFE*j56RwZKTP&TyRPkZd-puRS@^DH^lf!@RbQ9cX4b_P7*Xh>Lgy@fz=(>n zBC5SePftPe5|ENDQnJoJ5n^CQqAYDRE0{N%+9uceD;5bTQf9vF`Hl{LWF~K#4$h*# aO@t_;dX)w)B#lZf&)ePay?OKAH}88i z{%HKWiIc$nJ6IhZ0NM_~fA}g6Wqljp{P_4=z-r+T@N}1ZCDCdfo5^t>>ktLt=iD8r zb{r`YfbmmDc`s+SSpz8|RbP4U-N{H^9|Hc!<7FHwc$$E*6+GLYJ$F(JO5&4V5d2Fb#NOjj;6ondx#RwXYXM>{EoL zvlj8UKf0p>Mdun8=kh>xb>FaAt=cJRc;gi^X-o6zwH&H451pM3OH2pL4QkR(*z|xa z%tqrN@Ds0J2Dwf9>)txB>MXpph)e59BxGDFmGT~F8^C8NxlPq#Tc^~tG^NNE246dk znJ7|i*U-9gQ;NtplG*Z9VpJHOv5&Z1v0h}~4!+^<^@K_{;WcaqrJ|bP_V;YqO`$>=>B@R>zsS(73^PFMetQ4dvfIU0;)Ly$ehCHJU$`g#>5QT+fVVEFyGI9i4Rekk5HC?#`b3Mqc?#se;k0v z+Hz-F+)HevFM89I{Z>42fM+;6HuN@2cXz(>#nYHqbs7J+x|&LrI=p<%s
\"Netsurf
 

NetSurf %s

Copyright © 2002, 2003 NetSurf Developers.
 

"; /**< About page header */ static const char *pabtplghd = "The following plugins are installed on your system:
 
"; /**< Plugin table header */ @@ -80,8 +81,8 @@ void about_create(void) { struct about_page *abt; struct plugd *temp; FILE *fp; - char *buf, *val, var[20], *ptype, *pdetails, *fname, *furl, *p, *leafname; - int i, nofiles, j, w, h, size, pneeded; + char *buf, *val, var[20], *ptype, *pdetails, *fname, *furl; + int i, nofiles, j, w, h, size; fileswitch_object_type fot; os_error *e; @@ -177,40 +178,38 @@ void about_create(void) { /* get actual file name */ sprintf(var, "%2.2d*", j); LOG(("var: %s", var)); - sprintf(buf, "%s.", val); - LOG(("buf: %s", buf)); - e = xosfscontrol_canonicalise_path(var, 0, 0, buf, 0, &pneeded); + + void *name = (void*)xcalloc((unsigned int)20, sizeof(char)); + + e = xosgbpb_dir_entries(val, (osgbpb_string_list*)name, + 1, 0, 255, var, NULL, NULL); if (e) { LOG(("%s", e->errmess)); - return; + xfree(name); + xfree(pdetails); + continue; } - fname = xcalloc((unsigned int)(10-pneeded), sizeof(char)); - e = xosfscontrol_canonicalise_path(var, fname, 0, buf, - (10-pneeded), 0); - if (e) { - LOG(("%s", e->errmess)); - return; - } - LOG(("fname: %s", fname)); - furl = xcalloc(strlen(fname) + 20, sizeof(char)); + LOG(("fname: %s", (char*)name)); + sprintf(buf, "%s.%s", val, (char*)name); + furl = xcalloc(strlen(buf) + 20, sizeof(char)); /* grab leafname and get width and height */ - p = strrchr(fname, '.'); - leafname = xstrdup(p); - h = atoi(leafname+7); - leafname[7] = 0; - w = atoi(leafname+3); + h = atoi((char*)name+6); + ((char*)name)[6] = 0; + w = atoi((char*)name+2); + + xfree(name); /* convert to URL */ - __unixify(fname, 0, furl, strlen(fname)+20, 0); - sprintf(fname, "file://%s", furl); + __unixify(buf, 0, furl, strlen(buf)+20, 0); + sprintf(buf, "file://%s", furl); xfree(furl); - LOG(("furl: %s", fname)); - furl = xcalloc(strlen(paboutpl3) + strlen(ptype) + strlen(fname) + strlen(pdetails) + 10, sizeof(char)); - sprintf(furl, paboutpl3, ptype, fname, ptype, w, h, pdetails); + LOG(("furl: %s", buf)); + furl = xcalloc(strlen(paboutpl3) + strlen(ptype) + strlen(buf) + + strlen(pdetails) + 10, sizeof(char)); + sprintf(furl, paboutpl3, ptype, buf, ptype, w, h, pdetails); abt->plugd = new_plugin(abt->plugd, furl); - xfree(fname); xfree(pdetails); continue; }