rem
stringlengths 0
274k
| add
stringlengths 0
169k
| context
stringlengths 9
471k
|
---|---|---|
if (arg3) setPhDim_tFields(env, arg3, lparg3); | JNIEXPORT jint JNICALL OS_NATIVE(PgDrawTImage) (JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2, jobject arg3, jint arg4, jint arg5, jint arg6, jint arg7){ PhPoint_t _arg2, *lparg2=NULL; PhDim_t _arg3, *lparg3=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawTImage\n") if (arg2) lparg2 = getPhPoint_tFields(env, arg2, &_arg2); if (arg3) lparg3 = getPhDim_tFields(env, arg3, &_arg3); rc = (jint)PgDrawTImage((void const *)arg0, arg1, (PhPoint_t const *)lparg2, (PhDim_t const *)lparg3, arg4, arg5, (void const *)arg6, arg7); if (arg2) setPhPoint_tFields(env, arg2, lparg2); if (arg3) setPhDim_tFields(env, arg3, lparg3); NATIVE_EXIT(env, that, "PgDrawTImage\n") return rc;} |
|
if (arg2) setPhPoint_tFields(env, arg2, lparg2); | JNIEXPORT jint JNICALL OS_NATIVE(PgDrawText) (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jobject arg2, jint arg3){ jbyte *lparg0=NULL; PhPoint_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawText\n") if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL); if (arg2) lparg2 = getPhPoint_tFields(env, arg2, &_arg2); rc = (jint)PgDrawText((char const *)lparg0, arg1, (PhPoint_t *)lparg2, arg3); if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); if (arg2) setPhPoint_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PgDrawText\n") return rc;} |
|
if (arg1) setPhPoint_tFields(env, arg1, lparg1); if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); | JNIEXPORT jobject JNICALL OS_NATIVE(PgExtentMultiText) (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jbyteArray arg2, jbyteArray arg3, jint arg4, jint arg5){ PhRect_t _arg0, *lparg0=NULL; PhPoint_t _arg1, *lparg1=NULL; jbyte *lparg2=NULL; jbyte *lparg3=NULL; jobject rc; NATIVE_ENTER(env, that, "PgExtentMultiText\n") if (arg0) lparg0 = getPhRect_tFields(env, arg0, &_arg0); if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL); if (arg3) lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL); rc = (jobject)PgExtentMultiText((PhRect_t *)lparg0, (PhPoint_t *)lparg1, (char *)lparg2, (char *)lparg3, arg4, arg5); if (arg0) setPhRect_tFields(env, arg0, lparg0); if (arg1) setPhPoint_tFields(env, arg1, lparg1); if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); NATIVE_EXIT(env, that, "PgExtentMultiText\n") return rc;} |
|
if (arg1) setPhRect_tFields(env, arg1, lparg1); | JNIEXPORT void JNICALL OS_NATIVE(PhAreaToRect) (JNIEnv *env, jclass that, jobject arg0, jobject arg1){ PhArea_t _arg0, *lparg0=NULL; PhRect_t _arg1, *lparg1=NULL; NATIVE_ENTER(env, that, "PhAreaToRect\n") if (arg0) lparg0 = getPhArea_tFields(env, arg0, &_arg0); if (arg1) lparg1 = getPhRect_tFields(env, arg1, &_arg1); PhAreaToRect((PhArea_t const *)lparg0, (PhRect_t *)lparg1); if (arg0) setPhArea_tFields(env, arg0, lparg0); if (arg1) setPhRect_tFields(env, arg1, lparg1); NATIVE_EXIT(env, that, "PhAreaToRect\n")} |
|
if (arg2) setPhPoint_tFields(env, arg2, lparg2); | JNIEXPORT void JNICALL OS_NATIVE(PhBlit) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jobject arg2){ PhRect_t _arg1, *lparg1=NULL; PhPoint_t _arg2, *lparg2=NULL; NATIVE_ENTER(env, that, "PhBlit\n") if (arg1) lparg1 = getPhRect_tFields(env, arg1, &_arg1); if (arg2) lparg2 = getPhPoint_tFields(env, arg2, &_arg2); PhBlit((PhRid_t)arg0, (const PhRect_t *)lparg1, (const PhPoint_t *)lparg2); if (arg1) setPhRect_tFields(env, arg1, lparg1); if (arg2) setPhPoint_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PhBlit\n")} |
|
if (arg3) setPhRect_tFields(env, arg3, lparg3); if (arg5) setPhDim_tFields(env, arg5, lparg5); if (arg6) setPhDim_tFields(env, arg6, lparg6); if (arg7) setPhDim_tFields(env, arg7, lparg7); if (arg8) setPhPoint_tFields(env, arg8, lparg8); if (arg9) (*env)->ReleaseShortArrayElements(env, arg9, lparg9, 0); | JNIEXPORT jint JNICALL OS_NATIVE(PhInitDrag) (JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2, jobject arg3, jint arg4, jobject arg5, jobject arg6, jobject arg7, jobject arg8, jshortArray arg9){ PhRect_t _arg2, *lparg2=NULL; PhRect_t _arg3, *lparg3=NULL; PhDim_t _arg5, *lparg5=NULL; PhDim_t _arg6, *lparg6=NULL; PhDim_t _arg7, *lparg7=NULL; PhPoint_t _arg8, *lparg8=NULL; jshort *lparg9=NULL; jint rc; NATIVE_ENTER(env, that, "PhInitDrag\n") if (arg2) lparg2 = getPhRect_tFields(env, arg2, &_arg2); if (arg3) lparg3 = getPhRect_tFields(env, arg3, &_arg3); if (arg5) lparg5 = getPhDim_tFields(env, arg5, &_arg5); if (arg6) lparg6 = getPhDim_tFields(env, arg6, &_arg6); if (arg7) lparg7 = getPhDim_tFields(env, arg7, &_arg7); if (arg8) lparg8 = getPhPoint_tFields(env, arg8, &_arg8); if (arg9) lparg9 = (*env)->GetShortArrayElements(env, arg9, NULL); rc = (jint)PhInitDrag((PhRid_t)arg0, arg1, (const PhRect_t *)lparg2, (const PhRect_t *)lparg3, arg4, (PhDim_t *)lparg5, (PhDim_t *)lparg6, (PhDim_t *)lparg7, (PhPoint_t *)lparg8, (PhCursorDescription_t *)lparg9); if (arg2) setPhRect_tFields(env, arg2, lparg2); if (arg3) setPhRect_tFields(env, arg3, lparg3); if (arg5) setPhDim_tFields(env, arg5, lparg5); if (arg6) setPhDim_tFields(env, arg6, lparg6); if (arg7) setPhDim_tFields(env, arg7, lparg7); if (arg8) setPhPoint_tFields(env, arg8, lparg8); if (arg9) (*env)->ReleaseShortArrayElements(env, arg9, lparg9, 0); NATIVE_EXIT(env, that, "PhInitDrag\n") return rc;} |
|
if (arg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0); | JNIEXPORT jint JNICALL OS_NATIVE(PhQueryRids) (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jobject arg6, jintArray arg7, jint arg8){ PhRect_t _arg6, *lparg6=NULL; jint *lparg7=NULL; jint rc; NATIVE_ENTER(env, that, "PhQueryRids\n") if (arg6) lparg6 = getPhRect_tFields(env, arg6, &_arg6); if (arg7) lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL); rc = (jint)PhQueryRids(arg0, (PhRid_t)arg1, arg2, arg3, arg4, (PhRid_t)arg5, (const PhRect_t *)lparg6, (PhRid_t *)lparg7, arg8); if (arg6) setPhRect_tFields(env, arg6, lparg6); if (arg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0); NATIVE_EXIT(env, that, "PhQueryRids\n") return rc;} |
|
if (arg1) setPhRect_tFields(env, arg1, lparg1); | JNIEXPORT jint JNICALL OS_NATIVE(PhRectUnion__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhRect_1t_2) (JNIEnv *env, jclass that, jobject arg0, jobject arg1){ PhRect_t _arg0, *lparg0=NULL; PhRect_t _arg1, *lparg1=NULL; jint rc; NATIVE_ENTER(env, that, "PhRectUnion__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhRect_1t_2\n") if (arg0) lparg0 = getPhRect_tFields(env, arg0, &_arg0); if (arg1) lparg1 = getPhRect_tFields(env, arg1, &_arg1); rc = (jint)PhRectUnion((PhRect_t *)lparg0, (PhRect_t const *)lparg1); if (arg0) setPhRect_tFields(env, arg0, lparg0); if (arg1) setPhRect_tFields(env, arg1, lparg1); NATIVE_EXIT(env, that, "PhRectUnion__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhRect_1t_2\n") return rc;} |
|
if (arg2) setPhRect_tFields(env, arg2, lparg2); | JNIEXPORT jint JNICALL OS_NATIVE(PhRegionQuery) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jobject arg2, jint arg3, jint arg4){ PhRegion_t _arg1, *lparg1=NULL; PhRect_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PhRegionQuery\n") if (arg1) lparg1 = getPhRegion_tFields(env, arg1, &_arg1); if (arg2) lparg2 = getPhRect_tFields(env, arg2, &_arg2); rc = (jint)PhRegionQuery((PhRid_t)arg0, (PhRegion_t *)lparg1, (PhRect_t *)lparg2, (void *)arg3, arg4); if (arg1) setPhRegion_tFields(env, arg1, lparg1); if (arg2) setPhRect_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PhRegionQuery\n") return rc;} |
|
if (arg2) setPhPoint_tFields(env, arg2, lparg2); | JNIEXPORT jint JNICALL OS_NATIVE(PmMemCreateMC) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jobject arg2){ PhDim_t _arg1, *lparg1=NULL; PhPoint_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PmMemCreateMC\n") if (arg1) lparg1 = getPhDim_tFields(env, arg1, &_arg1); if (arg2) lparg2 = getPhPoint_tFields(env, arg2, &_arg2); rc = (jint)PmMemCreateMC((PhImage_t *)arg0, (PhDim_t *)lparg1, (PhPoint_t *)lparg2); if (arg1) setPhDim_tFields(env, arg1, lparg1); if (arg2) setPhPoint_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PmMemCreateMC\n") return rc;} |
|
if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0); if (arg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0); if (arg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0); if (arg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0); | JNIEXPORT jint JNICALL OS_NATIVE(PtAlert) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jbyteArray arg2, jint arg3, jbyteArray arg4, jbyteArray arg5, jint arg6, jintArray arg7, jintArray arg8, jint arg9, jint arg10, jint arg11){ PhPoint_t _arg1, *lparg1=NULL; jbyte *lparg2=NULL; jbyte *lparg4=NULL; jbyte *lparg5=NULL; jint *lparg7=NULL; jint *lparg8=NULL; jint rc; NATIVE_ENTER(env, that, "PtAlert\n") if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL); if (arg4) lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL); if (arg5) lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL); if (arg7) lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL); if (arg8) lparg8 = (*env)->GetIntArrayElements(env, arg8, NULL); rc = (jint)PtAlert((PtWidget_t *)arg0, (PhPoint_t const *)lparg1, (char const *)lparg2, (PhImage_t const *)arg3, (char const *)lparg4, (char const *)lparg5, arg6, (char const **)lparg7, (char const **)lparg8, arg9, arg10, arg11); if (arg1) setPhPoint_tFields(env, arg1, lparg1); if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0); if (arg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0); if (arg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0); if (arg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0); NATIVE_EXIT(env, that, "PtAlert\n") return rc;} |
|
if (arg2) setPhPoint_tFields(env, arg2, lparg2); | JNIEXPORT jint JNICALL OS_NATIVE(PtBlit) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jobject arg2){ PhRect_t _arg1, *lparg1=NULL; PhPoint_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PtBlit\n") if (arg1) lparg1 = getPhRect_tFields(env, arg1, &_arg1); if (arg2) lparg2 = getPhPoint_tFields(env, arg2, &_arg2); rc = (jint)PtBlit((PtWidget_t const *)arg0, (PhRect_t const *)lparg1, (PhPoint_t const *)lparg2); if (arg1) setPhRect_tFields(env, arg1, lparg1); if (arg2) setPhPoint_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PtBlit\n") return rc;} |
|
if (arg2) setPtColorSelectInfo_tFields(env, arg2, lparg2); | JNIEXPORT jint JNICALL OS_NATIVE(PtColorSelect) (JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jobject arg2){ jbyte *lparg1=NULL; PtColorSelectInfo_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PtColorSelect\n") if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL); if (arg2) lparg2 = getPtColorSelectInfo_tFields(env, arg2, &_arg2); rc = (jint)PtColorSelect((PtWidget_t *)arg0, (char *)lparg1, lparg2); if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); if (arg2) setPtColorSelectInfo_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PtColorSelect\n") return rc;} |
|
if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); if (arg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0); if (arg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0); if (arg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0); if (arg7) (*env)->ReleaseByteArrayElements(env, arg7, lparg7, 0); if (arg8) setPtFileSelectionInfo_tFields(env, arg8, lparg8); | JNIEXPORT jint JNICALL OS_NATIVE(PtFileSelection) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jbyteArray arg2, jbyteArray arg3, jbyteArray arg4, jbyteArray arg5, jbyteArray arg6, jbyteArray arg7, jobject arg8, jint arg9){ PhPoint_t _arg1, *lparg1=NULL; jbyte *lparg2=NULL; jbyte *lparg3=NULL; jbyte *lparg4=NULL; jbyte *lparg5=NULL; jbyte *lparg6=NULL; jbyte *lparg7=NULL; PtFileSelectionInfo_t _arg8={0}, *lparg8=NULL; jint rc; NATIVE_ENTER(env, that, "PtFileSelection\n") if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL); if (arg3) lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL); if (arg4) lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL); if (arg5) lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL); if (arg6) lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL); if (arg7) lparg7 = (*env)->GetByteArrayElements(env, arg7, NULL); if (arg8) lparg8 = getPtFileSelectionInfo_tFields(env, arg8, &_arg8); rc = (jint)PtFileSelection((PtWidget_t *)arg0, (PhPoint_t const *)lparg1, (char const *)lparg2, (char const *)lparg3, (char const *)lparg4, (char const *)lparg5, (char const *)lparg6, (char const *)lparg7, (PtFileSelectionInfo_t *)lparg8, arg9); if (arg1) setPhPoint_tFields(env, arg1, lparg1); if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); if (arg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0); if (arg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0); if (arg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0); if (arg7) (*env)->ReleaseByteArrayElements(env, arg7, lparg7, 0); if (arg8) setPtFileSelectionInfo_tFields(env, arg8, lparg8); NATIVE_EXIT(env, that, "PtFileSelection\n") return rc;} |
|
if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); if (arg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0); | JNIEXPORT jint JNICALL OS_NATIVE(PtFontSelection) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jbyteArray arg2, jbyteArray arg3, jint arg4, jint arg5, jbyteArray arg6){ PhPoint_t _arg1, *lparg1=NULL; jbyte *lparg2=NULL; jbyte *lparg3=NULL; jbyte *lparg6=NULL; jint rc; NATIVE_ENTER(env, that, "PtFontSelection\n") if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL); if (arg3) lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL); if (arg6) lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL); rc = (jint)PtFontSelection((PtWidget_t *)arg0, (const PhPoint_t *)lparg1, (const char *)lparg2, (const char *)lparg3, arg4, arg5, (const char *)lparg6); if (arg1) setPhPoint_tFields(env, arg1, lparg1); if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); if (arg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0); NATIVE_EXIT(env, that, "PtFontSelection\n") return rc;} |
|
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); if (arg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0); if (arg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0); | JNIEXPORT void JNICALL OS_NATIVE(PtFrameSize) (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2, jintArray arg3, jintArray arg4, jintArray arg5){ jint *lparg2=NULL; jint *lparg3=NULL; jint *lparg4=NULL; jint *lparg5=NULL; NATIVE_ENTER(env, that, "PtFrameSize\n") if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL); if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL); if (arg4) lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL); if (arg5) lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL); PtFrameSize(arg0, arg1, lparg2, lparg3, lparg4, lparg5); if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); if (arg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0); if (arg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0); NATIVE_EXIT(env, that, "PtFrameSize\n")} |
|
if (arg2) (*env)->ReleaseShortArrayElements(env, arg2, lparg2, 0); | JNIEXPORT void JNICALL OS_NATIVE(PtGetAbsPosition) (JNIEnv *env, jclass that, jint arg0, jshortArray arg1, jshortArray arg2){ jshort *lparg1=NULL; jshort *lparg2=NULL; NATIVE_ENTER(env, that, "PtGetAbsPosition\n") if (arg1) lparg1 = (*env)->GetShortArrayElements(env, arg1, NULL); if (arg2) lparg2 = (*env)->GetShortArrayElements(env, arg2, NULL); PtGetAbsPosition((PtWidget_t *)arg0, lparg1, lparg2); if (arg1) (*env)->ReleaseShortArrayElements(env, arg1, lparg1, 0); if (arg2) (*env)->ReleaseShortArrayElements(env, arg2, lparg2, 0); NATIVE_EXIT(env, that, "PtGetAbsPosition\n")} |
|
if (arg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0); | JNIEXPORT jint JNICALL OS_NATIVE(PtInflateBalloon) (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jbyteArray arg3, jbyteArray arg4, jint arg5, jint arg6){ jbyte *lparg3=NULL; jbyte *lparg4=NULL; jint rc; NATIVE_ENTER(env, that, "PtInflateBalloon\n") if (arg3) lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL); if (arg4) lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL); rc = (jint)PtInflateBalloon((PtWidget_t *)arg0, (PtWidget_t *)arg1, arg2, (char const *)lparg3, (char const *)lparg4, (PgColor_t)arg5, (PgColor_t)arg6); if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); if (arg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0); NATIVE_EXIT(env, that, "PtInflateBalloon\n") return rc;} |
|
if (arg2) setPhArea_tFields(env, arg2, lparg2); | JNIEXPORT jint JNICALL OS_NATIVE(PtSetAreaFromWidgetCanvas) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jobject arg2){ PhRect_t _arg1, *lparg1=NULL; PhArea_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PtSetAreaFromWidgetCanvas\n") if (arg1) lparg1 = getPhRect_tFields(env, arg1, &_arg1); if (arg2) lparg2 = getPhArea_tFields(env, arg2, &_arg2); rc = (jint)PtSetAreaFromWidgetCanvas((PtWidget_t *)arg0, lparg1, lparg2); if (arg1) setPhRect_tFields(env, arg1, lparg1); if (arg2) setPhArea_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PtSetAreaFromWidgetCanvas\n") return rc;} |
|
if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); | JNIEXPORT jint JNICALL OS_NATIVE(PtTextGetSelection) (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2){ jint *lparg1=NULL; jint *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PtTextGetSelection\n") if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL); if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL); rc = (jint)PtTextGetSelection((PtWidget_t *)arg0, lparg1, lparg2); if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); NATIVE_EXIT(env, that, "PtTextGetSelection\n") return rc;} |
|
if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); | JNIEXPORT jint JNICALL OS_NATIVE(PtTextSetSelection) (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2){ jint *lparg1=NULL; jint *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PtTextSetSelection\n") if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL); if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL); rc = (jint)PtTextSetSelection((PtWidget_t *)arg0, lparg1, lparg2); if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); NATIVE_EXIT(env, that, "PtTextSetSelection\n") return rc;} |
|
if (arg1) setPhClipHeaderFields(env, arg1, lparg1); | JNIEXPORT void JNICALL OS_NATIVE(memmove___3BLorg_eclipse_swt_internal_photon_PhClipHeader_2I) (JNIEnv *env, jclass that, jbyteArray arg0, jobject arg1, jint arg2){ jbyte *lparg0=NULL; PhClipHeader _arg1, *lparg1=NULL; NATIVE_ENTER(env, that, "memmove___3BLorg_eclipse_swt_internal_photon_PhClipHeader_2I\n") if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL); if (arg1) lparg1 = getPhClipHeaderFields(env, arg1, &_arg1); memmove((void *)lparg0, (const void *)lparg1, arg2); if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); if (arg1) setPhClipHeaderFields(env, arg1, lparg1); NATIVE_EXIT(env, that, "memmove___3BLorg_eclipse_swt_internal_photon_PhClipHeader_2I\n")} |
|
QCString encoding ( fa.mEncoding ); | QDataStream& operator>> (QDataStream& s, sftpFileAttr& fa) { // XXX Add some error checking in here in case // we get a bad sftp packet. // Save the encoding info before clearing fa... QCString encoding ( fa.mEncoding ); fa.clear(); if( fa.mDirAttrs ) { QCString fn; s >> fn; fn.truncate( fn.size() ); KRemoteEncoding encoder ( encoding.data() ); fa.mFilename = encoder.decode( fn ); s >> fa.mLongname; fa.mLongname.truncate( fa.mLongname.size() ); //kdDebug() << ">>: ftpfileattr long filename (" << fa.mLongname.size() << ")= " << fa.mLongname << endl; } s >> fa.mFlags; // get flags if( fa.mFlags & SSH2_FILEXFER_ATTR_SIZE ) { Q_ULLONG fileSize; s >> fileSize; fa.setFileSize(fileSize); } Q_UINT32 x; if( fa.mFlags & SSH2_FILEXFER_ATTR_UIDGID ) { s >> x; fa.setUid(x); s >> x; fa.setGid(x); } if( fa.mFlags & SSH2_FILEXFER_ATTR_PERMISSIONS ) { s >> x; fa.setPermissions(x); } if( fa.mFlags & SSH2_FILEXFER_ATTR_ACMODTIME ) { s >> x; fa.setAtime(x); s >> x; fa.setMtime(x); } if( fa.mFlags & SSH2_FILEXFER_ATTR_EXTENDED ) { s >> x; fa.setExtendedCount(x); // XXX: Read in extensions from data stream here // s.readBytes(extendedtype).readBytes(extendeddata); } fa.getUserGroupNames(); return s;} |
|
KRemoteEncoding encoder ( encoding.data() ); fa.mFilename = encoder.decode( fn ); | fa.mFilename = fa.mEncoding->decode( fn ); | QDataStream& operator>> (QDataStream& s, sftpFileAttr& fa) { // XXX Add some error checking in here in case // we get a bad sftp packet. // Save the encoding info before clearing fa... QCString encoding ( fa.mEncoding ); fa.clear(); if( fa.mDirAttrs ) { QCString fn; s >> fn; fn.truncate( fn.size() ); KRemoteEncoding encoder ( encoding.data() ); fa.mFilename = encoder.decode( fn ); s >> fa.mLongname; fa.mLongname.truncate( fa.mLongname.size() ); //kdDebug() << ">>: ftpfileattr long filename (" << fa.mLongname.size() << ")= " << fa.mLongname << endl; } s >> fa.mFlags; // get flags if( fa.mFlags & SSH2_FILEXFER_ATTR_SIZE ) { Q_ULLONG fileSize; s >> fileSize; fa.setFileSize(fileSize); } Q_UINT32 x; if( fa.mFlags & SSH2_FILEXFER_ATTR_UIDGID ) { s >> x; fa.setUid(x); s >> x; fa.setGid(x); } if( fa.mFlags & SSH2_FILEXFER_ATTR_PERMISSIONS ) { s >> x; fa.setPermissions(x); } if( fa.mFlags & SSH2_FILEXFER_ATTR_ACMODTIME ) { s >> x; fa.setAtime(x); s >> x; fa.setMtime(x); } if( fa.mFlags & SSH2_FILEXFER_ATTR_EXTENDED ) { s >> x; fa.setExtendedCount(x); // XXX: Read in extensions from data stream here // s.readBytes(extendedtype).readBytes(extendeddata); } fa.getUserGroupNames(); return s;} |
kdDebug() << "kio_ldap : Starting " << getpid() << endl; | kdDebug(7125) << "kio_ldap : Starting " << getpid() << endl; | int kdemain(int argc, char **argv){ KInstance instance( "kio_ldap" ); // redirect the signals //signal(SIGCHLD, KIOProtocol::sigchld_handler); //signal(SIGSEGV, KIOProtocol::sigsegv_handler); kdDebug() << "kio_ldap : Starting " << getpid() << endl; if (argc != 4) { fprintf(stderr, "Usage kio_ldap protocol pool app\n"); return -1; } // let the protocol class do its work LDAPProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); kdDebug() << "kio_ldap : Done" << endl; return 0;} |
kdDebug() << "kio_ldap : Done" << endl; | kdDebug(7125) << "kio_ldap : Done" << endl; | int kdemain(int argc, char **argv){ KInstance instance( "kio_ldap" ); // redirect the signals //signal(SIGCHLD, KIOProtocol::sigchld_handler); //signal(SIGSEGV, KIOProtocol::sigsegv_handler); kdDebug() << "kio_ldap : Starting " << getpid() << endl; if (argc != 4) { fprintf(stderr, "Usage kio_ldap protocol pool app\n"); return -1; } // let the protocol class do its work LDAPProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); kdDebug() << "kio_ldap : Done" << endl; return 0;} |
lpStruct->lParam = (*env)->GetIntField(env, lpObject, BROWSEINFOFc.lParam); lpStruct->lpfn = (BFFCALLBACK)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.lpfn); lpStruct->ulFlags = (*env)->GetIntField(env, lpObject, BROWSEINFOFc.ulFlags); lpStruct->lpszTitle = (LPCTSTR)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.lpszTitle); lpStruct->pszDisplayName = (LPTSTR)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.pszDisplayName); lpStruct->pidlRoot = (LPCITEMIDLIST)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.pidlRoot); lpStruct->hwndOwner = (HWND)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.hwndOwner); | BROWSEINFO *getBROWSEINFOFields(JNIEnv *env, jobject lpObject, BROWSEINFO *lpStruct){ if (!BROWSEINFOFc.cached) cacheBROWSEINFOFields(env, lpObject); lpStruct->iImage = (*env)->GetIntField(env, lpObject, BROWSEINFOFc.iImage); lpStruct->lParam = (*env)->GetIntField(env, lpObject, BROWSEINFOFc.lParam); lpStruct->lpfn = (BFFCALLBACK)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.lpfn); lpStruct->ulFlags = (*env)->GetIntField(env, lpObject, BROWSEINFOFc.ulFlags); lpStruct->lpszTitle = (LPCTSTR)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.lpszTitle); lpStruct->pszDisplayName = (LPTSTR)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.pszDisplayName); lpStruct->pidlRoot = (LPCITEMIDLIST)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.pidlRoot); lpStruct->hwndOwner = (HWND)(*env)->GetIntField(env, lpObject, BROWSEINFOFc.hwndOwner); return lpStruct;} |
|
(*env)->SetIntField(env, lpObject, BROWSEINFOFc.lParam, (jint)lpStruct->lParam); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.lpfn, (jint)lpStruct->lpfn); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.ulFlags, (jint)lpStruct->ulFlags); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.lpszTitle, (jint)lpStruct->lpszTitle); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.pszDisplayName, (jint)lpStruct->pszDisplayName); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.pidlRoot, (jint)lpStruct->pidlRoot); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.hwndOwner, (jint)lpStruct->hwndOwner); | void setBROWSEINFOFields(JNIEnv *env, jobject lpObject, BROWSEINFO *lpStruct){ if (!BROWSEINFOFc.cached) cacheBROWSEINFOFields(env, lpObject); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.iImage, (jint)lpStruct->iImage); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.lParam, (jint)lpStruct->lParam); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.lpfn, (jint)lpStruct->lpfn); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.ulFlags, (jint)lpStruct->ulFlags); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.lpszTitle, (jint)lpStruct->lpszTitle); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.pszDisplayName, (jint)lpStruct->pszDisplayName); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.pidlRoot, (jint)lpStruct->pidlRoot); (*env)->SetIntField(env, lpObject, BROWSEINFOFc.hwndOwner, (jint)lpStruct->hwndOwner);} |
|
lpStruct->nSizeMin = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.nSizeMin); lpStruct->nFontType = (*env)->GetShortField(env, lpObject, CHOOSEFONTFc.nFontType); lpStruct->lpszStyle = (LPTSTR)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lpszStyle); lpStruct->hInstance = (HINSTANCE)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.hInstance); lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lpTemplateName); lpStruct->lpfnHook = (LPCFHOOKPROC)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lpfnHook); lpStruct->lCustData = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lCustData); lpStruct->rgbColors = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.rgbColors); lpStruct->Flags = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.Flags); lpStruct->iPointSize = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.iPointSize); lpStruct->lpLogFont = (LPLOGFONT)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lpLogFont); lpStruct->hDC = (HDC)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.hDC); lpStruct->hwndOwner = (HWND)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.hwndOwner); lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lStructSize); | CHOOSEFONT *getCHOOSEFONTFields(JNIEnv *env, jobject lpObject, CHOOSEFONT *lpStruct){ if (!CHOOSEFONTFc.cached) cacheCHOOSEFONTFields(env, lpObject); lpStruct->nSizeMax = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.nSizeMax); lpStruct->nSizeMin = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.nSizeMin); lpStruct->nFontType = (*env)->GetShortField(env, lpObject, CHOOSEFONTFc.nFontType); lpStruct->lpszStyle = (LPTSTR)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lpszStyle); lpStruct->hInstance = (HINSTANCE)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.hInstance); lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lpTemplateName); lpStruct->lpfnHook = (LPCFHOOKPROC)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lpfnHook); lpStruct->lCustData = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lCustData); lpStruct->rgbColors = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.rgbColors); lpStruct->Flags = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.Flags); lpStruct->iPointSize = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.iPointSize); lpStruct->lpLogFont = (LPLOGFONT)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lpLogFont); lpStruct->hDC = (HDC)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.hDC); lpStruct->hwndOwner = (HWND)(*env)->GetIntField(env, lpObject, CHOOSEFONTFc.hwndOwner); lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, CHOOSEFONTFc.lStructSize); return lpStruct;} |
|
(*env)->SetIntField(env, lpObject, CHOOSEFONTFc.nSizeMin, (jint)lpStruct->nSizeMin); (*env)->SetShortField(env, lpObject, CHOOSEFONTFc.nFontType, (jshort)lpStruct->nFontType); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lpszStyle, (jint)lpStruct->lpszStyle); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.hInstance, (jint)lpStruct->hInstance); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lpTemplateName, (jint)lpStruct->lpTemplateName); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lpfnHook, (jint)lpStruct->lpfnHook); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lCustData, (jint)lpStruct->lCustData); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.rgbColors, (jint)lpStruct->rgbColors); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.Flags, (jint)lpStruct->Flags); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.iPointSize, (jint)lpStruct->iPointSize); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lpLogFont, (jint)lpStruct->lpLogFont); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.hDC, (jint)lpStruct->hDC); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.hwndOwner, (jint)lpStruct->hwndOwner); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lStructSize, (jint)lpStruct->lStructSize); | void setCHOOSEFONTFields(JNIEnv *env, jobject lpObject, CHOOSEFONT *lpStruct){ if (!CHOOSEFONTFc.cached) cacheCHOOSEFONTFields(env, lpObject); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.nSizeMax, (jint)lpStruct->nSizeMax); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.nSizeMin, (jint)lpStruct->nSizeMin); (*env)->SetShortField(env, lpObject, CHOOSEFONTFc.nFontType, (jshort)lpStruct->nFontType); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lpszStyle, (jint)lpStruct->lpszStyle); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.hInstance, (jint)lpStruct->hInstance); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lpTemplateName, (jint)lpStruct->lpTemplateName); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lpfnHook, (jint)lpStruct->lpfnHook); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lCustData, (jint)lpStruct->lCustData); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.rgbColors, (jint)lpStruct->rgbColors); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.Flags, (jint)lpStruct->Flags); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.iPointSize, (jint)lpStruct->iPointSize); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lpLogFont, (jint)lpStruct->lpLogFont); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.hDC, (jint)lpStruct->hDC); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.hwndOwner, (jint)lpStruct->hwndOwner); (*env)->SetIntField(env, lpObject, CHOOSEFONTFc.lStructSize, (jint)lpStruct->lStructSize);} |
|
(*env)->SetIntField(env, lpObject, DROPFILESFc.fNC, (jint)lpStruct->fNC); (*env)->SetIntField(env, lpObject, DROPFILESFc.pt_y, (jint)lpStruct->pt.y); (*env)->SetIntField(env, lpObject, DROPFILESFc.pt_x, (jint)lpStruct->pt.x); (*env)->SetIntField(env, lpObject, DROPFILESFc.pFiles, (jint)lpStruct->pFiles); | void setDROPFILESFields(JNIEnv *env, jobject lpObject, DROPFILES *lpStruct){ if (!DROPFILESFc.cached) cacheDROPFILESFields(env, lpObject); (*env)->SetIntField(env, lpObject, DROPFILESFc.fWide, (jint)lpStruct->fWide); (*env)->SetIntField(env, lpObject, DROPFILESFc.fNC, (jint)lpStruct->fNC); (*env)->SetIntField(env, lpObject, DROPFILESFc.pt_y, (jint)lpStruct->pt.y); (*env)->SetIntField(env, lpObject, DROPFILESFc.pt_x, (jint)lpStruct->pt.x); (*env)->SetIntField(env, lpObject, DROPFILESFc.pFiles, (jint)lpStruct->pFiles);} |
|
(*env)->SetIntField(env, lpObject, GRADIENT_RECTFc.UpperLeft, (jint)lpStruct->UpperLeft); | void setGRADIENT_RECTFields(JNIEnv *env, jobject lpObject, GRADIENT_RECT *lpStruct){ if (!GRADIENT_RECTFc.cached) cacheGRADIENT_RECTFields(env, lpObject); (*env)->SetIntField(env, lpObject, GRADIENT_RECTFc.LowerRight, (jint)lpStruct->LowerRight); (*env)->SetIntField(env, lpObject, GRADIENT_RECTFc.UpperLeft, (jint)lpStruct->UpperLeft);} |
|
(*env)->SetIntField(env, lpObject, INITCOMMONCONTROLSEXFc.dwSize, (jint)lpStruct->dwSize); | void setINITCOMMONCONTROLSEXFields(JNIEnv *env, jobject lpObject, INITCOMMONCONTROLSEX *lpStruct){ if (!INITCOMMONCONTROLSEXFc.cached) cacheINITCOMMONCONTROLSEXFields(env, lpObject); (*env)->SetIntField(env, lpObject, INITCOMMONCONTROLSEXFc.dwICC, (jint)lpStruct->dwICC); (*env)->SetIntField(env, lpObject, INITCOMMONCONTROLSEXFc.dwSize, (jint)lpStruct->dwSize);} |
|
(*env)->SetIntField(env, lpObject, LVITEMFc.lParam, (jint)lpStruct->lParam); (*env)->SetIntField(env, lpObject, LVITEMFc.iImage, (jint)lpStruct->iImage); (*env)->SetIntField(env, lpObject, LVITEMFc.cchTextMax, (jint)lpStruct->cchTextMax); (*env)->SetIntField(env, lpObject, LVITEMFc.pszText, (jint)lpStruct->pszText); (*env)->SetIntField(env, lpObject, LVITEMFc.stateMask, (jint)lpStruct->stateMask); (*env)->SetIntField(env, lpObject, LVITEMFc.state, (jint)lpStruct->state); (*env)->SetIntField(env, lpObject, LVITEMFc.iSubItem, (jint)lpStruct->iSubItem); (*env)->SetIntField(env, lpObject, LVITEMFc.iItem, (jint)lpStruct->iItem); (*env)->SetIntField(env, lpObject, LVITEMFc.mask, (jint)lpStruct->mask); | void setLVITEMFields(JNIEnv *env, jobject lpObject, LVITEM *lpStruct){ if (!LVITEMFc.cached) cacheLVITEMFields(env, lpObject); (*env)->SetIntField(env, lpObject, LVITEMFc.iIndent, (jint)lpStruct->iIndent); (*env)->SetIntField(env, lpObject, LVITEMFc.lParam, (jint)lpStruct->lParam); (*env)->SetIntField(env, lpObject, LVITEMFc.iImage, (jint)lpStruct->iImage); (*env)->SetIntField(env, lpObject, LVITEMFc.cchTextMax, (jint)lpStruct->cchTextMax); (*env)->SetIntField(env, lpObject, LVITEMFc.pszText, (jint)lpStruct->pszText); (*env)->SetIntField(env, lpObject, LVITEMFc.stateMask, (jint)lpStruct->stateMask); (*env)->SetIntField(env, lpObject, LVITEMFc.state, (jint)lpStruct->state); (*env)->SetIntField(env, lpObject, LVITEMFc.iSubItem, (jint)lpStruct->iSubItem); (*env)->SetIntField(env, lpObject, LVITEMFc.iItem, (jint)lpStruct->iItem); (*env)->SetIntField(env, lpObject, LVITEMFc.mask, (jint)lpStruct->mask);} |
|
(*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemHeight, (jint)lpStruct->itemHeight); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemWidth, (jint)lpStruct->itemWidth); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemID, (jint)lpStruct->itemID); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.CtlID, (jint)lpStruct->CtlID); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.CtlType, (jint)lpStruct->CtlType); | void setMEASUREITEMSTRUCTFields(JNIEnv *env, jobject lpObject, MEASUREITEMSTRUCT *lpStruct){ if (!MEASUREITEMSTRUCTFc.cached) cacheMEASUREITEMSTRUCTFields(env, lpObject); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemData, (jint)lpStruct->itemData); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemHeight, (jint)lpStruct->itemHeight); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemWidth, (jint)lpStruct->itemWidth); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.itemID, (jint)lpStruct->itemID); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.CtlID, (jint)lpStruct->CtlID); (*env)->SetIntField(env, lpObject, MEASUREITEMSTRUCTFc.CtlType, (jint)lpStruct->CtlType);} |
|
(*env)->SetIntField(env, lpObject, MENUITEMINFOFc.cch, (jint)lpStruct->cch); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.dwTypeData, (jint)lpStruct->dwTypeData); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.dwItemData, (jint)lpStruct->dwItemData); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.hbmpUnchecked, (jint)lpStruct->hbmpUnchecked); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.hbmpChecked, (jint)lpStruct->hbmpChecked); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.hSubMenu, (jint)lpStruct->hSubMenu); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.wID, (jint)lpStruct->wID); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.fState, (jint)lpStruct->fState); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.fType, (jint)lpStruct->fType); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.fMask, (jint)lpStruct->fMask); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.cbSize, (jint)lpStruct->cbSize); | void setMENUITEMINFOFields(JNIEnv *env, jobject lpObject, MENUITEMINFO *lpStruct){ if (!MENUITEMINFOFc.cached) cacheMENUITEMINFOFields(env, lpObject);#ifndef _WIN32_WCE (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.hbmpItem, (jint)lpStruct->hbmpItem);#endif (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.cch, (jint)lpStruct->cch); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.dwTypeData, (jint)lpStruct->dwTypeData); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.dwItemData, (jint)lpStruct->dwItemData); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.hbmpUnchecked, (jint)lpStruct->hbmpUnchecked); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.hbmpChecked, (jint)lpStruct->hbmpChecked); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.hSubMenu, (jint)lpStruct->hSubMenu); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.wID, (jint)lpStruct->wID); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.fState, (jint)lpStruct->fState); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.fType, (jint)lpStruct->fType); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.fMask, (jint)lpStruct->fMask); (*env)->SetIntField(env, lpObject, MENUITEMINFOFc.cbSize, (jint)lpStruct->cbSize);} |
|
(*env)->SetIntField(env, lpObject, MONITORINFOFc.rcWork_bottom, (jint)lpStruct->rcWork.bottom); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcWork_right, (jint)lpStruct->rcWork.right); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcWork_top, (jint)lpStruct->rcWork.top); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcWork_left, (jint)lpStruct->rcWork.left); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcMonitor_bottom, (jint)lpStruct->rcMonitor.bottom); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcMonitor_right, (jint)lpStruct->rcMonitor.right); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcMonitor_top, (jint)lpStruct->rcMonitor.top); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcMonitor_left, (jint)lpStruct->rcMonitor.left); (*env)->SetIntField(env, lpObject, MONITORINFOFc.cbSize, (jint)lpStruct->cbSize); | void setMONITORINFOFields(JNIEnv *env, jobject lpObject, MONITORINFO *lpStruct){ if (!MONITORINFOFc.cached) cacheMONITORINFOFields(env, lpObject); (*env)->SetIntField(env, lpObject, MONITORINFOFc.dwFlags, (jint)lpStruct->dwFlags); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcWork_bottom, (jint)lpStruct->rcWork.bottom); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcWork_right, (jint)lpStruct->rcWork.right); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcWork_top, (jint)lpStruct->rcWork.top); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcWork_left, (jint)lpStruct->rcWork.left); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcMonitor_bottom, (jint)lpStruct->rcMonitor.bottom); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcMonitor_right, (jint)lpStruct->rcMonitor.right); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcMonitor_top, (jint)lpStruct->rcMonitor.top); (*env)->SetIntField(env, lpObject, MONITORINFOFc.rcMonitor_left, (jint)lpStruct->rcMonitor.left); (*env)->SetIntField(env, lpObject, MONITORINFOFc.cbSize, (jint)lpStruct->cbSize);} |
|
(*env)->SetIntField(env, lpObject, NMLVCUSTOMDRAWFc.clrTextBk, (jint)lpStruct->clrTextBk); (*env)->SetIntField(env, lpObject, NMLVCUSTOMDRAWFc.clrText, (jint)lpStruct->clrText); | void setNMLVCUSTOMDRAWFields(JNIEnv *env, jobject lpObject, NMLVCUSTOMDRAW *lpStruct){ if (!NMLVCUSTOMDRAWFc.cached) cacheNMLVCUSTOMDRAWFields(env, lpObject); setNMCUSTOMDRAWFields(env, lpObject, (NMCUSTOMDRAW *)lpStruct); (*env)->SetIntField(env, lpObject, NMLVCUSTOMDRAWFc.iSubItem, (jint)lpStruct->iSubItem); (*env)->SetIntField(env, lpObject, NMLVCUSTOMDRAWFc.clrTextBk, (jint)lpStruct->clrTextBk); (*env)->SetIntField(env, lpObject, NMLVCUSTOMDRAWFc.clrText, (jint)lpStruct->clrText);} |
|
lpStruct->right = (*env)->GetIntField(env, lpObject, RECTFc.right); lpStruct->top = (*env)->GetIntField(env, lpObject, RECTFc.top); lpStruct->left = (*env)->GetIntField(env, lpObject, RECTFc.left); | RECT *getRECTFields(JNIEnv *env, jobject lpObject, RECT *lpStruct){ if (!RECTFc.cached) cacheRECTFields(env, lpObject); lpStruct->bottom = (*env)->GetIntField(env, lpObject, RECTFc.bottom); lpStruct->right = (*env)->GetIntField(env, lpObject, RECTFc.right); lpStruct->top = (*env)->GetIntField(env, lpObject, RECTFc.top); lpStruct->left = (*env)->GetIntField(env, lpObject, RECTFc.left); return lpStruct;} |
|
if (arg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0); if (arg6) (*env)->ReleaseShortArrayElements(env, arg6, lparg6, 0); | JNIEXPORT jint JNICALL OS_NATIVE(GetEventParameter__III_3II_3I_3S) (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3, jint arg4, jintArray arg5, jshortArray arg6){ jint *lparg3=NULL; jint *lparg5=NULL; jshort *lparg6=NULL; jint rc; NATIVE_ENTER(env, that, "GetEventParameter__III_3II_3I_3S\n") if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL); if (arg5) lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL); if (arg6) lparg6 = (*env)->GetShortArrayElements(env, arg6, NULL); rc = (jint)GetEventParameter((EventRef)arg0, (EventParamName)arg1, (EventParamType)arg2, (EventParamType *)lparg3, (UInt32)arg4, (UInt32 *)lparg5, (void *)lparg6); if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); if (arg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0); if (arg6) (*env)->ReleaseShortArrayElements(env, arg6, lparg6, 0); NATIVE_EXIT(env, that, "GetEventParameter__III_3II_3I_3S\n") return rc;} |
|
debug( "kio_http : ###############SEG FAULT#############" ); | write(2, "kio_http : ###############SEG FAULT#############\n", 51); | void sigsegv_handler(int signo){ debug( "kio_http : ###############SEG FAULT#############" ); exit(1);} |
(*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.bottom, (jint)lpStruct->rc.bottom); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.right, (jint)lpStruct->rc.right); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.top, (jint)lpStruct->rc.top); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.left, (jint)lpStruct->rc.left); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.lParam, (jint)lpStruct->lParam); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.wID, (jint)lpStruct->wID); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.uBand, (jint)lpStruct->uBand); | void setNMREBARCHEVRONFields(JNIEnv *env, jobject lpObject, NMREBARCHEVRON *lpStruct){ if (!NMREBARCHEVRONFc.cached) cacheNMREBARCHEVRONFields(env, lpObject); setNMHDRFields(env, lpObject, (NMHDR *)lpStruct); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.lParamNM, (jint)lpStruct->lParamNM); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.bottom, (jint)lpStruct->rc.bottom); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.right, (jint)lpStruct->rc.right); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.top, (jint)lpStruct->rc.top); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.left, (jint)lpStruct->rc.left); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.lParam, (jint)lpStruct->lParam); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.wID, (jint)lpStruct->wID); (*env)->SetIntField(env, lpObject, NMREBARCHEVRONFc.uBand, (jint)lpStruct->uBand);} |
|
} else if (IS_XSLT_NAME(inst, "transform")) { return; | xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) { if (inst->_private != NULL) return; if (IS_XSLT_ELEM(inst)) { xsltStylePreCompPtr cur; if (IS_XSLT_NAME(inst, "apply-templates")) { xsltApplyTemplatesComp(style, inst); } else if (IS_XSLT_NAME(inst, "with-param")) { xsltWithParamComp(style, inst); } else if (IS_XSLT_NAME(inst, "value-of")) { xsltValueOfComp(style, inst); } else if (IS_XSLT_NAME(inst, "copy")) { xsltCopyComp(style, inst); } else if (IS_XSLT_NAME(inst, "copy-of")) { xsltCopyOfComp(style, inst); } else if (IS_XSLT_NAME(inst, "if")) { xsltIfComp(style, inst); } else if (IS_XSLT_NAME(inst, "when")) { xsltWhenComp(style, inst); } else if (IS_XSLT_NAME(inst, "choose")) { xsltChooseComp(style, inst); } else if (IS_XSLT_NAME(inst, "for-each")) { xsltForEachComp(style, inst); } else if (IS_XSLT_NAME(inst, "apply-imports")) { xsltApplyImportsComp(style, inst); } else if (IS_XSLT_NAME(inst, "attribute")) { xsltAttributeComp(style, inst); } else if (IS_XSLT_NAME(inst, "element")) { xsltElementComp(style, inst); } else if (IS_XSLT_NAME(inst, "text")) { xsltTextComp(style, inst); } else if (IS_XSLT_NAME(inst, "sort")) { xsltSortComp(style, inst); } else if (IS_XSLT_NAME(inst, "comment")) { xsltCommentComp(style, inst); } else if (IS_XSLT_NAME(inst, "number")) { xsltNumberComp(style, inst); } else if (IS_XSLT_NAME(inst, "processing-instruction")) { xsltProcessingInstructionComp(style, inst); } else if (IS_XSLT_NAME(inst, "call-template")) { xsltCallTemplateComp(style, inst); } else if (IS_XSLT_NAME(inst, "param")) { xsltParamComp(style, inst); } else if (IS_XSLT_NAME(inst, "variable")) { xsltVariableComp(style, inst); } else if (IS_XSLT_NAME(inst, "otherwise")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "template")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "output")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "preserve-space")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "strip-space")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "stylesheet")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "key")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "message")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "attribute-set")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "namespace-alias")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "include")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "import")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "decimal-format")) { /* no computation needed */ return; } else if (IS_XSLT_NAME(inst, "document")) { xsltDocumentComp(style, inst); } else { xsltGenericError(xsltGenericDebugContext, "xsltStylePreCompute: unknown xslt:%s\n", inst->name); style->warnings++; } /* * Add the namespace lookup here, this code can be shared by * all precomputations. */ cur = inst->_private; if (cur != NULL) { int i = 0; cur->nsList = xmlGetNsList(inst->doc, inst); if (cur->nsList != NULL) { while (cur->nsList[i] != NULL) i++; } cur->nsNr = i; } } else { if (IS_XSLT_NAME(inst, "document")) { xsltDocumentComp(style, inst); } else { /* * Mark the element for later recognition. */ if (inst->_private == NULL) inst->_private = (void *) xsltExtMarker; } }} |
|
DEBUG_CHECK_NULL(env, arg1) | JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_win32_OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2){ DECL_GLOB(pGlob) NMTOOLBAR _arg0, *lparg0=NULL; DEBUG_CALL("MoveMemory\n") if (arg0) lparg0 = &_arg0; MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2); if (arg0) setNMTOOLBARFields(env, arg0, lparg0, &PGLOB(NMTOOLBARFc));} |
|
DEBUG_CHECK_NULL(env, arg1) | JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_win32_OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2){ DECL_GLOB(pGlob) MSG _arg0, *lparg0=NULL; DEBUG_CALL("MoveMemory\n") if (arg0) lparg0 = &_arg0; MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2); if (arg0) setMSGFields(env, arg0, lparg0, &PGLOB(MSGFc));} |
|
DEBUG_CHECK_NULL(env, arg1) | JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_win32_OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2){ DECL_GLOB(pGlob) HELPINFO _arg0, *lparg0=NULL; DEBUG_CALL("MoveMemory\n") if (arg0) lparg0 = &_arg0; MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2); if (arg0) setHELPINFOFields(env, arg0, lparg0, &PGLOB(HELPINFOFc));} |
|
DEBUG_CHECK_NULL(env, arg0) | JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_win32_OS_MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2){ DECL_GLOB(pGlob) GRADIENT_RECT _arg1, *lparg1=NULL; DEBUG_CALL("MoveMemory\n") if (arg1) lparg1 = getGRADIENT_RECTFields(env, arg1, &_arg1, &PGLOB(GRADIENT_RECTFc)); MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);} |
|
qDebug("kcontrol is already running!\n"); | kdDebug() << "kcontrol is already running!\n" << endl; | int main(int argc, char *argv[]){ KAboutData aboutData( "kcontrol", I18N_NOOP("KDE Control Center"), "v2.0pre", "The KDE Control Center", KAboutData::License_GPL, "(c) 1998-2000, The KDE Control Center Developers"); aboutData.addAuthor("Matthias Hoelzer-Kluepfel",0, "[email protected]"); aboutData.addAuthor("Matthias Elter",0, "[email protected]"); KCmdLineArgs::init( argc, argv, &aboutData ); KApplication::addCmdLineOptions(); KCGlobal::init(); if (!KControlApp::start()) { qDebug("kcontrol is already running!\n"); return (0); } KControlApp app; // show the whole stuff app.mainWidget()->show(); return app.exec();} |
subject = rfcDecoder::decodeRFC2047String(_str).stripWhiteSpace().simplifyWhiteSpace(); | _subject = rfcDecoder::decodeRFC2047String(_str).stripWhiteSpace().simplifyWhiteSpace(); | void setSubjectEncoded(const QCString &_str) { subject = rfcDecoder::decodeRFC2047String(_str).stripWhiteSpace().simplifyWhiteSpace(); }; |
int unsafe = is_self_atari(libs[k], color); if (!unsafe | unsafe[k] = is_self_atari(libs[k], color); if (!unsafe[k] | break_chain2_moves(int str, int moves[MAX_MOVES], int scores[MAX_MOVES], int *num_moves, int require_safe){ int color = board[str]; int other = OTHER_COLOR(color); int r; int k; int apos; int adj; int adjs[MAXCHAIN]; int libs[2]; adj = chainlinks2(str, adjs, 2); for (r = 0; r < adj; r++) { apos = adjs[r]; findlib(apos, 2, libs); for (k = 0; k < 2; k++) { int unsafe = is_self_atari(libs[k], color); if (!unsafe || (!require_safe && approxlib(libs[k], other, 5, NULL) < 5)) ADD_CANDIDATE_MOVE(libs[k], 0, moves, scores, *num_moves); } if (stackp <= backfill2_depth) break_chain_moves(apos, moves, scores, num_moves); }} |
if (stackp <= backfill2_depth) | if (stackp <= backfill2_depth) { | break_chain2_moves(int str, int moves[MAX_MOVES], int scores[MAX_MOVES], int *num_moves, int require_safe){ int color = board[str]; int other = OTHER_COLOR(color); int r; int k; int apos; int adj; int adjs[MAXCHAIN]; int libs[2]; adj = chainlinks2(str, adjs, 2); for (r = 0; r < adj; r++) { apos = adjs[r]; findlib(apos, 2, libs); for (k = 0; k < 2; k++) { int unsafe = is_self_atari(libs[k], color); if (!unsafe || (!require_safe && approxlib(libs[k], other, 5, NULL) < 5)) ADD_CANDIDATE_MOVE(libs[k], 0, moves, scores, *num_moves); } if (stackp <= backfill2_depth) break_chain_moves(apos, moves, scores, num_moves); }} |
if (unsafe[0] && unsafe[1]) { int libs2[3]; for (k = 0; k < 2; k++) { if (approxlib(libs[k], other, 3, libs2) == 2) { int s; for (s = 0; s < 2; s++) if (!is_self_atari(libs2[s], color)) ADD_CANDIDATE_MOVE(libs2[s], 0, moves, scores, *num_moves); } } } } | break_chain2_moves(int str, int moves[MAX_MOVES], int scores[MAX_MOVES], int *num_moves, int require_safe){ int color = board[str]; int other = OTHER_COLOR(color); int r; int k; int apos; int adj; int adjs[MAXCHAIN]; int libs[2]; adj = chainlinks2(str, adjs, 2); for (r = 0; r < adj; r++) { apos = adjs[r]; findlib(apos, 2, libs); for (k = 0; k < 2; k++) { int unsafe = is_self_atari(libs[k], color); if (!unsafe || (!require_safe && approxlib(libs[k], other, 5, NULL) < 5)) ADD_CANDIDATE_MOVE(libs[k], 0, moves, scores, *num_moves); } if (stackp <= backfill2_depth) break_chain_moves(apos, moves, scores, num_moves); }} |
|
kdError() << i18n( "Syntax Error:\nkfmexec command [URLs ....]" ) << endl; | kdError() << i18n( "Syntax Error:\nkfmexec command [URLs ...]" ) << endl; | int main( int argc, char **argv ){ KAboutData aboutData( "kfmexec", I18N_NOOP("KFMExec"), version, description, KAboutData::License_GPL, "(c) 1998-2000, The KFM/Konqueror Developers"); aboutData.addAuthor("David Faure",0, "[email protected]"); aboutData.addAuthor("Stephen Kulow",0, "[email protected]"); aboutData.addAuthor("Bernhard Rosenkraenzer",0, "[email protected]"); aboutData.addAuthor("Waldo Bastian",0, "[email protected]"); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; if ( argc < 2 ) { kdError() << i18n( "Syntax Error:\nkfmexec command [URLs ....]" ) << endl; exit(1); } KFMExec exec; kdDebug() << "Constructor returned..." << endl; return app.exec();} |
if (dragon[m][n].status == DEAD) | if (dragon[m][n].matcher_status == DEAD) | atari_atari_confirm_safety(int color, int ti, int tj, int *i, int *j, int minsize){ int m, n; int fi, fj; int aa_val; int other = OTHER_COLOR(color); /* If aa_depth is too small, we can't see any combination attacks, * so in this respect the move is safe enough. */ if (aa_depth < 2) return 1; /* Collect worm statuses of opponent's worms. We need to * know this because we only want to report unexpected * results. For example, we do not want to report success * if we find we can kill a worm which is already dead. * The worm status of empty points is set to UNKNOWN to signal * that stones added along the way need special attention. */ memset(forbidden, 0, sizeof(forbidden)); for (m = 0; m < board_size; m++) for (n = 0; n < board_size; n++) { if (p[m][n] == color) { if (dragon[m][n].status == DEAD) aa_status[m][n] = DEAD; else if (worm[m][n].attack_code != 0) { if (worm[m][n].defend_code != 0) aa_status[m][n] = CRITICAL; else aa_status[m][n] = DEAD; } else aa_status[m][n] = ALIVE; } else aa_status[m][n] = UNKNOWN; } /* reclassify a worm with 2 liberties as INSUBSTANTIAL if capturing * it does not result in a live group. */ for (m = 0; m < board_size; m++) for (n = 0; n < board_size; n++) if (p[m][n] == color && worm[m][n].origini == m && worm[m][n].originj == n && worm[m][n].liberties == 2 && aa_status[m][n] != DEAD && !owl_substantial(m, n)) { int ti, tj; for (ti = 0; ti < board_size; ti++) for (tj = 0; tj < board_size; tj++) if (is_worm_origin(ti, tj, m, n)) aa_status[ti][tj] = INSUBSTANTIAL; } if (debug & DEBUG_ATARI_ATARI) { gprintf("atari_atari for %C\n", other); gprintf("aa_status: (ALIVE worms not listed)\n"); for (m = 0; m < board_size; m++) for (n = 0; n < board_size; n++) { if (p[m][n] == color && is_worm_origin(m, n, m, n)) { const char *status = "UNKNOWN (shouldn't happen)"; if (aa_status[m][n] == DEAD) status = "DEAD"; else if (aa_status[m][n] == CRITICAL) status = "CRITICAL"; else if (aa_status[m][n] == INSUBSTANTIAL) status = "INSUBSTANTIAL"; if (aa_status[m][n] != ALIVE) gprintf("%M: %s\n", m, n, status); } } } /* Accept illegal ko capture here. */ if (!tryko(ti, tj, color, NULL, EMPTY, -1, -1)) /* Really shouldn't happen. */ abortgo(__FILE__, __LINE__, "trymove", ti, tj); aa_val = do_atari_atari(other, &fi, &fj, i, j, -1, -1, 0, minsize); /* No sufficiently large combination attack, so the move is safe from * this danger. */ if (aa_val == 0) { popgo(); return 1; } while (aa_val > 0) { /* Try dropping moves from the combination and see if it still * works. What we really want is to get the proper defense move * into (*i, *j). */ forbidden[fi][fj] = 1; aa_val = do_atari_atari(other, &fi, &fj, i, j, -1, -1, 0, aa_val); } popgo(); return 0;} |
const char *rep=d.answer(); char *ret=new char[strlen(rep)+1]; strcpy(ret,rep); return ret; | return qstrdup(d.answer()); | char *getPasswordCallBack(const char * c){ if (!c) return 0; QString s; bool echo=false; if (!strcmp(c,"User")) { s+=i18n("User"); echo=true; } else if (!strcmp(c,"Password")) s+=i18n("Password"); else if (!strncmp(c,"Password for service ",21)) { s+=i18n("Password for service "); s+=(c+21); } CallbackDialog d(s, echo); d.show(); const char *rep=d.answer(); char *ret=new char[strlen(rep)+1]; strcpy(ret,rep); return ret;} |
SCROLLINFOFc.nPos = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nPos", "I"); SCROLLINFOFc.nPage = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nPage", "I"); SCROLLINFOFc.nMax = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nMax", "I"); SCROLLINFOFc.nMin = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nMin", "I"); SCROLLINFOFc.fMask = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "fMask", "I"); SCROLLINFOFc.cbSize = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "cbSize", "I"); | void cacheSCROLLINFOFields(JNIEnv *env, jobject lpObject){ if (SCROLLINFOFc.cached) return; SCROLLINFOFc.clazz = (*env)->GetObjectClass(env, lpObject); SCROLLINFOFc.nTrackPos = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nTrackPos", "I"); SCROLLINFOFc.nPos = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nPos", "I"); SCROLLINFOFc.nPage = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nPage", "I"); SCROLLINFOFc.nMax = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nMax", "I"); SCROLLINFOFc.nMin = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "nMin", "I"); SCROLLINFOFc.fMask = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "fMask", "I"); SCROLLINFOFc.cbSize = (*env)->GetFieldID(env, SCROLLINFOFc.clazz, "cbSize", "I"); SCROLLINFOFc.cached = 1;} |
|
SHELLEXECUTEINFOFc.hIcon = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hIcon", "I"); SHELLEXECUTEINFOFc.dwHotKey = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "dwHotKey", "I"); SHELLEXECUTEINFOFc.hkeyClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hkeyClass", "I"); SHELLEXECUTEINFOFc.lpClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpClass", "I"); SHELLEXECUTEINFOFc.lpIDList = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpIDList", "I"); SHELLEXECUTEINFOFc.hInstApp = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hInstApp", "I"); SHELLEXECUTEINFOFc.nShow = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "nShow", "I"); SHELLEXECUTEINFOFc.lpDirectory = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpDirectory", "I"); SHELLEXECUTEINFOFc.lpParameters = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpParameters", "I"); SHELLEXECUTEINFOFc.lpFile = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpFile", "I"); SHELLEXECUTEINFOFc.lpVerb = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpVerb", "I"); SHELLEXECUTEINFOFc.hwnd = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hwnd", "I"); SHELLEXECUTEINFOFc.fMask = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "fMask", "I"); SHELLEXECUTEINFOFc.cbSize = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "cbSize", "I"); | void cacheSHELLEXECUTEINFOFields(JNIEnv *env, jobject lpObject){ if (SHELLEXECUTEINFOFc.cached) return; SHELLEXECUTEINFOFc.clazz = (*env)->GetObjectClass(env, lpObject); SHELLEXECUTEINFOFc.hProcess = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hProcess", "I"); SHELLEXECUTEINFOFc.hIcon = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hIcon", "I"); SHELLEXECUTEINFOFc.dwHotKey = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "dwHotKey", "I"); SHELLEXECUTEINFOFc.hkeyClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hkeyClass", "I"); SHELLEXECUTEINFOFc.lpClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpClass", "I"); SHELLEXECUTEINFOFc.lpIDList = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpIDList", "I"); SHELLEXECUTEINFOFc.hInstApp = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hInstApp", "I"); SHELLEXECUTEINFOFc.nShow = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "nShow", "I"); SHELLEXECUTEINFOFc.lpDirectory = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpDirectory", "I"); SHELLEXECUTEINFOFc.lpParameters = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpParameters", "I"); SHELLEXECUTEINFOFc.lpFile = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpFile", "I"); SHELLEXECUTEINFOFc.lpVerb = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "lpVerb", "I"); SHELLEXECUTEINFOFc.hwnd = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "hwnd", "I"); SHELLEXECUTEINFOFc.fMask = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "fMask", "I"); SHELLEXECUTEINFOFc.cbSize = (*env)->GetFieldID(env, SHELLEXECUTEINFOFc.clazz, "cbSize", "I"); SHELLEXECUTEINFOFc.cached = 1;} |
|
khcTOC *TOCItem::toc() const | TOC *TOCItem::toc() const | khcTOC *TOCItem::toc() const{ return static_cast<khcTOC *>( listView() );} |
return static_cast<khcTOC *>( listView() ); | return static_cast<TOC *>( listView() ); | khcTOC *TOCItem::toc() const{ return static_cast<khcTOC *>( listView() );} |
if (!_dbufs.empty()) return time(NULL) - _dbufs.begin()->second->dirty_since; | time_t age; if (_dbufs.empty()) { age = 0; } else { age = time(NULL) - _dbufs.begin()->second->dirty_since; } dout(10) << "former age: " << former_age << " age: " << age << endl; assert((!(former_age > 30)) || (age > 0)); former_age = age; return age; | time_t get_age() { if (!_dbufs.empty()) return time(NULL) - _dbufs.begin()->second->dirty_since; } |
replacement_mapi[i][j] = -1; replacement_mapj[i][j] = -1; | clear_move_reasons(void){ int i; int j; int k; next_reason = 0; next_worm = 0; next_dragon = 0; next_connection = 0; next_worm_pair = 0; next_eye = 0; next_lunch = 0; for (i = 0; i < board_size; i++) for (j = 0; j < board_size; j++) { move[i][j].value = 0.0; move[i][j].additional_ko_value = 0.0; move[i][j].territorial_value = 0.0; move[i][j].strategical_value = 0.0; move[i][j].influence_value = 0.0; move[i][j].maxpos_shape = 0.0; move[i][j].numpos_shape = 0; move[i][j].maxneg_shape = 0.0; move[i][j].numneg_shape = 0; move[i][j].followup_value = 0.0; move[i][j].reverse_followup_value = 0.0; move[i][j].secondary_value = 0.0; move[i][j].min_value = 0.0; move[i][j].max_value = HUGE_MOVE_VALUE; move[i][j].min_territory = 0.0; move[i][j].max_territory = HUGE_MOVE_VALUE; for (k = 0; k < MAX_REASONS; k++) move[i][j].reason[k] = -1; move[i][j].move_safety = 0; move[i][j].worthwhile_threat = 0; /* The reason we assign a random number to each move immediately * is to avoid dependence on which moves are evaluated when it * comes to choosing between multiple moves of the same value. * In this way we can get consistent results for use in the * regression tests. */ move[i][j].random_number = gg_drand(); }} |
|
extern "C" QgsGrassProvider * classFactory(const char *uri) | extern "C" QgsGrassProvider * classFactory(const QString *uri) | extern "C" QgsGrassProvider * classFactory(const char *uri){ return new QgsGrassProvider(uri);} |
return new QgsGrassProvider(uri); | return new QgsGrassProvider(*uri); | extern "C" QgsGrassProvider * classFactory(const char *uri){ return new QgsGrassProvider(uri);} |
virtual void encode_payload(crope& s) { } | virtual void encode_payload(crope& s) { s.append((char*)&pcid, sizeof(pcid)); } | virtual void encode_payload(crope& s) { } |
virtual void decode_payload(crope& s, int& off) { } | virtual void decode_payload(crope& s, int& off) { s.copy(off, sizeof(pcid), (char*)&pcid); off += sizeof(pcid); } | virtual void decode_payload(crope& s, int& off) { } |
KCmdLineArgs::init(argc, argv, "khelpcenter", description, HELPCENTER_VERSION ); | KAboutData aboutData( "khelpcenter", I18N_NOOP("KDE HelpCenter"), HELPCENTER_VERSION, description, KAboutData::GPL, "(c) 1999-2000, Matthias Elter"); aboutData.addAuthor("Matthias Elter",0, "[email protected]"); KCmdLineArgs::init( argc, argv, &aboutData ); | int main(int argc, char *argv[]){ KCmdLineArgs::init(argc, argv, "khelpcenter", description, HELPCENTER_VERSION ); KApplication app; app.dcopClient()->attach(); // we want to get applicationRegistered app.dcopClient()->setNotifications( true ); Listener listener; QObject::connect( app.dcopClient(), SIGNAL( applicationRegistered( const QCString& ) ), &listener, SLOT( slotAppRegistered( const QCString & ) ) ); system( "konqueror --silent &" ); app.exec();} |
KApplication app( false, false ); | KApplication app( false ); | int KDE_EXPORT kdemain( int argc, char **argv ) { // KApplication is necessary to use other ioslaves putenv(strdup("SESSION_MANAGER=")); KCmdLineArgs::init(argc, argv, "kio_home", 0, 0, 0); KCmdLineArgs::addCmdLineOptions( options ); KApplication app( false, false ); // We want to be anonymous even if we use DCOP app.dcopClient()->attach(); DCOPRef ref( "kded", "kded" ); ref.call( "loadModule", "homedirnotify" ); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); HomeProtocol slave( args->arg(0), args->arg(1), args->arg(2) ); slave.dispatchLoop(); return 0; } |
STRDEF *cursor = defdef; while (cursor) { defdef = cursor->next; delete [] cursor->st; delete cursor; cursor = defdef; } defdef = 0; | void scan_man_page(const char *man_page){ if (!man_page) return;#ifndef SIMPLE_MAN2HTML kdDebug(7107) << "Start scanning man page" << endl;#endif // ## Do more init // Unlike man2html, we actually call this several times, hence the need to // properly cleanup all those static vars s_ifelseval.clear(); s_stringDefinitionMap.clear(); section = 0; output_possible = false; int strLength = qstrlen(man_page); char *buf = new char[strLength + 2]; qstrcpy(buf+1, man_page); buf[0] = '\n';#ifndef SIMPLE_MAN2HTML kdDebug(7107) << "Parse man page" << endl;#endif scan_troff(buf+1,0,NULL);#ifndef SIMPLE_MAN2HTML kdDebug(7107) << "Man page parsed!" << endl;#endif while (itemdepth || dl_set[itemdepth]) { out_html("</DL>\n"); if (dl_set[itemdepth]) dl_set[itemdepth]=0; else if (itemdepth > 0) itemdepth--; } out_html(change_to_font(0)); out_html(change_to_size(0)); if (!fillout) { fillout=1; out_html("</PRE>"); } out_html(NEWLINE); if (section) { output_real("<div style=\"margin-left: 2cm\">\n"); section = 0; } if (output_possible) { output_real("</div>\n"); output_real("<div class=\"bannerBottom\" style=\"background-image: url("); output_real(cssPath); output_real("/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100pt; bottom:0pt;\">\n"); output_real("<div class=\"bannerBottomLeft\">\n"); output_real("<img src=\""); output_real(cssPath); output_real("/bottom-left.png\" style=\"margin: 0pt;\" alt=\"Bottom left of the banner\">\n"); output_real("</div>\n"); output_real("<div class=\"bannerBottomRight\">\n"); output_real("<img src=\""); output_real(cssPath); output_real("/bottom-right.png\" style=\"margin: 0pt\" alt=\"Bottom right of the banner\">\n"); output_real("</div>\n"); output_real("</div>\n"); output_real("</BODY>\n</HTML>\n"); } delete [] buf; // Release memory s_stringDefinitionMap.clear(); // reinit static variables for reuse STRDEF *cursor = defdef; while (cursor) { defdef = cursor->next; delete [] cursor->st; delete cursor; cursor = defdef; } defdef = 0; INTDEF *cursor2 = intdef; while (cursor2) { intdef = cursor2->next; delete cursor2; cursor2 = intdef; } intdef = 0; delete [] buffer; buffer = 0; escapesym='\\'; nobreaksym='\''; controlsym='.'; fieldsym=0; padsym=0; buffpos=0; buffmax=0; scaninbuff=false; itemdepth=0; for (int i = 0; i < 20; i++) dl_set[i] = 0; still_dd=false; for (int i = 0; i < 12; i++) tabstops[i] = (i+1)*8; maxtstop=12; curpos=0; argument = 0; mandoc_name_count = 0;} |
|
ypbindproc_olddomain_1_svc (olddomainname *argp, ypbind_resp *result, | ypbindproc_olddomain_1_svc (domainname *argp, ypbind_resp *result, | ypbindproc_olddomain_1_svc (olddomainname *argp, ypbind_resp *result, struct svc_req *rqstp){ if (debug_flag) log_msg (LOG_DEBUG, "ypbindproc_olddomain_1_svc (%s)", argp); return ypbindproc_domain (argp, result, rqstp);} |
log_msg (LOG_DEBUG, "ypbindproc_olddomain_1_svc (%s)", argp); | log_msg (LOG_DEBUG, "ypbindproc_olddomain_1_svc (%s)", *argp); | ypbindproc_olddomain_1_svc (olddomainname *argp, ypbind_resp *result, struct svc_req *rqstp){ if (debug_flag) log_msg (LOG_DEBUG, "ypbindproc_olddomain_1_svc (%s)", argp); return ypbindproc_domain (argp, result, rqstp);} |
return ypbindproc_domain (argp, result, rqstp); | return ypbindproc_domain (*argp, result, rqstp); | ypbindproc_olddomain_1_svc (olddomainname *argp, ypbind_resp *result, struct svc_req *rqstp){ if (debug_flag) log_msg (LOG_DEBUG, "ypbindproc_olddomain_1_svc (%s)", argp); return ypbindproc_domain (argp, result, rqstp);} |
if (!CallbacksEnabled) { | if (!callbacksEnabled) { | int callback(int index, ...){ if (!CallbacksEnabled) { return 0; } else { DECL_GLOB(pGlob) jobject callback = PGLOB(dllCallbackInfo)[index].callin; JNIEnv *env = PGLOB(dllCallbackInfo)[index].env; jmethodID mid = PGLOB(dllCallbackInfo)[index].methodID; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", PGLOB(counter)++);#endif /* An exception has already occurred. Allow the stack to unwind so that the exception will be thrown in Java */ if ((*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback,PGLOB(objectID)); isStatic = ((*env)->GetBooleanField(env,callback,PGLOB(isStaticID))) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback,PGLOB(isArrayBasedID))) != 0; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env,callback,PGLOB(argCountID)); jintArray javaArray = (*env)->NewIntArray(env,argCount); jint *elements = (*env)->GetIntArrayElements(env,javaArray,NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, jint); } (*env)->ReleaseIntArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticIntMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallIntMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticIntMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallIntMethodV(env, javaObject, mid, vl); } } va_end(vl); /* This call may be called many times before we return to Java. We have to explicitly delete local references to avoid GP's in the JDK and IBM Hursley VM. */ (*env)->DeleteLocalRef(env,javaObject);#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback exiting %d\n", --PGLOB(counter));#endif return result; }} |
DECL_GLOB(pGlob) jobject callback = PGLOB(dllCallbackInfo)[index].callin; JNIEnv *env = PGLOB(dllCallbackInfo)[index].env; jmethodID mid = PGLOB(dllCallbackInfo)[index].methodID; | JNIEnv *env; jobject callback = dllCallbackInfo[index].callin; jmethodID mid = dllCallbackInfo[index].methodID; | int callback(int index, ...){ if (!CallbacksEnabled) { return 0; } else { DECL_GLOB(pGlob) jobject callback = PGLOB(dllCallbackInfo)[index].callin; JNIEnv *env = PGLOB(dllCallbackInfo)[index].env; jmethodID mid = PGLOB(dllCallbackInfo)[index].methodID; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", PGLOB(counter)++);#endif /* An exception has already occurred. Allow the stack to unwind so that the exception will be thrown in Java */ if ((*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback,PGLOB(objectID)); isStatic = ((*env)->GetBooleanField(env,callback,PGLOB(isStaticID))) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback,PGLOB(isArrayBasedID))) != 0; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env,callback,PGLOB(argCountID)); jintArray javaArray = (*env)->NewIntArray(env,argCount); jint *elements = (*env)->GetIntArrayElements(env,javaArray,NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, jint); } (*env)->ReleaseIntArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticIntMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallIntMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticIntMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallIntMethodV(env, javaObject, mid, vl); } } va_end(vl); /* This call may be called many times before we return to Java. We have to explicitly delete local references to avoid GP's in the JDK and IBM Hursley VM. */ (*env)->DeleteLocalRef(env,javaObject);#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback exiting %d\n", --PGLOB(counter));#endif return result; }} |
fprintf(stderr, "* callback starting %d\n", PGLOB(counter)++); | fprintf(stderr, "* callback starting %d\n", counter++); | int callback(int index, ...){ if (!CallbacksEnabled) { return 0; } else { DECL_GLOB(pGlob) jobject callback = PGLOB(dllCallbackInfo)[index].callin; JNIEnv *env = PGLOB(dllCallbackInfo)[index].env; jmethodID mid = PGLOB(dllCallbackInfo)[index].methodID; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", PGLOB(counter)++);#endif /* An exception has already occurred. Allow the stack to unwind so that the exception will be thrown in Java */ if ((*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback,PGLOB(objectID)); isStatic = ((*env)->GetBooleanField(env,callback,PGLOB(isStaticID))) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback,PGLOB(isArrayBasedID))) != 0; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env,callback,PGLOB(argCountID)); jintArray javaArray = (*env)->NewIntArray(env,argCount); jint *elements = (*env)->GetIntArrayElements(env,javaArray,NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, jint); } (*env)->ReleaseIntArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticIntMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallIntMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticIntMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallIntMethodV(env, javaObject, mid, vl); } } va_end(vl); /* This call may be called many times before we return to Java. We have to explicitly delete local references to avoid GP's in the JDK and IBM Hursley VM. */ (*env)->DeleteLocalRef(env,javaObject);#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback exiting %d\n", --PGLOB(counter));#endif return result; }} |
javaObject = (*env)->GetObjectField(env,callback,PGLOB(objectID)); isStatic = ((*env)->GetBooleanField(env,callback,PGLOB(isStaticID))) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback,PGLOB(isArrayBasedID))) != 0; | javaObject = (*env)->GetObjectField(env,callback,objectID); isStatic = ((*env)->GetBooleanField(env,callback,isStaticID)) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback,isArrayBasedID)) != 0; | int callback(int index, ...){ if (!CallbacksEnabled) { return 0; } else { DECL_GLOB(pGlob) jobject callback = PGLOB(dllCallbackInfo)[index].callin; JNIEnv *env = PGLOB(dllCallbackInfo)[index].env; jmethodID mid = PGLOB(dllCallbackInfo)[index].methodID; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", PGLOB(counter)++);#endif /* An exception has already occurred. Allow the stack to unwind so that the exception will be thrown in Java */ if ((*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback,PGLOB(objectID)); isStatic = ((*env)->GetBooleanField(env,callback,PGLOB(isStaticID))) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback,PGLOB(isArrayBasedID))) != 0; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env,callback,PGLOB(argCountID)); jintArray javaArray = (*env)->NewIntArray(env,argCount); jint *elements = (*env)->GetIntArrayElements(env,javaArray,NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, jint); } (*env)->ReleaseIntArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticIntMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallIntMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticIntMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallIntMethodV(env, javaObject, mid, vl); } } va_end(vl); /* This call may be called many times before we return to Java. We have to explicitly delete local references to avoid GP's in the JDK and IBM Hursley VM. */ (*env)->DeleteLocalRef(env,javaObject);#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback exiting %d\n", --PGLOB(counter));#endif return result; }} |
jint argCount = (*env)->GetIntField(env,callback,PGLOB(argCountID)); | jint argCount = (*env)->GetIntField(env,callback,argCountID); | int callback(int index, ...){ if (!CallbacksEnabled) { return 0; } else { DECL_GLOB(pGlob) jobject callback = PGLOB(dllCallbackInfo)[index].callin; JNIEnv *env = PGLOB(dllCallbackInfo)[index].env; jmethodID mid = PGLOB(dllCallbackInfo)[index].methodID; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", PGLOB(counter)++);#endif /* An exception has already occurred. Allow the stack to unwind so that the exception will be thrown in Java */ if ((*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback,PGLOB(objectID)); isStatic = ((*env)->GetBooleanField(env,callback,PGLOB(isStaticID))) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback,PGLOB(isArrayBasedID))) != 0; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env,callback,PGLOB(argCountID)); jintArray javaArray = (*env)->NewIntArray(env,argCount); jint *elements = (*env)->GetIntArrayElements(env,javaArray,NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, jint); } (*env)->ReleaseIntArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticIntMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallIntMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticIntMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallIntMethodV(env, javaObject, mid, vl); } } va_end(vl); /* This call may be called many times before we return to Java. We have to explicitly delete local references to avoid GP's in the JDK and IBM Hursley VM. */ (*env)->DeleteLocalRef(env,javaObject);#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback exiting %d\n", --PGLOB(counter));#endif return result; }} |
fprintf(stderr, "* callback exiting %d\n", --PGLOB(counter)); | fprintf(stderr, "* callback exiting %d\n", --counter); | int callback(int index, ...){ if (!CallbacksEnabled) { return 0; } else { DECL_GLOB(pGlob) jobject callback = PGLOB(dllCallbackInfo)[index].callin; JNIEnv *env = PGLOB(dllCallbackInfo)[index].env; jmethodID mid = PGLOB(dllCallbackInfo)[index].methodID; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", PGLOB(counter)++);#endif /* An exception has already occurred. Allow the stack to unwind so that the exception will be thrown in Java */ if ((*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback,PGLOB(objectID)); isStatic = ((*env)->GetBooleanField(env,callback,PGLOB(isStaticID))) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback,PGLOB(isArrayBasedID))) != 0; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env,callback,PGLOB(argCountID)); jintArray javaArray = (*env)->NewIntArray(env,argCount); jint *elements = (*env)->GetIntArrayElements(env,javaArray,NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, jint); } (*env)->ReleaseIntArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticIntMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallIntMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticIntMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallIntMethodV(env, javaObject, mid, vl); } } va_end(vl); /* This call may be called many times before we return to Java. We have to explicitly delete local references to avoid GP's in the JDK and IBM Hursley VM. */ (*env)->DeleteLocalRef(env,javaObject);#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback exiting %d\n", --PGLOB(counter));#endif return result; }} |
return KURL::decode_string(aUrl.url()); | return KURL::decode_string(aUrl.prettyURL()); | const QString hidePass(KURL aUrl){ aUrl.setPass(QString::null); return KURL::decode_string(aUrl.url());} |
inline QgsMarkerSymbol::QgsMarkerSymbol(): QgsSymbol(), mScaleFactor(1) | inline QgsMarkerSymbol::QgsMarkerSymbol(): QgsSymbol(), mScaleFactor(1), mSvgPath("") | inline QgsMarkerSymbol::QgsMarkerSymbol(): QgsSymbol(), mScaleFactor(1){} |
KSycocaEntry * e = (*it).get(); | KSycocaEntry::Ptr e = (*it); | static void findMenuEntry(KServiceGroup::Ptr parent, const QString &name, const QString &menuId){ KServiceGroup::List list = parent->entries(true, true, false); KServiceGroup::List::ConstIterator it = list.begin(); for (; it != list.end(); ++it) { KSycocaEntry * e = (*it).get(); if (e->isType(KST_KServiceGroup)) { KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e)); findMenuEntry(g, name.isEmpty() ? g->caption() : name+"/"+g->caption(), menuId); } else if (e->isType(KST_KService)) { KService::Ptr s(static_cast<KService *>(e)); if (s->menuId() == menuId) { if (bPrintMenuId) { result(parent->relPath()); } if (bPrintMenuName) { result(name); } if (bHighlight) { DCOPRef kicker( "kicker", "kicker" ); bool result = kicker.call( "highlightMenuItem", menuId ); if (!result) error(3, i18n("Menu item '%1' could not be highlighted.").arg(menuId).toLocal8Bit()); } exit(0); } } }} |
KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e)); | KServiceGroup::Ptr g = e; | static void findMenuEntry(KServiceGroup::Ptr parent, const QString &name, const QString &menuId){ KServiceGroup::List list = parent->entries(true, true, false); KServiceGroup::List::ConstIterator it = list.begin(); for (; it != list.end(); ++it) { KSycocaEntry * e = (*it).get(); if (e->isType(KST_KServiceGroup)) { KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e)); findMenuEntry(g, name.isEmpty() ? g->caption() : name+"/"+g->caption(), menuId); } else if (e->isType(KST_KService)) { KService::Ptr s(static_cast<KService *>(e)); if (s->menuId() == menuId) { if (bPrintMenuId) { result(parent->relPath()); } if (bPrintMenuName) { result(name); } if (bHighlight) { DCOPRef kicker( "kicker", "kicker" ); bool result = kicker.call( "highlightMenuItem", menuId ); if (!result) error(3, i18n("Menu item '%1' could not be highlighted.").arg(menuId).toLocal8Bit()); } exit(0); } } }} |
KService::Ptr s(static_cast<KService *>(e)); | KService::Ptr s = e; | static void findMenuEntry(KServiceGroup::Ptr parent, const QString &name, const QString &menuId){ KServiceGroup::List list = parent->entries(true, true, false); KServiceGroup::List::ConstIterator it = list.begin(); for (; it != list.end(); ++it) { KSycocaEntry * e = (*it).get(); if (e->isType(KST_KServiceGroup)) { KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e)); findMenuEntry(g, name.isEmpty() ? g->caption() : name+"/"+g->caption(), menuId); } else if (e->isType(KST_KService)) { KService::Ptr s(static_cast<KService *>(e)); if (s->menuId() == menuId) { if (bPrintMenuId) { result(parent->relPath()); } if (bPrintMenuName) { result(name); } if (bHighlight) { DCOPRef kicker( "kicker", "kicker" ); bool result = kicker.call( "highlightMenuItem", menuId ); if (!result) error(3, i18n("Menu item '%1' could not be highlighted.").arg(menuId).toLocal8Bit()); } exit(0); } } }} |
KCmdLineArgs::init( argc, argv, "kmailservice", I18N_NOOP("mail service"), "unknown" ); | KCmdLineArgs::init( argc, argv, "kmailservice", I18N_NOOP("Mail service"), "unknown" ); | int main( int argc, char **argv ){ KLocale::setMainCatalogue("kdelibs"); KCmdLineArgs::init( argc, argv, "kmailservice", I18N_NOOP("mail service"), "unknown" ); KCmdLineArgs::addCmdLineOptions( options ); KApplication a( false, false ); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if ( args->count() != 1 ) return 1; a.invokeMailer(KURL(args->arg(0)), a.startupId()); return 0;} |
section = false; | section = 0; | void scan_man_page(const char *man_page){ if (!man_page) return; // ## Do more init // Unlike man2html, we actually call this several times, hence the need to // properly cleanup all those static vars s_ifelseval.clear(); section = false; output_possible = false; int strLength = strlen(man_page); char *buf = new char[strLength + 2]; strcpy(buf+1, man_page); buf[0] = '\n'; scan_troff(buf+1,0,NULL); while (itemdepth || dl_set[itemdepth]) { out_html("</DL>\n"); if (dl_set[itemdepth]) dl_set[itemdepth]=0; else if (itemdepth > 0) itemdepth--; } out_html(change_to_font(0)); out_html(change_to_size(0)); if (!fillout) { fillout=1; out_html("</PRE>"); } out_html(NEWLINE); if (section) { out_html("<div style=\"margin-left: 2cm\">\n"); section = 0; } if (output_possible) { output_real( "<div id=\"bottom-nav\" style=\"position : relative; width : 100%;\n"); output_real( "height : 185px; left : 0px; right : 0px; top : 0px; margin-top: 100px;\n"); output_real( "background-image : url('KDE_COMMON_DIR/bottom1.png'); background-repeat :\n"); output_real( "repeat-x; background-color : transparent; margin-left: 0px;\n"); output_real( "margin-right: 0px; z-index : 25;\">\n"); output_real( "<img src=\"KDE_COMMON_DIR/bottom2.png\" align=\"right\" height=\"59\" width=\"227\" alt=\"KDE Logo\">\n"); output_real( "<div id=\"navtable2\" style=\"width : 100%; margin-left: 0px; margin-right:\n"); output_real( "0px; z-index : 15; background-color : transparent;\"></div>\n"); output_real( "</div> \n"); output_real("</BODY>\n</HTML>\n"); } delete [] buf; // reinit static variables for reuse STRDEF *cursor = defdef; while (cursor) { defdef = cursor->next; if (cursor->st) delete [] cursor->st; delete cursor; cursor = defdef; } defdef = 0; cursor = strdef; while (cursor) { strdef = cursor->next; if (cursor->st) delete [] cursor->st; delete cursor; cursor = strdef; } strdef = 0; cursor = chardef; while (cursor) { chardef = cursor->next; delete [] cursor->st; delete cursor; cursor = chardef; } chardef = 0; INTDEF *cursor2 = intdef; while (cursor2) { intdef = cursor2->next; delete cursor2; cursor2 = intdef; } intdef = 0; delete [] buffer; buffer = 0; escapesym='\\'; nobreaksym='\''; controlsym='.'; fieldsym=0; padsym=0; buffpos=0; buffmax=0; scaninbuff=0; itemdepth=0; for (int i = 0; i < 20; i++) dl_set[i] = 0; still_dd=0; for (int i = 0; i < 12; i++) tabstops[i] = (i+1)*8; maxtstop=12; curpos=0; argument = 0;} |
out_html("<div style=\"margin-left: 2cm\">\n"); | output_real("<div style=\"margin-left: 2cm\">\n"); | void scan_man_page(const char *man_page){ if (!man_page) return; // ## Do more init // Unlike man2html, we actually call this several times, hence the need to // properly cleanup all those static vars s_ifelseval.clear(); section = false; output_possible = false; int strLength = strlen(man_page); char *buf = new char[strLength + 2]; strcpy(buf+1, man_page); buf[0] = '\n'; scan_troff(buf+1,0,NULL); while (itemdepth || dl_set[itemdepth]) { out_html("</DL>\n"); if (dl_set[itemdepth]) dl_set[itemdepth]=0; else if (itemdepth > 0) itemdepth--; } out_html(change_to_font(0)); out_html(change_to_size(0)); if (!fillout) { fillout=1; out_html("</PRE>"); } out_html(NEWLINE); if (section) { out_html("<div style=\"margin-left: 2cm\">\n"); section = 0; } if (output_possible) { output_real( "<div id=\"bottom-nav\" style=\"position : relative; width : 100%;\n"); output_real( "height : 185px; left : 0px; right : 0px; top : 0px; margin-top: 100px;\n"); output_real( "background-image : url('KDE_COMMON_DIR/bottom1.png'); background-repeat :\n"); output_real( "repeat-x; background-color : transparent; margin-left: 0px;\n"); output_real( "margin-right: 0px; z-index : 25;\">\n"); output_real( "<img src=\"KDE_COMMON_DIR/bottom2.png\" align=\"right\" height=\"59\" width=\"227\" alt=\"KDE Logo\">\n"); output_real( "<div id=\"navtable2\" style=\"width : 100%; margin-left: 0px; margin-right:\n"); output_real( "0px; z-index : 15; background-color : transparent;\"></div>\n"); output_real( "</div> \n"); output_real("</BODY>\n</HTML>\n"); } delete [] buf; // reinit static variables for reuse STRDEF *cursor = defdef; while (cursor) { defdef = cursor->next; if (cursor->st) delete [] cursor->st; delete cursor; cursor = defdef; } defdef = 0; cursor = strdef; while (cursor) { strdef = cursor->next; if (cursor->st) delete [] cursor->st; delete cursor; cursor = strdef; } strdef = 0; cursor = chardef; while (cursor) { chardef = cursor->next; delete [] cursor->st; delete cursor; cursor = chardef; } chardef = 0; INTDEF *cursor2 = intdef; while (cursor2) { intdef = cursor2->next; delete cursor2; cursor2 = intdef; } intdef = 0; delete [] buffer; buffer = 0; escapesym='\\'; nobreaksym='\''; controlsym='.'; fieldsym=0; padsym=0; buffpos=0; buffmax=0; scaninbuff=0; itemdepth=0; for (int i = 0; i < 20; i++) dl_set[i] = 0; still_dd=0; for (int i = 0; i < 12; i++) tabstops[i] = (i+1)*8; maxtstop=12; curpos=0; argument = 0;} |
KAboutData::License_GPL, "(C) 2004 Dominik Seichter", 0, 0, "[email protected]"); | KAboutData::License_GPL, "(C) 2004-2005 Dominik Seichter (and others)", 0, 0, "[email protected]"); | int main(int argc, char **argv){ KAboutData about("schafkopf", I18N_NOOP("SchafKopf"), version, description, KAboutData::License_GPL, "(C) 2004 Dominik Seichter", 0, 0, "[email protected]"); about.addAuthor( "Christian Kern", 0, "[email protected]" ); about.addAuthor( "Lorenz Moesenlechner", 0, "[email protected]" ); about.addAuthor( "Dominik Seichter", 0, "[email protected]", "http://www.krename.net" ); about.addAuthor( "Benjamin Loewe", 0, "[email protected]" ); KCmdLineArgs::init(argc, argv, &about); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); // get KDE games translations KGlobal::locale()->insertCatalogue("libkdegames"); SchafKopf* mainWin = new SchafKopf(); app.setMainWidget( mainWin ); mainWin->show(); // free some memory args->clear(); return app.exec();} |
about.addAuthor( "Benjamin Loewe", 0, "[email protected]" ); | int main(int argc, char **argv){ KAboutData about("schafkopf", I18N_NOOP("SchafKopf"), version, description, KAboutData::License_GPL, "(C) 2004 Dominik Seichter", 0, 0, "[email protected]"); about.addAuthor( "Christian Kern", 0, "[email protected]" ); about.addAuthor( "Lorenz Moesenlechner", 0, "[email protected]" ); about.addAuthor( "Dominik Seichter", 0, "[email protected]", "http://www.krename.net" ); about.addAuthor( "Benjamin Loewe", 0, "[email protected]" ); KCmdLineArgs::init(argc, argv, &about); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); // get KDE games translations KGlobal::locale()->insertCatalogue("libkdegames"); SchafKopf* mainWin = new SchafKopf(); app.setMainWidget( mainWin ); mainWin->show(); // free some memory args->clear(); return app.exec();} |
|
BROWSEINFOFc.lParam = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lParam", "I"); BROWSEINFOFc.lpfn = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lpfn", "I"); BROWSEINFOFc.ulFlags = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "ulFlags", "I"); BROWSEINFOFc.lpszTitle = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lpszTitle", "I"); BROWSEINFOFc.pszDisplayName = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "pszDisplayName", "I"); BROWSEINFOFc.pidlRoot = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "pidlRoot", "I"); BROWSEINFOFc.hwndOwner = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "hwndOwner", "I"); | void cacheBROWSEINFOFields(JNIEnv *env, jobject lpObject){ if (BROWSEINFOFc.cached) return; BROWSEINFOFc.clazz = (*env)->GetObjectClass(env, lpObject); BROWSEINFOFc.iImage = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "iImage", "I"); BROWSEINFOFc.lParam = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lParam", "I"); BROWSEINFOFc.lpfn = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lpfn", "I"); BROWSEINFOFc.ulFlags = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "ulFlags", "I"); BROWSEINFOFc.lpszTitle = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "lpszTitle", "I"); BROWSEINFOFc.pszDisplayName = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "pszDisplayName", "I"); BROWSEINFOFc.pidlRoot = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "pidlRoot", "I"); BROWSEINFOFc.hwndOwner = (*env)->GetFieldID(env, BROWSEINFOFc.clazz, "hwndOwner", "I"); BROWSEINFOFc.cached = 1;} |
|
DROPFILESFc.fNC = (*env)->GetFieldID(env, DROPFILESFc.clazz, "fNC", "I"); DROPFILESFc.pt_y = (*env)->GetFieldID(env, DROPFILESFc.clazz, "pt_y", "I"); DROPFILESFc.pt_x = (*env)->GetFieldID(env, DROPFILESFc.clazz, "pt_x", "I"); DROPFILESFc.pFiles = (*env)->GetFieldID(env, DROPFILESFc.clazz, "pFiles", "I"); | void cacheDROPFILESFields(JNIEnv *env, jobject lpObject){ if (DROPFILESFc.cached) return; DROPFILESFc.clazz = (*env)->GetObjectClass(env, lpObject); DROPFILESFc.fWide = (*env)->GetFieldID(env, DROPFILESFc.clazz, "fWide", "I"); DROPFILESFc.fNC = (*env)->GetFieldID(env, DROPFILESFc.clazz, "fNC", "I"); DROPFILESFc.pt_y = (*env)->GetFieldID(env, DROPFILESFc.clazz, "pt_y", "I"); DROPFILESFc.pt_x = (*env)->GetFieldID(env, DROPFILESFc.clazz, "pt_x", "I"); DROPFILESFc.pFiles = (*env)->GetFieldID(env, DROPFILESFc.clazz, "pFiles", "I"); DROPFILESFc.cached = 1;} |
|
HDITEMFc.iImage = (*env)->GetFieldID(env, HDITEMFc.clazz, "iImage", "I"); HDITEMFc.lParam = (*env)->GetFieldID(env, HDITEMFc.clazz, "lParam", "I"); HDITEMFc.fmt = (*env)->GetFieldID(env, HDITEMFc.clazz, "fmt", "I"); HDITEMFc.cchTextMax = (*env)->GetFieldID(env, HDITEMFc.clazz, "cchTextMax", "I"); HDITEMFc.hbm = (*env)->GetFieldID(env, HDITEMFc.clazz, "hbm", "I"); HDITEMFc.pszText = (*env)->GetFieldID(env, HDITEMFc.clazz, "pszText", "I"); HDITEMFc.cxy = (*env)->GetFieldID(env, HDITEMFc.clazz, "cxy", "I"); HDITEMFc.mask = (*env)->GetFieldID(env, HDITEMFc.clazz, "mask", "I"); | void cacheHDITEMFields(JNIEnv *env, jobject lpObject){ if (HDITEMFc.cached) return; HDITEMFc.clazz = (*env)->GetObjectClass(env, lpObject); HDITEMFc.iOrder = (*env)->GetFieldID(env, HDITEMFc.clazz, "iOrder", "I"); HDITEMFc.iImage = (*env)->GetFieldID(env, HDITEMFc.clazz, "iImage", "I"); HDITEMFc.lParam = (*env)->GetFieldID(env, HDITEMFc.clazz, "lParam", "I"); HDITEMFc.fmt = (*env)->GetFieldID(env, HDITEMFc.clazz, "fmt", "I"); HDITEMFc.cchTextMax = (*env)->GetFieldID(env, HDITEMFc.clazz, "cchTextMax", "I"); HDITEMFc.hbm = (*env)->GetFieldID(env, HDITEMFc.clazz, "hbm", "I"); HDITEMFc.pszText = (*env)->GetFieldID(env, HDITEMFc.clazz, "pszText", "I"); HDITEMFc.cxy = (*env)->GetFieldID(env, HDITEMFc.clazz, "cxy", "I"); HDITEMFc.mask = (*env)->GetFieldID(env, HDITEMFc.clazz, "mask", "I"); HDITEMFc.cached = 1;} |
|
NMREBARCHEVRONFc.bottom = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "bottom", "I"); NMREBARCHEVRONFc.right = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "right", "I"); NMREBARCHEVRONFc.top = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "top", "I"); NMREBARCHEVRONFc.left = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "left", "I"); NMREBARCHEVRONFc.lParam = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "lParam", "I"); NMREBARCHEVRONFc.wID = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "wID", "I"); NMREBARCHEVRONFc.uBand = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "uBand", "I"); | void cacheNMREBARCHEVRONFields(JNIEnv *env, jobject lpObject){ if (NMREBARCHEVRONFc.cached) return; cacheNMHDRFields(env, lpObject); NMREBARCHEVRONFc.clazz = (*env)->GetObjectClass(env, lpObject); NMREBARCHEVRONFc.lParamNM = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "lParamNM", "I"); NMREBARCHEVRONFc.bottom = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "bottom", "I"); NMREBARCHEVRONFc.right = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "right", "I"); NMREBARCHEVRONFc.top = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "top", "I"); NMREBARCHEVRONFc.left = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "left", "I"); NMREBARCHEVRONFc.lParam = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "lParam", "I"); NMREBARCHEVRONFc.wID = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "wID", "I"); NMREBARCHEVRONFc.uBand = (*env)->GetFieldID(env, NMREBARCHEVRONFc.clazz, "uBand", "I"); NMREBARCHEVRONFc.cached = 1;} |
|
lpStruct->rc.bottom = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.bottom); lpStruct->rc.right = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.right); lpStruct->rc.top = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.top); lpStruct->rc.left = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.left); lpStruct->lParam = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.lParam); lpStruct->wID = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.wID); lpStruct->uBand = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.uBand); | NMREBARCHEVRON *getNMREBARCHEVRONFields(JNIEnv *env, jobject lpObject, NMREBARCHEVRON *lpStruct){ if (!NMREBARCHEVRONFc.cached) cacheNMREBARCHEVRONFields(env, lpObject); getNMHDRFields(env, lpObject, (NMHDR *)lpStruct); lpStruct->lParamNM = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.lParamNM); lpStruct->rc.bottom = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.bottom); lpStruct->rc.right = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.right); lpStruct->rc.top = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.top); lpStruct->rc.left = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.left); lpStruct->lParam = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.lParam); lpStruct->wID = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.wID); lpStruct->uBand = (*env)->GetIntField(env, lpObject, NMREBARCHEVRONFc.uBand); return lpStruct;} |
|
NMTVCUSTOMDRAWFc.clrTextBk = (*env)->GetFieldID(env, NMTVCUSTOMDRAWFc.clazz, "clrTextBk", "I"); NMTVCUSTOMDRAWFc.clrText = (*env)->GetFieldID(env, NMTVCUSTOMDRAWFc.clazz, "clrText", "I"); | void cacheNMTVCUSTOMDRAWFields(JNIEnv *env, jobject lpObject){ if (NMTVCUSTOMDRAWFc.cached) return; cacheNMCUSTOMDRAWFields(env, lpObject); NMTVCUSTOMDRAWFc.clazz = (*env)->GetObjectClass(env, lpObject); NMTVCUSTOMDRAWFc.iLevel = (*env)->GetFieldID(env, NMTVCUSTOMDRAWFc.clazz, "iLevel", "I"); NMTVCUSTOMDRAWFc.clrTextBk = (*env)->GetFieldID(env, NMTVCUSTOMDRAWFc.clazz, "clrTextBk", "I"); NMTVCUSTOMDRAWFc.clrText = (*env)->GetFieldID(env, NMTVCUSTOMDRAWFc.clazz, "clrText", "I"); NMTVCUSTOMDRAWFc.cached = 1;} |
|
TVITEMFc.cChildren = (*env)->GetFieldID(env, TVITEMFc.clazz, "cChildren", "I"); TVITEMFc.iSelectedImage = (*env)->GetFieldID(env, TVITEMFc.clazz, "iSelectedImage", "I"); TVITEMFc.iImage = (*env)->GetFieldID(env, TVITEMFc.clazz, "iImage", "I"); TVITEMFc.cchTextMax = (*env)->GetFieldID(env, TVITEMFc.clazz, "cchTextMax", "I"); TVITEMFc.pszText = (*env)->GetFieldID(env, TVITEMFc.clazz, "pszText", "I"); TVITEMFc.stateMask = (*env)->GetFieldID(env, TVITEMFc.clazz, "stateMask", "I"); TVITEMFc.state = (*env)->GetFieldID(env, TVITEMFc.clazz, "state", "I"); TVITEMFc.hItem = (*env)->GetFieldID(env, TVITEMFc.clazz, "hItem", "I"); TVITEMFc.mask = (*env)->GetFieldID(env, TVITEMFc.clazz, "mask", "I"); | void cacheTVITEMFields(JNIEnv *env, jobject lpObject){ if (TVITEMFc.cached) return; TVITEMFc.clazz = (*env)->GetObjectClass(env, lpObject); TVITEMFc.lParam = (*env)->GetFieldID(env, TVITEMFc.clazz, "lParam", "I"); TVITEMFc.cChildren = (*env)->GetFieldID(env, TVITEMFc.clazz, "cChildren", "I"); TVITEMFc.iSelectedImage = (*env)->GetFieldID(env, TVITEMFc.clazz, "iSelectedImage", "I"); TVITEMFc.iImage = (*env)->GetFieldID(env, TVITEMFc.clazz, "iImage", "I"); TVITEMFc.cchTextMax = (*env)->GetFieldID(env, TVITEMFc.clazz, "cchTextMax", "I"); TVITEMFc.pszText = (*env)->GetFieldID(env, TVITEMFc.clazz, "pszText", "I"); TVITEMFc.stateMask = (*env)->GetFieldID(env, TVITEMFc.clazz, "stateMask", "I"); TVITEMFc.state = (*env)->GetFieldID(env, TVITEMFc.clazz, "state", "I"); TVITEMFc.hItem = (*env)->GetFieldID(env, TVITEMFc.clazz, "hItem", "I"); TVITEMFc.mask = (*env)->GetFieldID(env, TVITEMFc.clazz, "mask", "I"); TVITEMFc.cached = 1;} |
|
kdDebug(7101) << "NFS: kdemain: Done" << endl; | int kdemain( int argc, char **argv ){ KInstance instance( "kio_nfs" ); if (argc != 4) { fprintf(stderr, "Usage: kio_nfs protocol domain-socket1 domain-socket2\n"); exit(-1); } kdDebug(7101) << "NFS: kdemain: starting" << endl; NFSProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); kdDebug(7101) << "NFS: kdemain: Done" << endl; return 0;} |
|
debug("PID %d exited", (int) pid); | qDebug("PID %d exited", (int) pid); | void sigchld_handler(int){ int status; pid_t pid; while (1) { pid = waitpid((pid_t) -1, &status, WNOHANG); if (pid <= 0) break; debug("PID %d exited", (int) pid); }} |
if (args->count() == 0) KCmdLineArgs::usage(i18n("No command specified!")); | int main(int argc, char *argv[]){ KAboutData aboutData("kdesu", I18N_NOOP("KDE su"), Version, I18N_NOOP("Runs a program with elevated privileges."), KAboutData::License_Artistic, "Copyright (c) 1998-2000 Geert Jansen, Pietro Iglio"); aboutData.addAuthor("Geert Jansen", I18N_NOOP("Maintainer"), "[email protected]", "http://www.stack.nl/~geertj/"); aboutData.addAuthor("Pietro Iglio", I18N_NOOP("Original author"), "[email protected]"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); // Stop daemon and exit? if (args->isSet("s")) { KDEsuClient client; if (client.ping() == -1) { kdError(1206) << "Daemon not running -- nothing to stop\n"; exit(1); } if (client.stopServer() != -1) { kdDebug(1206) << "Daemon stopped\n"; exit(0); } kdError(1206) << "Could not stop daemon\n"; exit(1); } // Get target uid QCString user = args->getOption("u"); QCString auth_user = user; struct passwd *pw = getpwnam(user); if (pw == 0L) { kdError(1206) << "User " << user << " does not exist\n"; exit(1); } bool change_uid = (getuid() != pw->pw_uid); // If file is writeable, do not change uid QString file = QFile::decodeName(args->getOption("f")); if (change_uid && !file.isEmpty()) { if (file.at(0) != '/') { KStandardDirs dirs; dirs.addKDEDefaults(); file = dirs.findResource("config", file); if (file.isEmpty()) { kdError(1206) << "Config file not found: " << file << "\n"; exit(1); } } QFileInfo fi(file); if (!fi.exists()) { kdError(1206) << "File does not exist: " << file << "\n"; exit(1); } change_uid = !fi.isWritable(); } // Get priority/scheduler QCString tmp = args->getOption("p"); bool ok; int priority = tmp.toInt(&ok); if (!ok || (priority < 0) || (priority > 100)) { KCmdLineArgs::usage(i18n("Illegal priority: %1").arg(tmp)); exit(1); } int scheduler = SuProcess::SchedNormal; if (args->isSet("r")) scheduler = SuProcess::SchedRealtime; if ((priority > 50) || (scheduler != SuProcess::SchedNormal)) { change_uid = true; auth_user = "root"; } // Get command if (args->count() == 0) KCmdLineArgs::usage(i18n("No command specified!")); QCString command = args->arg(0); for (int i=1; i<args->count(); i++) { command += " "; command += args->arg(i); } // Don't change uid if we're don't need to. if (!change_uid) return system(command); // Check for daemon and start if necessary bool just_started = false; bool have_daemon = true; KDEsuClient client; if (!client.isServerSGID()) { kdWarning(1206) << "Daemon not safe (not sgid), not using it.\n"; have_daemon = false; } else if (client.ping() == -1) { if (client.startServer() == -1) { kdWarning(1206) << "Could not start daemon, reduced functionality.\n"; have_daemon = false; } just_started = true; } // Try to exec the command with kdesud. bool keep = !args->isSet("n") && have_daemon; bool terminal = args->isSet("t"); if (keep && !terminal && !just_started) { client.setPriority(priority); client.setScheduler(scheduler); if (client.exec(command, user) != -1) return 0; } // Set core dump size to 0 because we will have // root's password in memory. struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 0; if (setrlimit(RLIMIT_CORE, &rlim)) { kdError(1206) << "rlimit(): " << ERR << "\n"; exit(1); } // From here, we need the GUI: create a KApplication KApplication *app = new KApplication; // Read configuration KConfig *config = KGlobal::config(); config->setGroup("Passwords"); int timeout = config->readNumEntry("Timeout", defTimeout); // Start the dialog KDEsuDialog *dlg = new KDEsuDialog(user, auth_user, keep && !terminal); dlg->addLine(i18n("Command:"), command); if ((priority != 50) || (scheduler != SuProcess::SchedNormal)) { QString prio; if (scheduler == SuProcess::SchedRealtime) prio += i18n("realtime: "); prio += QString("%1/100").arg(priority); dlg->addLine(i18n("Priority:"), prio); } int ret = dlg->exec(); if (ret == KDEsuDialog::Rejected) exit(0); if (ret == KDEsuDialog::AsUser) change_uid = false; QCString password = dlg->password(); int k = dlg->keep(); delete dlg; // Some events may need to be handled (like a button animation) app->processEvents(); if (!change_uid) return system(command); // Run command if (k && have_daemon) { client.setPass(password, timeout); client.setPriority(priority); client.setScheduler(scheduler); return client.exec(command, user); } else { SuProcess proc; proc.setTerminal(terminal); proc.setErase(true); proc.setUser(user); proc.setPriority(priority); proc.setScheduler(scheduler); proc.setCommand(command); return proc.exec(password); }} |
|
KApplication *app = new KApplication; | int main(int argc, char *argv[]){ KAboutData aboutData("kdesu", I18N_NOOP("KDE su"), Version, I18N_NOOP("Runs a program with elevated privileges."), KAboutData::License_Artistic, "Copyright (c) 1998-2000 Geert Jansen, Pietro Iglio"); aboutData.addAuthor("Geert Jansen", I18N_NOOP("Maintainer"), "[email protected]", "http://www.stack.nl/~geertj/"); aboutData.addAuthor("Pietro Iglio", I18N_NOOP("Original author"), "[email protected]"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); // Stop daemon and exit? if (args->isSet("s")) { KDEsuClient client; if (client.ping() == -1) { kdError(1206) << "Daemon not running -- nothing to stop\n"; exit(1); } if (client.stopServer() != -1) { kdDebug(1206) << "Daemon stopped\n"; exit(0); } kdError(1206) << "Could not stop daemon\n"; exit(1); } // Get target uid QCString user = args->getOption("u"); QCString auth_user = user; struct passwd *pw = getpwnam(user); if (pw == 0L) { kdError(1206) << "User " << user << " does not exist\n"; exit(1); } bool change_uid = (getuid() != pw->pw_uid); // If file is writeable, do not change uid QString file = QFile::decodeName(args->getOption("f")); if (change_uid && !file.isEmpty()) { if (file.at(0) != '/') { KStandardDirs dirs; dirs.addKDEDefaults(); file = dirs.findResource("config", file); if (file.isEmpty()) { kdError(1206) << "Config file not found: " << file << "\n"; exit(1); } } QFileInfo fi(file); if (!fi.exists()) { kdError(1206) << "File does not exist: " << file << "\n"; exit(1); } change_uid = !fi.isWritable(); } // Get priority/scheduler QCString tmp = args->getOption("p"); bool ok; int priority = tmp.toInt(&ok); if (!ok || (priority < 0) || (priority > 100)) { KCmdLineArgs::usage(i18n("Illegal priority: %1").arg(tmp)); exit(1); } int scheduler = SuProcess::SchedNormal; if (args->isSet("r")) scheduler = SuProcess::SchedRealtime; if ((priority > 50) || (scheduler != SuProcess::SchedNormal)) { change_uid = true; auth_user = "root"; } // Get command if (args->count() == 0) KCmdLineArgs::usage(i18n("No command specified!")); QCString command = args->arg(0); for (int i=1; i<args->count(); i++) { command += " "; command += args->arg(i); } // Don't change uid if we're don't need to. if (!change_uid) return system(command); // Check for daemon and start if necessary bool just_started = false; bool have_daemon = true; KDEsuClient client; if (!client.isServerSGID()) { kdWarning(1206) << "Daemon not safe (not sgid), not using it.\n"; have_daemon = false; } else if (client.ping() == -1) { if (client.startServer() == -1) { kdWarning(1206) << "Could not start daemon, reduced functionality.\n"; have_daemon = false; } just_started = true; } // Try to exec the command with kdesud. bool keep = !args->isSet("n") && have_daemon; bool terminal = args->isSet("t"); if (keep && !terminal && !just_started) { client.setPriority(priority); client.setScheduler(scheduler); if (client.exec(command, user) != -1) return 0; } // Set core dump size to 0 because we will have // root's password in memory. struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 0; if (setrlimit(RLIMIT_CORE, &rlim)) { kdError(1206) << "rlimit(): " << ERR << "\n"; exit(1); } // From here, we need the GUI: create a KApplication KApplication *app = new KApplication; // Read configuration KConfig *config = KGlobal::config(); config->setGroup("Passwords"); int timeout = config->readNumEntry("Timeout", defTimeout); // Start the dialog KDEsuDialog *dlg = new KDEsuDialog(user, auth_user, keep && !terminal); dlg->addLine(i18n("Command:"), command); if ((priority != 50) || (scheduler != SuProcess::SchedNormal)) { QString prio; if (scheduler == SuProcess::SchedRealtime) prio += i18n("realtime: "); prio += QString("%1/100").arg(priority); dlg->addLine(i18n("Priority:"), prio); } int ret = dlg->exec(); if (ret == KDEsuDialog::Rejected) exit(0); if (ret == KDEsuDialog::AsUser) change_uid = false; QCString password = dlg->password(); int k = dlg->keep(); delete dlg; // Some events may need to be handled (like a button animation) app->processEvents(); if (!change_uid) return system(command); // Run command if (k && have_daemon) { client.setPass(password, timeout); client.setPriority(priority); client.setScheduler(scheduler); return client.exec(command, user); } else { SuProcess proc; proc.setTerminal(terminal); proc.setErase(true); proc.setUser(user); proc.setPriority(priority); proc.setScheduler(scheduler); proc.setCommand(command); return proc.exec(password); }} |
|
QStringList path = QStringList::split('/', url.encodedPathAndQuery(-1), false); KIO::UDSEntry entry; QString mime; QString mp; | kdDebug(7126) << "stat: " << url << endl; if (url.path().length() <= 1) { KIO::UDSEntry entry; if (fullMode) createDirEntry(entry, i18n("System"), "system:/", "inode/directory"); else createDirEntry(entry, i18n("Devices"), "devices:/", "inode/directory"); statEntry(entry); finished(); return; } | void DevicesProtocol::stat(const KURL& url){ QStringList path = QStringList::split('/', url.encodedPathAndQuery(-1), false); KIO::UDSEntry entry; QString mime; QString mp; switch (path.count()) { case 0: if (fullMode) createDirEntry(entry, i18n("System"), "system:/", "inode/directory"); else createDirEntry(entry, i18n("Devices"), "devices:/", "inode/directory"); statEntry(entry); finished(); break; default: QStringList info=deviceInfo(url.fileName()); if (info.empty()) { error(KIO::ERR_SLAVE_DEFINED,i18n("Unknown device: %1").arg(url.fileName())); return; } QStringList::Iterator it=info.begin(); if (it!=info.end()) { QString device=*it; ++it; if (it!=info.end()) { ++it; if (it!=info.end()) { QString mp=*it; ++it;++it; if (it!=info.end()) { bool mounted=((*it)=="true"); if (mounted) {// if (mp=="/") mp=""; redirection(KURL( mp )); finished(); } else { if (mp.startsWith("file:/")) { KProcess *proc = new KProcess; *proc << "kio_devices_mounthelper"; *proc << "-m" << url.url(); proc->start(KProcess::Block); delete proc; redirection(KURL( mp )); finished(); } else error(KIO::ERR_SLAVE_DEFINED,i18n("Device not accessible"));// error(KIO::ERR_SLAVE_DEFINED,i18n("Device not mounted")); } return; } } } } error(KIO::ERR_SLAVE_DEFINED,i18n("Illegal data received")); return; break; }} |
switch (path.count()) { case 0: if (fullMode) createDirEntry(entry, i18n("System"), "system:/", "inode/directory"); else createDirEntry(entry, i18n("Devices"), "devices:/", "inode/directory"); statEntry(entry); finished(); break; default: QStringList info=deviceInfo(url.fileName()); if (info.empty()) { error(KIO::ERR_SLAVE_DEFINED,i18n("Unknown device: %1").arg(url.fileName())); return; } QStringList::Iterator it=info.begin(); if (it!=info.end()) { QString device=*it; ++it; if (it!=info.end()) { ++it; if (it!=info.end()) { QString mp=*it; ++it;++it; if (it!=info.end()) { bool mounted=((*it)=="true"); if (mounted) { redirection(KURL( mp )); finished(); } else { if (mp.startsWith("file:/")) { KProcess *proc = new KProcess; *proc << "kio_devices_mounthelper"; *proc << "-m" << url.url(); proc->start(KProcess::Block); delete proc; redirection(KURL( mp )); finished(); } else error(KIO::ERR_SLAVE_DEFINED,i18n("Device not accessible")); } return; } } } } error(KIO::ERR_SLAVE_DEFINED,i18n("Illegal data received")); return; break; } | mountAndRedirect(url); | void DevicesProtocol::stat(const KURL& url){ QStringList path = QStringList::split('/', url.encodedPathAndQuery(-1), false); KIO::UDSEntry entry; QString mime; QString mp; switch (path.count()) { case 0: if (fullMode) createDirEntry(entry, i18n("System"), "system:/", "inode/directory"); else createDirEntry(entry, i18n("Devices"), "devices:/", "inode/directory"); statEntry(entry); finished(); break; default: QStringList info=deviceInfo(url.fileName()); if (info.empty()) { error(KIO::ERR_SLAVE_DEFINED,i18n("Unknown device: %1").arg(url.fileName())); return; } QStringList::Iterator it=info.begin(); if (it!=info.end()) { QString device=*it; ++it; if (it!=info.end()) { ++it; if (it!=info.end()) { QString mp=*it; ++it;++it; if (it!=info.end()) { bool mounted=((*it)=="true"); if (mounted) {// if (mp=="/") mp=""; redirection(KURL( mp )); finished(); } else { if (mp.startsWith("file:/")) { KProcess *proc = new KProcess; *proc << "kio_devices_mounthelper"; *proc << "-m" << url.url(); proc->start(KProcess::Block); delete proc; redirection(KURL( mp )); finished(); } else error(KIO::ERR_SLAVE_DEFINED,i18n("Device not accessible"));// error(KIO::ERR_SLAVE_DEFINED,i18n("Device not mounted")); } return; } } } } error(KIO::ERR_SLAVE_DEFINED,i18n("Illegal data received")); return; break; }} |