Changeset - 943db19cf524
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 17 years ago 2009-02-23 19:04:51
ohnobinki@ohnopublishing.net
added a bit of test code for execio - execio doesn't anywheres _near_ work yet!
1 file changed with 11 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/client/distren.c
Show inline comments
 
@@ -14,25 +14,36 @@
 
  GNU Affero General Public License for more details.
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include <stdio.h> /* sprintf, printf */
 
#include <stdlib.h> /* malloc, free */
 
#include "options.h"
 

	
 
int main(int argc, char *argv[])
 
{
 
  struct execio *testrem;
 
  char *execargv[] = 
 
    {
 
      "ssh",
 
      "protofusion.org",
 
      "echo",
 
      "hello from protofusion.org"
 
    };
 

	
 
  fprintf(stderr, "testing execio (It shouldn't work) :-)\n");
 
  
 
  fprintf(stderr, "execio_open returns %d\n", execio_open(&testrem, "ssh", execargv));
 

	
 
  return 0;
 
};
 

	
 
/* this function should probably not exist. asprintf should be used instead of sprintf */
 
size_t intstrlen(size_t theint)
 
{
 
  size_t len = 0; /* if the number is single digit, this will be incremented */
 
  do
 
    {
 
      theint /= 10;
 
      len ++;
0 comments (0 inline, 0 general)