Rusty Russell 17 years ago
parent
commit
74e9da4d1c

BIN
ccan/build_assert/_info.30342


BIN
ccan/build_assert/_info.30850


+ 32 - 3
ccan/string/test/run-grab.c

@@ -1,6 +1,5 @@
-/* This is test for grab_file() function */
-
-/*
+/* This is test for grab_file() function
+ *
  * Example:
  * 
  * void *grab_file(const void *ctx, const char *filename)
@@ -22,4 +21,34 @@
  *	}
  */
 
+#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 */

+ 1 - 14
ccan/string/test/run.c

@@ -27,9 +27,7 @@ int main(int argc, char *argv[])
 	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++) {
@@ -117,16 +115,5 @@ int main(int argc, char *argv[])
 	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();
 }				

BIN
tools/create_dep_tar


+ 1 - 1
tools/create_dep_tar.c

@@ -53,7 +53,7 @@ create_tar(char **deps, const char *dir, const char *targetdir)
 	
 	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);
 			

+ 1 - 4
web/configuration

@@ -29,9 +29,6 @@ $temprepo = "temprepo/";
 //email from 
 $frommail = "ccan@ozlabs.org";
 
-//email for admins
-$ccan_admin = "g.dinesh.cse@gmail.com";
-
 //ccan home 
 $ccan_home_dir = "ccan/";
 
@@ -43,4 +40,4 @@ $bzr_push = 'bzr push /home/dinesh/testwebsite/ ';
 
 //tar home dir
 $tar_dir = 'tarball/';
-?>
+?>

BIN
web/db/ccan.db


+ 2 - 2
web/dispmoduleinfo.php

@@ -19,7 +19,7 @@ $row = sqlite3_fetch_array($result);
 <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>
@@ -54,4 +54,4 @@ function checkerror($status, $msg)
 		    exit();
 	}
 } 
-?>
+?>

+ 2 - 2
web/functions.php

@@ -36,7 +36,7 @@ function getccanadmin($db)
 	$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; 
 }
-?>
+?>

+ 2 - 1
web/requestid.php

@@ -3,6 +3,7 @@ session_start();
 include('logo.html');
 include('menulist.html');
 include('configuration');
+include('functions.php');
 
 if(isset($_POST['submit'])) {
 	$name = $_REQUEST['name'];
@@ -80,7 +81,7 @@ $result = sqlite3_exec($handle, $query) or die("Error in query: ".sqlite3_error(
 
 $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

BIN
web/tarball/alignof.tar


BIN
web/tarball/alignof_with_deps.tar


BIN
web/tarball/alloc.tar


BIN
web/tarball/alloc_with_deps.tar


BIN
web/tarball/build_assert.tar


BIN
web/tarball/build_assert_with_deps.tar


BIN
web/tarball/check_type.tar


BIN
web/tarball/check_type_with_deps.tar


BIN
web/tarball/container_of.tar


BIN
web/tarball/container_of_with_deps.tar


BIN
web/tarball/hash.tar


BIN
web/tarball/hash_with_deps.tar


BIN
web/tarball/list.tar


BIN
web/tarball/list_with_deps.tar


BIN
web/tarball/noerr.tar


BIN
web/tarball/noerr_with_deps.tar


BIN
web/tarball/string.tar


BIN
web/tarball/string_with_deps.tar


BIN
web/tarball/talloc.tar


BIN
web/tarball/talloc_with_deps.tar


BIN
web/tarball/tap.tar


BIN
web/tarball/tap_with_deps.tar


BIN
web/tarball/typesafe_cb.tar


BIN
web/tarball/typesafe_cb_with_deps.tar