Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include <oct.h>
00016 #include <stdio.h>
00017 #include <stdlib.h>
00018 #include "grpc.h"
00019 #include "gs_oct.h"
00020
00021
00022 DEFUN_DLD (gs_problems, args, nargout, "Octave client for GridSolve") {
00023 octave_value_list bad_retval;
00024 grpc_error_t status;
00025 char *info[1];
00026
00027
00028
00029
00030 for (int i = 0; i < nargout; i++) {
00031 bad_retval(i) = Matrix(0, 0);
00032 }
00033
00034
00035 status = grpc_initialize(NULL);
00036 if (status != GRPC_NO_ERROR && status != GRPC_ALREADY_INITIALIZED) {
00037 fprintf(stderr, "%s\n", grpc_error_string(status));
00038 return bad_retval;
00039 }
00040
00041
00042 int nargin = args.length();
00043
00044
00045 if ((status = grpc_get_problems(info)) != GRPC_NO_ERROR) {
00046 fprintf(stderr, "%s\n", grpc_error_string(status));
00047 } else {
00048 printf("GridSolve - List of available problems:\n");
00049 printf("%s\n", info[0]);
00050 }
00051
00052
00053 grpc_finalize();
00054 return bad_retval;
00055 }