Changed the spaces to tabs (cut and paste problem) and added a comment as

suggested by Axel for the "magic variable" that is replaced by the Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19485 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ryan Leavengood
2006-12-13 10:35:23 +00:00
parent 1a4e8e7b49
commit 71c8e7e84a
+14 -11
View File
@@ -14,17 +14,20 @@
extern "C" void
process_refs(entry_ref dir, BMessage* msg, void* /*reserved*/)
{
int32 refs;
entry_ref ref;
BString status("!!!STATUS_HERE!!!");
BString type;
int32 refs;
entry_ref ref;
BString status("!!!STATUS_HERE!!!");
// The above will be substituted with a real value (such as "New" or
// "Read") by some magic in the Jamfile. This is done to avoid duplicate
// code.
BString type;
for (refs = 0; msg->FindRef("refs", refs, &ref) == B_NO_ERROR; refs++) {
BNode node(&ref);
if ((node.InitCheck() == B_NO_ERROR)
&& (node.ReadAttrString("BEOS:TYPE", &type) == B_NO_ERROR)
&& (type == "text/x-email"))
node.WriteAttrString("MAIL:status", &status);
}
for (refs = 0; msg->FindRef("refs", refs, &ref) == B_NO_ERROR; refs++) {
BNode node(&ref);
if ((node.InitCheck() == B_NO_ERROR)
&& (node.ReadAttrString("BEOS:TYPE", &type) == B_NO_ERROR)
&& (type == "text/x-email"))
node.WriteAttrString("MAIL:status", &status);
}
}