ObjFW  Diff

Differences From Artifact [2faf8bad32]:

To Artifact [9b223ad2b4]:


49
50
51
52
53
54
55
56

57
58
59

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
49
50
51
52
53
54
55

56
57
58

59

60
61
62
63
64
65
66
67
68




69
70
71
72
73
74
75







-
+


-
+
-









-
-
-
-







void
objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t handler)
{
	enumerationMutationHandler = handler;
}

void
objc_error(const char *file, unsigned int line, const char *format, ...)
objc_error(const char *title, const char *format, ...)
{
#ifdef OF_AMIGAOS
# define BUF_LEN 256
# define BUF_LEN 512
	char title[BUF_LEN];
	char message[BUF_LEN];
	int status;
	va_list args;
	struct Library *IntuitionBase;
# ifdef OF_AMIGAOS4
	struct IntuitionIFace *IIntuition;
# endif
	struct EasyStruct easy;

	status = snprintf(title, BUF_LEN, "ObjFWRT @ %s:%u", file, line);
	if (status <= 0 || status >= BUF_LEN)
		title[0] = '\0';

	va_start(args, format);
	status = vsnprintf(message, BUF_LEN, format, args);
	if (status <= 0 || status >= BUF_LEN)
		message[0] = '\0';
	va_end(args);

# ifndef OF_AMIGAOS4
107
108
109
110
111
112
113
114

115
116
117
118
119
120
121
122
123
124
125
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116
117
118
119
120







-
+











	exit(EXIT_FAILURE);
# undef BUF_LEN
#else
	va_list args;

	va_start(args, format);

	fprintf(stderr, "[ObjFWRT @ %s:%u] ", file, line);
	fprintf(stderr, "[%s] ", title);
	vfprintf(stderr, format, args);
	fprintf(stderr, "\n");
	fflush(stderr);

	va_end(args);

	abort();
#endif

	OF_UNREACHABLE
}