-/* This is test for grab_file() function */
-
-/*
+/* This is test for grab_file() function
+ *
* Example:
*
* void *grab_file(const void *ctx, const char *filename)
* }
*/
+#include <stdlib.h>
+#include <stdio.h>
+#include <err.h>
+#include <sys/stat.h>
+#include "string/string.h"
+#include "string/string.c"
+#include "tap/tap.h"
+
+int
+main(int argc, char *argv[])
+{
+ unsigned int i;
+ char **split, *str;
+ int length;
+ struct stat st;
+
+ str = grab_file(NULL, "ccan/string/test/run-grab.c");
+ split = strsplit(NULL, str, "\n", NULL);
+ length = strlen(split[0]);
+ ok1(streq(split[0], "/* This is test for grab_file() function"));
+ for (i = 1; split[i]; i++)
+ length += strlen(split[i]);
+ ok1(streq(split[i-1], "/* End of grab_file() test */"));
+ if (stat("ccan/string/test/run-grab.c", &st) != 0)
+ err(1, "Could not stat self");
+ ok1(st.st_size == length + i);
+
+ return 0;
+}
+
/* End of grab_file() test */
char **split, *str;
void *ctx;
char *strings[NUM_SUBSTRINGS * NUM_SUBSTRINGS];
- int length;
- struct stat st;
-
+
n = 0;
for (i = 0; i < NUM_SUBSTRINGS; i++) {
for (j = 0; j < NUM_SUBSTRINGS; j++) {
ok1(talloc_parent(str) == ctx);
talloc_free(ctx);
- str = grab_file(NULL, "ccan/string/test/run-grab.c");
- split = strsplit(NULL, str, "\n", NULL);
- length = strlen(split[0]);
- ok1(streq(split[0], "/* This is test for grab_file() function */"));
- for(i = 1; split[i]; i++)
- length += strlen(split[i]);
- ok1(streq(split[i-1], "/* End of grab_file() test */"));
- if (stat("ccan/string/test/run-grab.c", &st) != 0)
- err(1, "Could not stat self");
- ok1(st.st_size == length);
-
return exit_status();
}
if (deps != NULL) {
cmd_args = strjoin(NULL, deps, " ");
- cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s_dependencies.tar %s %s", targetdir, module, cmd_args, dir);
+ cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s_with_deps.tar %s %s", targetdir, module, cmd_args, dir);
} else
cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s.tar %s", targetdir, module, dir);
//email from
$frommail = "ccan@ozlabs.org";
-//email for admins
-$ccan_admin = "g.dinesh.cse@gmail.com";
-
//ccan home
$ccan_home_dir = "ccan/";
//tar home dir
$tar_dir = 'tarball/';
-?>
\ No newline at end of file
+?>
<td>
<?php
if(file_exists($tar_dir . $_GET['module']."_dependencies.tar"))
- echo '<a href='. $tar_dir . $_GET['module'] . '_dependencies.tar>Download Dependencies</a>';
+ echo '<a href='. $tar_dir . $_GET['module'] . '_with_deps.tar>Download Dependencies</a>';
?>
</td>
</tr>
exit();
}
}
-?>
\ No newline at end of file
+?>
$result = sqlite3_query($handle, $query) or die("Error in query: ".sqlite3_error($handle));
while ($row = sqlite3_fetch_array($result))
- $admin = $admin.$row[0].",";
+ $admin = $admin.$row['email'].",";
return $admin;
}
-?>
\ No newline at end of file
+?>
include('logo.html');
include('menulist.html');
include('configuration');
+include('functions.php');
if(isset($_POST['submit'])) {
$name = $_REQUEST['name'];
$subject = "Approval of ccan account";
$message = "There is new request for ccan account id.\n\n Please use the following link to approve http://ccan.ozlabs.org/dinesh/approval.php?accountid=".$accountid;
-mail($ccan_admin, $subject, $message, "From: $email");
+mail(getccanadmin($db), $subject, $message, "From: $email");
?>
</br><div>Thank you for registering with CCAN. You will get the password to your mail after approval.</div>
<?php