- // Skip to the next ','
- for (; Pos != Bins.end() && *Pos != ','; Pos++);
-
- // Back remove spaces
- string::const_iterator End = Pos;
- for (; End > Start && (End[-1] == ',' || isspace(End[-1]) != 0); End--);
-
- // Stash the string
- memcpy(Buf,Start,End-Start);
- StaticBinList[Bin] = Buf;
- Bin++;
- Buf += End-Start;
- *Buf++ = 0;
+ if (BigBuf != NULL)
+ delete BigBuf;
+ return 0;
+ }
+
+ if (BigBuf != NULL)
+ delete BigBuf;
+ return (const char **)StaticBinList;
+}
+ /*}}}*/
+// SrcRecordParser::BuildDepends - Return the Build-Depends information /*{{{*/
+// ---------------------------------------------------------------------
+/* This member parses the build-depends information and returns a list of
+ package/version records representing the build dependency. The returned
+ array need not be freed and will be reused by the next call to this
+ function */
+bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps, bool ArchOnly)
+{
+ unsigned int I;
+ const char *Start, *Stop;
+ BuildDepRec rec;
+ const char *fields[] = {"Build-Depends",
+ "Build-Depends-Indep",
+ "Build-Conflicts",
+ "Build-Conflicts-Indep"};
+
+ BuildDeps.clear();
+
+ for (I = 0; I < 4; I++)
+ {
+ if (ArchOnly && (I == 1 || I == 3))
+ continue;
+
+ if (Sect.Find(fields[I], Start, Stop) == false)
+ continue;