comparison libinterp/octave-value/ov-java.cc @ 20954:77f5591878bf

maint: Use '! expr' rather than '!expr' to conform to coding guidelines. * dialog.h, documentation-dock-widget.cc, files-dock-widget.cc, find-files-dialog.cc, file-editor-tab.cc, file-editor.cc, find-dialog.cc, octave-qscintilla.cc, main-window.cc, parser.cc, resource-manager.cc, workspace-view.cc, data.cc, dlmread.cc, gl-render.cc, gl2ps-renderer.cc, graphics.cc, graphics.in.h, ls-hdf5.cc, ls-mat5.cc, ls-oct-binary.cc, lsode.cc, mappers.cc, pt-jit.cc, regexp.cc, spparms.cc, symtab.h, utils.cc, zfstream.cc, __eigs__.cc, __glpk__.cc, __init_fltk__.cc, ccolamd.cc, colamd.cc, ov-base-diag.cc, ov-base-int.cc, ov-base-sparse.cc, ov-bool-mat.cc, ov-bool-sparse.cc, ov-bool.cc, ov-class.cc, ov-cx-sparse.cc, ov-fcn-handle.cc, ov-fcn-inline.cc, ov-java.cc, ov-perm.cc, ov-re-sparse.cc, ov-str-mat.cc, ov-struct.cc, ov.cc, pt-mat.cc, Array.cc, Array.h, CMatrix.cc, CSparse.cc, MatrixType.cc, PermMatrix.cc, Sparse.h, dMatrix.cc, dSparse.cc, fCMatrix.cc, fMatrix.cc, idx-vector.cc, CollocWt.h, SparseCmplxLU.cc, SparseCmplxQR.cc, SparseQR.cc, SparsedbleLU.cc, base-qr.cc, eigs-base.cc, oct-fftw.cc, randmtzig.c, sparse-dmsolve.cc, kpse.cc, lo-regexp.cc, oct-locbuf.h, url-transfer.cc, url-transfer.h, bitset.m, interp2.m, __isequal__.m, inpolygon.m, questdlg.m, help.m, compare_versions.m, substruct.m, configure_make.m, whitebg.m, __marching_cube__.m, struct2hdl.m, polyfit.m, spline.m, unique.m, svds.m, ellipke.m, binoinv.m, hygepdf.m, nbininv.m, poissinv.m, tcdf.m, unidcdf.m, unidpdf.m, dec2base.m, assert.m, weekday.m, mkoctfile.in.cc: maint: Use '! expr' rather than '!expr' to conform to coding guidelines.
author Rik <rik@octave.org>
date Sun, 20 Dec 2015 10:15:02 -0800
parents 6eff66fb8a02
children 9db35d2042be
comparison
equal deleted inserted replaced
20953:6982def1d416 20954:77f5591878bf
506 506
507 #endif 507 #endif
508 508
509 jsize nVMs = 0; 509 jsize nVMs = 0;
510 510
511 # if !defined (__APPLE__) && !defined (__MACH__) 511 # if ! defined (__APPLE__) && ! defined (__MACH__)
512 512
513 octave_shlib lib (jvm_lib_path); 513 octave_shlib lib (jvm_lib_path);
514 514
515 if (!lib) 515 if (! lib)
516 throw std::string ("unable to load Java Runtime Environment from ") 516 throw std::string ("unable to load Java Runtime Environment from ")
517 + jvm_lib_path; 517 + jvm_lib_path;
518 518
519 #if defined (__WIN32__) 519 #if defined (__WIN32__)
520 520
528 JNI_CreateJavaVM_t create_vm = 528 JNI_CreateJavaVM_t create_vm =
529 reinterpret_cast<JNI_CreateJavaVM_t> (lib.search ("JNI_CreateJavaVM")); 529 reinterpret_cast<JNI_CreateJavaVM_t> (lib.search ("JNI_CreateJavaVM"));
530 JNI_GetCreatedJavaVMs_t get_vm = 530 JNI_GetCreatedJavaVMs_t get_vm =
531 reinterpret_cast<JNI_GetCreatedJavaVMs_t> (lib.search ("JNI_GetCreatedJavaVMs")); 531 reinterpret_cast<JNI_GetCreatedJavaVMs_t> (lib.search ("JNI_GetCreatedJavaVMs"));
532 532
533 if (!create_vm) 533 if (! create_vm)
534 throw std::string ("unable to find JNI_CreateJavaVM in ") + jvm_lib_path; 534 throw std::string ("unable to find JNI_CreateJavaVM in ") + jvm_lib_path;
535 535
536 if (!get_vm) 536 if (! get_vm)
537 throw std::string ("unable to find JNI_GetCreatedJavaVMs in ") 537 throw std::string ("unable to find JNI_GetCreatedJavaVMs in ")
538 + jvm_lib_path; 538 + jvm_lib_path;
539 539
540 if (get_vm (&jvm, 1, &nVMs) == 0 && nVMs > 0) 540 if (get_vm (&jvm, 1, &nVMs) == 0 && nVMs > 0)
541 541
588 vm_args.add ("-Xrs"); 588 vm_args.add ("-Xrs");
589 vm_args.add ("-Djava.system.class.loader=org.octave.OctClassLoader"); 589 vm_args.add ("-Djava.system.class.loader=org.octave.OctClassLoader");
590 vm_args.read_java_opts (initial_java_dir () + file_ops::dir_sep_str () + 590 vm_args.read_java_opts (initial_java_dir () + file_ops::dir_sep_str () +
591 "java.opts"); 591 "java.opts");
592 592
593 # if !defined (__APPLE__) && !defined (__MACH__) 593 # if ! defined (__APPLE__) && ! defined (__MACH__)
594 594
595 if (create_vm (&jvm, &current_env, vm_args.to_args ()) != JNI_OK) 595 if (create_vm (&jvm, &current_env, vm_args.to_args ()) != JNI_OK)
596 throw std::string ("unable to start Java VM in ")+jvm_lib_path; 596 throw std::string ("unable to start Java VM in ")+jvm_lib_path;
597 //printf ("JVM created\n"); 597 //printf ("JVM created\n");
598 } 598 }
1354 { 1354 {
1355 jobj = 0; 1355 jobj = 0;
1356 jcls = 0; 1356 jcls = 0;
1357 //jcls = jni_env->FindClass ("java/lang/Object"); 1357 //jcls = jni_env->FindClass ("java/lang/Object");
1358 } 1358 }
1359 else if (!Vjava_matrix_autoconversion 1359 else if (! Vjava_matrix_autoconversion
1360 && ((val.is_real_matrix () 1360 && ((val.is_real_matrix ()
1361 && (val.rows () == 1 || val.columns () == 1)) 1361 && (val.rows () == 1 || val.columns () == 1))
1362 || val.is_range ())) 1362 || val.is_range ()))
1363 { 1363 {
1364 Matrix m = val.matrix_value (); 1364 Matrix m = val.matrix_value ();