mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-26 05:57:00 +03:00
tidy-up
This commit is contained in:
parent
d0a1ee7ac0
commit
36a2a77a8e
@ -643,7 +643,6 @@ static inline int32 ami_font_width_glyph(struct OutlineFont *ofont,
|
|||||||
int32 char_advance = 0;
|
int32 char_advance = 0;
|
||||||
FIXED kern = 0;
|
FIXED kern = 0;
|
||||||
struct MinList *gwlist = NULL;
|
struct MinList *gwlist = NULL;
|
||||||
FIXED char1w = 0;
|
|
||||||
struct GlyphWidthEntry *gwnode;
|
struct GlyphWidthEntry *gwnode;
|
||||||
bool skip_c2 = false;
|
bool skip_c2 = false;
|
||||||
uint32 long_char_1 = 0;
|
uint32 long_char_1 = 0;
|
||||||
@ -678,6 +677,7 @@ static inline int32 ami_font_width_glyph(struct OutlineFont *ofont,
|
|||||||
OT_WidthList, &gwlist,
|
OT_WidthList, &gwlist,
|
||||||
TAG_END) == 0)
|
TAG_END) == 0)
|
||||||
{
|
{
|
||||||
|
FIXED char1w = 0;
|
||||||
gwnode = (struct GlyphWidthEntry *)GetHead((struct List *)gwlist);
|
gwnode = (struct GlyphWidthEntry *)GetHead((struct List *)gwlist);
|
||||||
if(gwnode) char1w = gwnode->gwe_Width;
|
if(gwnode) char1w = gwnode->gwe_Width;
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ static void ami_font_cache_del_skiplist(struct SkipList *skiplist)
|
|||||||
|
|
||||||
struct ami_font_cache_node *ami_font_cache_locate(const char *font)
|
struct ami_font_cache_node *ami_font_cache_locate(const char *font)
|
||||||
{
|
{
|
||||||
struct ami_font_cache_node *nodedata;
|
struct ami_font_cache_node *nodedata = NULL;
|
||||||
uint32 hash = 0;
|
uint32 hash = 0;
|
||||||
|
|
||||||
#ifdef __amigaos4__
|
#ifdef __amigaos4__
|
||||||
|
@ -935,13 +935,12 @@ static void ami_gui_read_all_tooltypes(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
struct WBStartup *WBenchMsg;
|
struct WBStartup *WBenchMsg;
|
||||||
struct WBArg *wbarg;
|
struct WBArg *wbarg;
|
||||||
char i;
|
char i = 0;
|
||||||
LONG olddir = -1;
|
|
||||||
|
|
||||||
if(argc == 0) { /* Started from WB */
|
if(argc == 0) { /* Started from WB */
|
||||||
WBenchMsg = (struct WBStartup *)argv;
|
WBenchMsg = (struct WBStartup *)argv;
|
||||||
for(i = 0, wbarg = WBenchMsg->sm_ArgList; i < WBenchMsg->sm_NumArgs; i++,wbarg++) {
|
for(i = 0, wbarg = WBenchMsg->sm_ArgList; i < WBenchMsg->sm_NumArgs; i++,wbarg++) {
|
||||||
olddir =-1;
|
LONG olddir =-1;
|
||||||
if((wbarg->wa_Lock) && (*wbarg->wa_Name))
|
if((wbarg->wa_Lock) && (*wbarg->wa_Name))
|
||||||
olddir = SetCurrentDir(wbarg->wa_Lock);
|
olddir = SetCurrentDir(wbarg->wa_Lock);
|
||||||
|
|
||||||
@ -3080,12 +3079,12 @@ static void gui_quit(void)
|
|||||||
char *ami_gui_get_cache_favicon_name(nsurl *url, bool only_if_avail)
|
char *ami_gui_get_cache_favicon_name(nsurl *url, bool only_if_avail)
|
||||||
{
|
{
|
||||||
STRPTR filename = NULL;
|
STRPTR filename = NULL;
|
||||||
BPTR lock = 0;
|
|
||||||
|
|
||||||
if ((filename = ASPrintf("%s/%x", current_user_faviconcache, nsurl_hash(url)))) {
|
if ((filename = ASPrintf("%s/%x", current_user_faviconcache, nsurl_hash(url)))) {
|
||||||
LOG("favicon cache location: %s", filename);
|
LOG("favicon cache location: %s", filename);
|
||||||
|
|
||||||
if (only_if_avail == true) {
|
if (only_if_avail == true) {
|
||||||
|
BPTR lock = 0;
|
||||||
if((lock = Lock(filename, ACCESS_READ))) {
|
if((lock = Lock(filename, ACCESS_READ))) {
|
||||||
UnLock(lock);
|
UnLock(lock);
|
||||||
return filename;
|
return filename;
|
||||||
@ -5563,7 +5562,7 @@ int main(int argc, char** argv)
|
|||||||
LOG("WARNING: JSIMD_FORCENONE NOT SET");
|
LOG("WARNING: JSIMD_FORCENONE NOT SET");
|
||||||
SetVar("JSIMD_FORCENONE", "1", 1, GVF_GLOBAL_ONLY | GVF_SAVE_VAR);
|
SetVar("JSIMD_FORCENONE", "1", 1, GVF_GLOBAL_ONLY | GVF_SAVE_VAR);
|
||||||
} else {
|
} else {
|
||||||
LOG("JSIMDFORCENONE = %s (NB: Should be '1' for this architecture)", jsimd_forcenone);
|
LOG("JSIMD_FORCENONE = %s (NB: Should be '1' for this architecture)", jsimd_forcenone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -78,8 +78,6 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
|
|||||||
{
|
{
|
||||||
struct svgtiny_diagram *diagram;
|
struct svgtiny_diagram *diagram;
|
||||||
svgtiny_code code;
|
svgtiny_code code;
|
||||||
unsigned int i;
|
|
||||||
unsigned int j;
|
|
||||||
BOOL fons_written = FALSE;
|
BOOL fons_written = FALSE;
|
||||||
struct fons_struct *fons;
|
struct fons_struct *fons;
|
||||||
struct stxt_struct *stxt;
|
struct stxt_struct *stxt;
|
||||||
@ -156,7 +154,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
|
|||||||
|
|
||||||
if(!(PushChunk(iffh,0,ID_CMAP,IFFSIZE_UNKNOWN)))
|
if(!(PushChunk(iffh,0,ID_CMAP,IFFSIZE_UNKNOWN)))
|
||||||
{
|
{
|
||||||
for (i = 0; i != diagram->shape_count; i++) {
|
for (unsigned int i = 0; i != diagram->shape_count; i++) {
|
||||||
if(diagram->shape[i].fill != svgtiny_TRANSPARENT)
|
if(diagram->shape[i].fill != svgtiny_TRANSPARENT)
|
||||||
{
|
{
|
||||||
addcolour(diagram->shape[i].fill);
|
addcolour(diagram->shape[i].fill);
|
||||||
@ -172,7 +170,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
|
|||||||
PopChunk(iffh);
|
PopChunk(iffh);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i != diagram->shape_count; i++) {
|
for (unsigned int i = 0; i != diagram->shape_count; i++) {
|
||||||
attr = ami_misc_allocvec_clear(sizeof(struct attr_struct), 0);
|
attr = ami_misc_allocvec_clear(sizeof(struct attr_struct), 0);
|
||||||
if (diagram->shape[i].fill == svgtiny_TRANSPARENT)
|
if (diagram->shape[i].fill == svgtiny_TRANSPARENT)
|
||||||
attr->FillType = FT_NONE;
|
attr->FillType = FT_NONE;
|
||||||
@ -212,7 +210,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
|
|||||||
NumPoints = 0;
|
NumPoints = 0;
|
||||||
type = ID_OPLY;
|
type = ID_OPLY;
|
||||||
|
|
||||||
for (j = 0;
|
for (unsigned int j = 0;
|
||||||
j != diagram->shape[i].path_length; ) {
|
j != diagram->shape[i].path_length; ) {
|
||||||
switch ((int) diagram->shape[i].path[j]) {
|
switch ((int) diagram->shape[i].path[j]) {
|
||||||
case svgtiny_PATH_MOVE:
|
case svgtiny_PATH_MOVE:
|
||||||
|
@ -38,14 +38,14 @@ struct Device *TimerBase;
|
|||||||
struct TimerIFace *ITimer;
|
struct TimerIFace *ITimer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static APTR pool_nscb = NULL;
|
static APTR restrict pool_nscb = NULL;
|
||||||
static APTR pool_timereq = NULL;
|
static APTR restrict pool_timereq = NULL;
|
||||||
|
|
||||||
struct nscallback
|
struct nscallback
|
||||||
{
|
{
|
||||||
struct TimeVal tv;
|
struct TimeVal tv;
|
||||||
void *callback;
|
void *restrict callback;
|
||||||
void *p;
|
void *restrict p;
|
||||||
struct TimeRequest *treq;
|
struct TimeRequest *treq;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user