rem
stringlengths
0
83.5k
add
stringlengths
0
223k
context
stringlengths
10
471k
meta
stringlengths
120
236
myDebug( << "*** Starting fish " << endl); if (argc != 4) { myDebug( << "Usage: fish protocol domain-socket1 domain-socket2" << endl); exit(-1); }
myDebug( << "*** Starting fish " << endl); if (argc != 4) { myDebug( << "Usage: fish protocol domain-socket1 domain-socket2" << endl); exit(-1); }
int kdemain( int argc, char **argv ){ KInstance instance("fish"); myDebug( << "*** Starting fish " << endl); if (argc != 4) { myDebug( << "Usage: fish protocol domain-socket1 domain-socket2" << endl); exit(-1); } fishProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); myDebug( << "*** fish Done" << endl); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/11afbb378913175f7b3f19457b921df3efab59dc/fish.cpp/buggy/kioslave/fish/fish.cpp
fishProtocol slave(argv[2], argv[3]); slave.dispatchLoop();
fishProtocol slave(argv[2], argv[3]); slave.dispatchLoop();
int kdemain( int argc, char **argv ){ KInstance instance("fish"); myDebug( << "*** Starting fish " << endl); if (argc != 4) { myDebug( << "Usage: fish protocol domain-socket1 domain-socket2" << endl); exit(-1); } fishProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); myDebug( << "*** fish Done" << endl); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/11afbb378913175f7b3f19457b921df3efab59dc/fish.cpp/buggy/kioslave/fish/fish.cpp
myDebug( << "*** fish Done" << endl); return 0;
myDebug( << "*** fish Done" << endl); return 0;
int kdemain( int argc, char **argv ){ KInstance instance("fish"); myDebug( << "*** Starting fish " << endl); if (argc != 4) { myDebug( << "Usage: fish protocol domain-socket1 domain-socket2" << endl); exit(-1); } fishProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); myDebug( << "*** fish Done" << endl); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/11afbb378913175f7b3f19457b921df3efab59dc/fish.cpp/buggy/kioslave/fish/fish.cpp
QString mp=*it; ++it;
QString mp=*it; ++it;++it;
void HelloProtocol::stat(const KURL& url){ QStringList path = QStringList::split('/', url.encodedPathAndQuery(-1), false); KIO::UDSEntry entry; QString mime; QString mp; switch (path.count()) { case 0: createDirEntry(entry, i18n("My Computer"), "devices:/", "inode/directory"); statEntry(entry); finished(); break; default: QStringList info=deviceInfo(url.fileName()); if (info.empty()) { error(KIO::ERR_SLAVE_DEFINED,i18n("Unknown device")); 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; if (it!=info.end()) { bool mounted=((*it)=="true"); if (mounted) { if (mp=="/") mp=""; redirection("file:/"+mp); finished(); } else { error(KIO::ERR_SLAVE_DEFINED,i18n("Device not mounted")); } return; } } } } error(KIO::ERR_SLAVE_DEFINED,i18n("illegal data received")); return; break; }};
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/1bec62ddb9df84f9217cfb3645c08e888e15e938/kio_devices.cc/buggy/kioslave/devices/kio_devices.cc
QString mp=*it; ++it;
QString mp=*it; ++it;++it;
void HelloProtocol::listDir(const KURL& url){ kdDebug()<<"HELLO PROTOCOLL::listdir: "<<url.url()<<endl; if (url==KURL("devices:/")) listRoot(); else { QStringList info=deviceInfo(url.fileName()); if (info.empty()) { error(KIO::ERR_SLAVE_DEFINED,i18n("Unknown device")); 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; if (it!=info.end()) { bool mounted=((*it)=="true"); if (mounted) { if (mp=="/") mp=""; redirection("file:/"+mp); finished(); } else { KProcess *proc = new KProcess; *proc << "kio_devices_mounthelper"; *proc << "-m" << url.url(); proc->start(KProcess::Block); delete proc; if (mp=="/") mp=""; redirection("file:/"+mp); finished(); // error(KIO::ERR_SLAVE_DEFINED,i18n("Device not mounted")); } return; } } } } error(KIO::ERR_SLAVE_DEFINED,i18n("illegal data received")); }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/1bec62ddb9df84f9217cfb3645c08e888e15e938/kio_devices.cc/buggy/kioslave/devices/kio_devices.cc
int kdemain( int argc, char **argv ) {
int KDE_EXPORT kdemain( int argc, char **argv ) {
int kdemain( int argc, char **argv ) { KInstance instance("kio_man"); kdDebug(7107) << "STARTING " << getpid() << endl; if (argc != 4) { fprintf(stderr, "Usage: kio_man protocol domain-socket1 domain-socket2\n"); exit(-1); } MANProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); kdDebug(7107) << "Done" << endl; return 0; }
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/4c48a8b228be22e564be142f2d5b1f60eee1222e/kio_man.cpp/buggy/kioslave/man/kio_man.cpp
extern "C" int kdemain( int argc, char **argv )
extern "C" int KDE_EXPORT kdemain( int argc, char **argv )
extern "C" int kdemain( int argc, char **argv ){ KAboutData aboutData( "khelpcenter", I18N_NOOP("KDE Help Center"), HELPCENTER_VERSION, I18N_NOOP("The KDE Help Center"), KAboutData::License_GPL, I18N_NOOP("(c) 1999-2003, The KHelpCenter developers") ); aboutData.addAuthor( "Cornelius Schumacher", 0, "[email protected]" ); aboutData.addAuthor( "Frerich Raabe", 0, "[email protected]" ); aboutData.addAuthor( "Matthias Elter", I18N_NOOP("Original Author"), "[email protected]" ); aboutData.addAuthor( "Wojciech Smigaj", I18N_NOOP("Info page support"), "[email protected]" ); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); KApplication::addCmdLineOptions(); KHC::Application app; if ( app.isRestored() ) { RESTORE( MainWindow ); } return app.exec();}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/3f9c6c1f3460a204a012be488471fe042cfdbbb0/application.cpp/buggy/khelpcenter/application.cpp
int main(int argc, char **argv){ KAboutData aboutData("kwriteconfig", I18N_NOOP("KWriteConfig"), "1.0.0", I18N_NOOP("Write KConfig entries - for use in shell scripts"), KAboutData::License_GPL, "(c) 2001 Red Hat, Inc. & Lus Pedro Coelho"); aboutData.addAuthor("Lus Pedro Coelho", 0, "[email protected]"); aboutData.addAuthor("Bernhard Rosenkraenzer", "Wrote kreadconfig on which this is based", "[email protected]"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs *args=KCmdLineArgs::parsedArgs(); QString group=QString::fromLocal8Bit(args->getOption("group")); QString key=QString::fromLocal8Bit(args->getOption("key")); QString file=QString::fromLocal8Bit(args->getOption("file")); QCString type=args->getOption("type").lower(); if (key.isNull() || !args->count()) { KCmdLineArgs::usage(); return 1; } QCString value = args->arg( 0 ); KInstance inst(&aboutData); KConfig *konfig; if (file.isEmpty()) konfig = new KConfig(QString::fromLatin1("kdeglobals"), false, false); else konfig = new KConfig(file, false, false); konfig->setGroup(group); if ( konfig->getConfigState() != KConfig::ReadWrite || konfig->entryIsImmutable( key ) ) return 2; if(type=="bool") { // For symmetry with kreadconfig we accept a wider range of values as true than Qt bool boolvalue=(value=="true" || value=="on" || value=="yes" || value=="1"); konfig->writeEntry( key, boolvalue ); } else { konfig->writeEntry( key, QString::fromLocal8Bit( value ) ); } konfig->sync(); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/bad1fa08c5ed5f30a5923346cabac17a15472460/kwriteconfig.cpp/clean/kreadconfig/kwriteconfig.cpp
delete konfig;
int main(int argc, char **argv){ KAboutData aboutData("kwriteconfig", I18N_NOOP("KWriteConfig"), "1.0.0", I18N_NOOP("Write KConfig entries - for use in shell scripts"), KAboutData::License_GPL, "(c) 2001 Red Hat, Inc. & Lus Pedro Coelho"); aboutData.addAuthor("Lus Pedro Coelho", 0, "[email protected]"); aboutData.addAuthor("Bernhard Rosenkraenzer", "Wrote kreadconfig on which this is based", "[email protected]"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs *args=KCmdLineArgs::parsedArgs(); QString group=QString::fromLocal8Bit(args->getOption("group")); QString key=QString::fromLocal8Bit(args->getOption("key")); QString file=QString::fromLocal8Bit(args->getOption("file")); QCString type=args->getOption("type").lower(); if (key.isNull() || !args->count()) { KCmdLineArgs::usage(); return 1; } QCString value = args->arg( 0 ); KInstance inst(&aboutData); KConfig *konfig; if (file.isEmpty()) konfig = new KConfig(QString::fromLatin1("kdeglobals"), false, false); else konfig = new KConfig(file, false, false); konfig->setGroup(group); if ( konfig->getConfigState() != KConfig::ReadWrite || konfig->entryIsImmutable( key ) ) return 2; if(type=="bool") { // For symmetry with kreadconfig we accept a wider range of values as true than Qt bool boolvalue=(value=="true" || value=="on" || value=="yes" || value=="1"); konfig->writeEntry( key, boolvalue ); } else { konfig->writeEntry( key, QString::fromLocal8Bit( value ) ); } konfig->sync(); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/bad1fa08c5ed5f30a5923346cabac17a15472460/kwriteconfig.cpp/clean/kreadconfig/kwriteconfig.cpp
return new Plugin(theQGisAppPointer, theQgisInterfacePointer);
return new QgsNorthArrowPlugin(theQGisAppPointer, theQgisInterfacePointer);
QGISEXTERN QgisPlugin * classFactory(QgisApp * theQGisAppPointer, QgisIface * theQgisInterfacePointer){ return new Plugin(theQGisAppPointer, theQgisInterfacePointer);}
1753 /local/tlutelli/issta_data/temp/c/2005_temp/2005/1753/e3f307e610e7fc520d17085c6897d86854e6aec5/plugin.cpp/clean/plugins/north_arrow/plugin.cpp
test_bindings_once(int lastcheck)
test_bindings_once (int lastcheck)
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
int i;
int i;
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
pthread_rdwr_rlock_np (&domainlock);
pthread_rdwr_rlock_np (&domainlock);
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
if (debug_flag)
if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1)
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); }
/* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out;
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1)
time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE)
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
/* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0)
/* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0)
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
/* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0)
/* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
/* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast)
if (domainlist[i].active == -2)
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
_("Server for domain '%s' doesn't answer."),
_("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr),
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
{ if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); }
log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain);
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */
} lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
/* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock);
/* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL;
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
} else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock);
/* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock);
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast)
if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast)
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
} /* end for () all domains */
} else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
pthread_rdwr_runlock_np (&domainlock);
pthread_rdwr_runlock_np (&domainlock);
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
return lastcheck;
return lastcheck;
test_bindings_once(int lastcheck){ int i; pthread_rdwr_rlock_np (&domainlock); if (debug_flag) { if (lastcheck) log_msg (LOG_DEBUG, _("Pinging all active server.")); else log_msg (LOG_DEBUG, _("Check new for fastest server.")); } for (i = 0; i < max_domains; ++i) { char *domain = domainlist[i].domain; bool_t out = TRUE; enum clnt_stat status = RPC_SUCCESS; if (domainlist[i].active != -1) { /* The binding is in use, check if it is still valid and the fastest one. */ if (lastcheck != 0) { /* Check only if the current binding is still valid. */ struct timeval time_out; time_out.tv_sec = 3; time_out.tv_usec = 0; status = clnt_call(domainlist[i].client_handle, YPPROC_DOMAIN, (xdrproc_t) ypbind_xdr_domainname, (caddr_t) &domain, (xdrproc_t) xdr_bool, (caddr_t) &out, time_out); } /* time to search a new fastest server, but only if the current one was not set with ypset. We search in every case if the above check fails and the current data is not longer valid. */ if ((lastcheck == 0 && domainlist[i].active != -2) || status != RPC_SUCCESS || out != TRUE) { /* The current binding is not valid or it is time to search for a new, fast server. */ if (debug_flag && lastcheck != 0) { /* Current active binding is not longer valid, print the old binding for debugging. */ if (domainlist[i].use_broadcast) log_msg (LOG_DEBUG, _("Server for domain '%s' doesn't answer."), domain); else { if (domainlist[i].active == -2) log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), inet_ntoa(domainlist[i].ypset.addr), domain); else log_msg (LOG_DEBUG, _("Server '%s' for domain '%s' doesn't answer."), domainlist[i].server[domainlist[i].active].host, domain); } } lastcheck = 0; /* If we need a new server before the TTL expires, reset it. */ /* We have the read lock, but we need the write lock for changes :-( */ pthread_rdwr_runlock_np (&domainlock); pthread_rdwr_wlock_np (&domainlock); /* We can destroy the client_handle since we are the only thread who uses it. */ clnt_destroy (domainlist[i].client_handle); domainlist[i].client_handle = NULL; if (domainlist[i].active == -2) { /* We can give this free, server does not answer any longer. */ domainlist[i].active = -1; if (domainlist[i].ypset.host != NULL) free (domainlist[i].ypset.host); domainlist[i].ypset.host = NULL; } /* And give the write lock away, search a new host and get the read lock again */ pthread_rdwr_wunlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } else { /* there is no binding for this domain, try to find a new server */ pthread_rdwr_runlock_np (&domainlock); pthread_mutex_lock (&search_lock); if (!ping_all (&domainlist[i]) && domainlist[i].use_broadcast) do_broadcast (&domainlist[i]); pthread_mutex_unlock (&search_lock); pthread_rdwr_rlock_np (&domainlock); } } /* end for () all domains */ pthread_rdwr_runlock_np (&domainlock); return lastcheck;}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/1b500cce872450dee8472edef8067e07abc5c6f7/serv_list.c/clean/src/serv_list.c
KApplication app( false, false );
KApplication app( false );
int KDE_EXPORT kdemain( int argc, char **argv ) { //KInstance instance( "kio_trash" ); // KApplication is necessary to use kio_file putenv(strdup("SESSION_MANAGER=")); KApplication::disableAutoDcopRegistration(); KCmdLineArgs::init(argc, argv, "kio_trash", 0, 0, 0); KCmdLineArgs::addCmdLineOptions( options ); KApplication app( false, false ); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TrashProtocol slave( args->arg(0), args->arg(1), args->arg(2) ); slave.dispatchLoop(); return 0; }
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/65656fc14b65fb45a9f9f73e8a54b269ae0172ec/kio_trash.cpp/clean/kioslave/trash/kio_trash.cpp
int kdemain( int argc, char **argv )
int KDE_EXPORT kdemain( int argc, char **argv )
int kdemain( int argc, char **argv ){ KLocale::setMainCatalogue("kio_fish"); KInstance instance("fish"); myDebug( << "*** Starting fish " << endl); if (argc != 4) { myDebug( << "Usage: fish protocol domain-socket1 domain-socket2" << endl); exit(-1); } struct sigaction act; memset(&act,0,sizeof(act)); act.sa_handler = ripper; act.sa_flags = 0#ifdef SA_NOCLDSTOP | SA_NOCLDSTOP#endif#ifdef SA_RESTART | SA_RESTART#endif ; sigaction(SIGCHLD,&act,NULL); fishProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); myDebug( << "*** fish Done" << endl); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/4c48a8b228be22e564be142f2d5b1f60eee1222e/fish.cpp/buggy/kioslave/fish/fish.cpp
cinode_pins[by]++;
void get(int by) { if (ref == 0) lru_pin(); if (ref_set.count(by)) { dout(7) << " bad get " << *this << " by " << by << " " << cinode_pin_names[by] << " was " << ref << " (" << ref_set << ")" << endl; assert(ref_set.count(by) == 0); } ref++; ref_set.insert(by); dout(7) << " get " << *this << " by " << by << " " << cinode_pin_names[by] << " now " << ref << " (" << ref_set << ")" << endl; }
2690 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2690/f69665c10a75eb0002d2d5a571a388abd54364f8/CInode.h/buggy/ceph/mds/CInode.h
CInodeExport() {}
CInodeExport(CInode *in) { st.inode = in->inode; st.version = in->get_version(); st.is_dirty = in->is_dirty(); cached_by = in->cached_by; cached_by_nonce = in->cached_by_nonce; hardlock = in->hardlock; softlock = in->softlock; st.popularity_justme.take( in->popularity[MDS_POP_JUSTME] ); st.popularity_curdom.take( in->popularity[MDS_POP_CURDOM] ); in->popularity[MDS_POP_ANYDOM].adjust_down(st.popularity_curdom); for (map<fileh_t, CFile*>::iterator it = in->fh_map.begin(); it != in->fh_map.end(); it++) { fh_list.push_back(it->second); } for (list<CFile*>::iterator it = fh_list.begin(); it != fh_list.end(); it++) in->remove_fh(*it); }
CInodeExport() {}
2690 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2690/f69665c10a75eb0002d2d5a571a388abd54364f8/CInode.h/buggy/ceph/mds/CInode.h
if ( myInputSpatialRefSys.importFromWkt( &theSourceWKT ) != OGRERR_NONE || myOutputSpatialRefSys.importFromWkt( &theDestWKT ) != OGRERR_NONE )
const char * mySourceCharArray = theSourceWKT.ascii(); char *mySourceCharArrayPointer = (char *)mySourceCharArray; const char * myDestCharArray = theDestWKT.ascii(); char *myDestCharArrayPointer = (char *)myDestCharArray; if ( myInputSpatialRefSys.importFromWkt( & mySourceCharArrayPointer ) != OGRERR_NONE || myOutputSpatialRefSys.importFromWkt( & myDestCharArrayPointer ) != OGRERR_NONE )
inline QgsCoordinateTransform::QgsCoordinateTransform( QString theSourceWKT, QString theDestWKT ){ OGRSpatialReference myInputSpatialRefSys, myOutputSpatialRefSys; if ( myInputSpatialRefSys.importFromWkt( &theSourceWKT ) != OGRERR_NONE || myOutputSpatialRefSys.importFromWkt( &theDestWKT ) != OGRERR_NONE ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } gSourceToDestXForm = OGRCreateCoordinateTransformation( &myInputSpatialRefSys, &myOutputSpatialRefSys ); if ( ! gSourceToDestXForm ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } // Deactivate GDAL error messages. //CPLSetErrorHandler( errorHandler ); // Guess if the source o dest CS is in degrees. //Searchf for this phrase in each wkt: "unit[\"degree\"" }
1753 /local/tlutelli/issta_data/temp/c/2005_temp/2005/1753/fc96a735e1b635b4317814477d84c291bd4baf59/qgscoordinatetransform.h/buggy/src/qgscoordinatetransform.h
printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT );
printf( "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT.ascii(), theDestWKT.ascii() );
inline QgsCoordinateTransform::QgsCoordinateTransform( QString theSourceWKT, QString theDestWKT ){ OGRSpatialReference myInputSpatialRefSys, myOutputSpatialRefSys; if ( myInputSpatialRefSys.importFromWkt( &theSourceWKT ) != OGRERR_NONE || myOutputSpatialRefSys.importFromWkt( &theDestWKT ) != OGRERR_NONE ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } gSourceToDestXForm = OGRCreateCoordinateTransformation( &myInputSpatialRefSys, &myOutputSpatialRefSys ); if ( ! gSourceToDestXForm ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } // Deactivate GDAL error messages. //CPLSetErrorHandler( errorHandler ); // Guess if the source o dest CS is in degrees. //Searchf for this phrase in each wkt: "unit[\"degree\"" }
1753 /local/tlutelli/issta_data/temp/c/2005_temp/2005/1753/fc96a735e1b635b4317814477d84c291bd4baf59/qgscoordinatetransform.h/buggy/src/qgscoordinatetransform.h
gSourceToDestXForm = OGRCreateCoordinateTransformation( &myInputSpatialRefSys, &myOutputSpatialRefSys );
mSourceToDestXForm = OGRCreateCoordinateTransformation( &myInputSpatialRefSys, &myOutputSpatialRefSys );
inline QgsCoordinateTransform::QgsCoordinateTransform( QString theSourceWKT, QString theDestWKT ){ OGRSpatialReference myInputSpatialRefSys, myOutputSpatialRefSys; if ( myInputSpatialRefSys.importFromWkt( &theSourceWKT ) != OGRERR_NONE || myOutputSpatialRefSys.importFromWkt( &theDestWKT ) != OGRERR_NONE ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } gSourceToDestXForm = OGRCreateCoordinateTransformation( &myInputSpatialRefSys, &myOutputSpatialRefSys ); if ( ! gSourceToDestXForm ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } // Deactivate GDAL error messages. //CPLSetErrorHandler( errorHandler ); // Guess if the source o dest CS is in degrees. //Searchf for this phrase in each wkt: "unit[\"degree\"" }
1753 /local/tlutelli/issta_data/temp/c/2005_temp/2005/1753/fc96a735e1b635b4317814477d84c291bd4baf59/qgscoordinatetransform.h/buggy/src/qgscoordinatetransform.h
if ( ! gSourceToDestXForm )
if ( ! mSourceToDestXForm )
inline QgsCoordinateTransform::QgsCoordinateTransform( QString theSourceWKT, QString theDestWKT ){ OGRSpatialReference myInputSpatialRefSys, myOutputSpatialRefSys; if ( myInputSpatialRefSys.importFromWkt( &theSourceWKT ) != OGRERR_NONE || myOutputSpatialRefSys.importFromWkt( &theDestWKT ) != OGRERR_NONE ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } gSourceToDestXForm = OGRCreateCoordinateTransformation( &myInputSpatialRefSys, &myOutputSpatialRefSys ); if ( ! gSourceToDestXForm ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } // Deactivate GDAL error messages. //CPLSetErrorHandler( errorHandler ); // Guess if the source o dest CS is in degrees. //Searchf for this phrase in each wkt: "unit[\"degree\"" }
1753 /local/tlutelli/issta_data/temp/c/2005_temp/2005/1753/fc96a735e1b635b4317814477d84c291bd4baf59/qgscoordinatetransform.h/buggy/src/qgscoordinatetransform.h
printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT );
printf( "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT.ascii(), theDestWKT.ascii() );
inline QgsCoordinateTransform::QgsCoordinateTransform( QString theSourceWKT, QString theDestWKT ){ OGRSpatialReference myInputSpatialRefSys, myOutputSpatialRefSys; if ( myInputSpatialRefSys.importFromWkt( &theSourceWKT ) != OGRERR_NONE || myOutputSpatialRefSys.importFromWkt( &theDestWKT ) != OGRERR_NONE ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } gSourceToDestXForm = OGRCreateCoordinateTransformation( &myInputSpatialRefSys, &myOutputSpatialRefSys ); if ( ! gSourceToDestXForm ) { printf( 1, "QgsCoordinateTransform - invalid projection:\n myInputSpatialRefSys: (%s)\n myOutputSpatialRefSys: (%s)\n", theSourceWKT, theDestWKT ); } // Deactivate GDAL error messages. //CPLSetErrorHandler( errorHandler ); // Guess if the source o dest CS is in degrees. //Searchf for this phrase in each wkt: "unit[\"degree\"" }
1753 /local/tlutelli/issta_data/temp/c/2005_temp/2005/1753/fc96a735e1b635b4317814477d84c291bd4baf59/qgscoordinatetransform.h/buggy/src/qgscoordinatetransform.h
extern "C" int kdemain(int _argc, char *_argv[])
extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[])
extern "C" int kdemain(int _argc, char *_argv[]){ KAboutData aboutData( "kcmshell", I18N_NOOP("KDE Control Module"), KCONTROL_VERSION, I18N_NOOP("A tool to start single KDE control modules"), KAboutData::License_GPL, "(c) 1999-2004, The KDE Developers"); aboutData.addAuthor("Daniel Molkentin", I18N_NOOP("Current Maintainer"), "[email protected]"); aboutData.addAuthor("Matthias Hoelzer-Kluepfel",0, "[email protected]"); aboutData.addAuthor("Matthias Elter",0, "[email protected]"); aboutData.addAuthor("Matthias Ettrich",0, "[email protected]"); aboutData.addAuthor("Waldo Bastian",0, "[email protected]"); KCmdLineArgs::init(_argc, _argv, &aboutData); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KLocale::setMainCatalogue("kcontrol"); kcmApplication app; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KGlobal::iconLoader()->addAppDir( "kcontrol" ); QCString lang = args->getOption("lang"); if (! lang.isNull()) { KGlobal::locale()->setLanguage(lang); } if (args->isSet("list")) { cout << i18n("The following modules are available:").local8Bit() << endl; ConfigModuleList modules; modules.readDesktopEntries(); ConfigModule *module = 0; int maxLen=0; for (module=modules.first(); module != 0; module=modules.next()) { int len = stripPath(module->fileName()).length(); if (len > maxLen) maxLen = len; } for (module=modules.first(); module != 0; module=modules.next()) { QString entry("%1 - %2"); entry = entry.arg(stripPath(module->fileName()).leftJustify(maxLen, ' ')); entry = entry.arg(!module->comment().isEmpty() ? module->comment() : i18n("No description available")); cout << entry.local8Bit() << endl; } return 0; } if (args->count() < 1) { args->usage(); return -1; } if (args->count() == 1) { app.setDCOPName(args->arg(0)); if (app.isRunning()) { app.waitForExit(); return 0; } KService::Ptr service = locateModule(args->arg(0)); if (!service) return 1; // error // load the module KCModuleInfo info(service); KCModule *module = KCModuleLoader::loadModule(info, false); if (module) { // create the dialog QCString embedStr = args->getOption("embed"); bool embed = false; int id = -1; if (!embedStr.isEmpty()) id = embedStr.toInt(&embed); if (!args->isSet("silent")) { if (!embed) { KCDialog * dlg = new KCDialog(module, module->buttons(), info.docPath(), 0, 0, true ); QString caption = (kapp->caption() != i18n("KDE Control Module")) ? kapp->caption() : info.moduleName(); if (kapp->iconName() != kapp->name()) setIcon(dlg, kapp->iconName()); else setIcon(dlg, info.icon()); dlg->setPlainCaption(i18n("Configure - %1").arg(caption)); // Needed for modules that use d'n'd (not really the right // solution for this though, I guess) dlg->setAcceptDrops(true); // run the dialog dlg->exec(); delete dlg; } // if we are going to be embedded, embed else { QWidget *dlg = new ProxyWidget(module, info.moduleName(), "kcmshell", false); // Needed for modules that use d'n'd (not really the right // solution for this though, I guess) dlg->setAcceptDrops(true); QXEmbed::embedClientIntoWindow(dlg, id); kapp->exec(); delete dlg; } } else { //Silent kapp->exec(); } KCModuleLoader::unloadModule(info); return 0; } KCModuleLoader::showLastLoaderError(0L); return 0; } QCString dcopName; // multiple control modules KService::List modules; for (int i = 0; i < args->count(); i++) { KService::Ptr service = locateModule(args->arg(i)); if (service) { if (!dcopName.isEmpty()) dcopName += "_"; dcopName += args->arg(i); modules.append(service); continue; } } if (modules.count() < 1) return -1; app.setDCOPName(dcopName); if (app.isRunning()) { app.waitForExit(); return 0; } // create the dialog KCMultiDialog * dlg = new KCMShellMultiDialog(0, 0, true); // Needed for modules that use d'n'd (not really the right // solution for this though, I guess) dlg->setAcceptDrops(true); // add modules for (KService::List::ConstIterator it = modules.begin(); it != modules.end(); ++it) dlg->addModule(KCModuleInfo(*it)); // if we are going to be embedded, embed QCString embed = args->getOption("embed"); if (!embed.isEmpty()) { bool ok; int id = embed.toInt(&ok); if (ok) { // NOTE: This has to be changed for QT 3.0. See above! QXEmbed::embedClientIntoWindow(dlg, id); delete dlg; return 0; } } if (kapp->iconName() != kapp->name()) setIcon(dlg, kapp->iconName()); dlg->setPlainCaption(i18n("Configure - %1").arg(kapp->caption())); // run the dialog dlg->exec(); delete dlg; return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/cab40a7725dbbe3a447a4ffa9d469206bf1b318a/kcmshell.cpp/buggy/kcontrol/kcontrol/kcmshell.cpp
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
JNIEXPORT jint JNICALL OS_NATIVE(FindWindowW) (JNIEnv *env, jclass that, jcharArray arg0, jcharArray arg1){ jchar *lparg0=NULL; jchar *lparg1=NULL; jint rc; NATIVE_ENTER(env, that, "FindWindowW\n") if (arg0) lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL); if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL); rc = (jint)FindWindowW((LPWSTR)lparg0, (LPWSTR)lparg1); if (arg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0); if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0); NATIVE_EXIT(env, that, "FindWindowW\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/53f673e459d608e26914cfa9d40023f64288ef94/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
DEBUG_CHECK_NULL(env, arg0)
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_win32_OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2){ DECL_GLOB(pGlob) NMLVCUSTOMDRAW _arg1, *lparg1=NULL; DEBUG_CALL("MoveMemory\n") if (arg1) lparg1 = getNMLVCUSTOMDRAWFields(env, arg1, &_arg1, &PGLOB(NMLVCUSTOMDRAWFc)); MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2); if (arg1) setNMLVCUSTOMDRAWFields(env, arg1, lparg1, &PGLOB(NMLVCUSTOMDRAWFc));}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/ea8b10752d0a908b46d628e28b8b2033139f866e/swt.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.c
s.append((char*)&fh,sizeof(fh));
s.append((char*)&ino,sizeof(ino));
virtual void encode_payload(crope& s) { s.append((char*)&fh,sizeof(fh)); s.append((char*)&newauth,sizeof(newauth)); }
2690 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2690/8c7283a709cbd1031e4adc5c129a44d81b7a0f8d/MClientInodeAuthUpdate.h/clean/ceph/messages/MClientInodeAuthUpdate.h
MClientInodeAuthUpdate(fileh_t fh, int newauth) :
MClientInodeAuthUpdate(inodeno_t ino, int newauth) :
MClientInodeAuthUpdate(fileh_t fh, int newauth) : Message(MSG_CLIENT_INODEAUTHUPDATE) { this->fh = fh; this->newauth = newauth; }
2690 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2690/8c7283a709cbd1031e4adc5c129a44d81b7a0f8d/MClientInodeAuthUpdate.h/buggy/ceph/messages/MClientInodeAuthUpdate.h
this->fh = fh;
this->ino = ino;
MClientInodeAuthUpdate(fileh_t fh, int newauth) : Message(MSG_CLIENT_INODEAUTHUPDATE) { this->fh = fh; this->newauth = newauth; }
2690 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2690/8c7283a709cbd1031e4adc5c129a44d81b7a0f8d/MClientInodeAuthUpdate.h/buggy/ceph/messages/MClientInodeAuthUpdate.h
s.copy(off, sizeof(fh), (char*)&fh); off += sizeof(fh);
s.copy(off, sizeof(ino), (char*)&ino); off += sizeof(ino);
virtual void decode_payload(crope& s, int& off) { s.copy(off, sizeof(fh), (char*)&fh); off += sizeof(fh); s.copy(off, sizeof(newauth), (char*)&newauth); off += sizeof(newauth); }
2690 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2690/8c7283a709cbd1031e4adc5c129a44d81b7a0f8d/MClientInodeAuthUpdate.h/clean/ceph/messages/MClientInodeAuthUpdate.h
uriRef = xmlGetNsProp(cur, (const xmlChar *)"href", XSLT_NAMESPACE);
uriRef = xsltGetNsProp(cur, (const xmlChar *)"href", XSLT_NAMESPACE);
xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) { xmlDocPtr import = NULL; xmlChar *base = NULL; xmlChar *uriRef = NULL; xmlChar *URI = NULL; xsltStylesheetPtr res; if ((cur == NULL) || (style == NULL)) return; uriRef = xmlGetNsProp(cur, (const xmlChar *)"href", XSLT_NAMESPACE); if (uriRef == NULL) { xsltGenericError(xsltGenericErrorContext, "xsl:import : missing href attribute\n"); goto error; } base = xmlNodeGetBase(style->doc, cur); URI = xmlBuildURI(uriRef, base); if (URI == NULL) { xsltGenericError(xsltGenericErrorContext, "xsl:import : invalid URI reference %s\n", uriRef); goto error; } import = xmlParseFile((const char *)URI); if (import == NULL) { xsltGenericError(xsltGenericErrorContext, "xsl:import : unable to load %s\n", URI); goto error; } res = xsltParseStylesheetDoc(import); if (res != NULL) { res->parent = style; res->next = style->imports; style->imports = res; }error: if (uriRef != NULL) xmlFree(uriRef); if (base != NULL) xmlFree(base); if (URI != NULL) xmlFree(URI);}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/fd8a7f1b51439bbcf01b819d7cc964127181d210/imports.c/clean/kioslave/help/libxslt/imports.c
if (strcasecmp(argv[1], "smtps") == 0) slave = new SMTPProtocol(argv[2], argv[3], true); else slave = new SMTPProtocol(argv[2], argv[3], false);
slave = new SMTPProtocol(argv[2], argv[3]);
int kdemain( int argc, char **argv ){ KInstance instance( "kio_smtp" ); if (argc != 4) { fprintf(stderr, "Usage: kio_smtp protocol domain-socket1 domain-socket2\n"); exit(-1); } SMTPProtocol *slave; // Are we looking to use SSL? if (strcasecmp(argv[1], "smtps") == 0) slave = new SMTPProtocol(argv[2], argv[3], true); else slave = new SMTPProtocol(argv[2], argv[3], false); slave->dispatchLoop(); delete slave; return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/5a645c0098f00d2a41c5733930ad2c51a29be9ee/smtp.cc/clean/kioslave/smtp/smtp.cc
KCMultiDialog * dlg = new KCMultiDialog(0, 0, true);
KCMultiDialog * dlg = new KCMShellMultiDialog(0, 0, true);
extern "C" int kdemain(int _argc, char *_argv[]){ KAboutData aboutData( "kcmshell", I18N_NOOP("KDE Control Module"), KCONTROL_VERSION, I18N_NOOP("A tool to start single KDE control modules"), KAboutData::License_GPL, "(c) 1999-2004, The KDE Developers"); aboutData.addAuthor("Daniel Molkentin", I18N_NOOP("Current Maintainer"), "[email protected]"); aboutData.addAuthor("Matthias Hoelzer-Kluepfel",0, "[email protected]"); aboutData.addAuthor("Matthias Elter",0, "[email protected]"); aboutData.addAuthor("Matthias Ettrich",0, "[email protected]"); aboutData.addAuthor("Waldo Bastian",0, "[email protected]"); KCmdLineArgs::init(_argc, _argv, &aboutData); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KLocale::setMainCatalogue("kcontrol"); kcmApplication app; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KGlobal::iconLoader()->addAppDir( "kcontrol" ); QCString lang = args->getOption("lang"); if (! lang.isNull()) { KGlobal::locale()->setLanguage(lang); } if (args->isSet("list")) { cout << i18n("The following modules are available:").local8Bit() << endl; ConfigModuleList modules; modules.readDesktopEntries(); ConfigModule *module = 0; int maxLen=0; for (module=modules.first(); module != 0; module=modules.next()) { int len = stripPath(module->fileName()).length(); if (len > maxLen) maxLen = len; } for (module=modules.first(); module != 0; module=modules.next()) { QString entry("%1 - %2"); entry = entry.arg(stripPath(module->fileName()).leftJustify(maxLen, ' ')); entry = entry.arg(!module->comment().isEmpty() ? module->comment() : i18n("No description available")); cout << entry.local8Bit() << endl; } return 0; } if (args->count() < 1) { args->usage(); return -1; } if (args->count() == 1) { app.setDCOPName(args->arg(0)); if (app.isRunning()) { app.waitForExit(); return 0; } KService::Ptr service = locateModule(args->arg(0)); if (!service) return 1; // error // load the module KCModuleInfo info(service); KCModule *module = KCModuleLoader::loadModule(info, false); if (module) { // create the dialog QCString embedStr = args->getOption("embed"); bool embed = false; int id = -1; if (!embedStr.isEmpty()) id = embedStr.toInt(&embed); if (!args->isSet("silent")) { if (!embed) { KCDialog * dlg = new KCDialog(module, module->buttons(), info.docPath(), 0, 0, true ); QString caption = (kapp->caption() != i18n("KDE Control Module")) ? kapp->caption() : info.moduleName(); if (kapp->iconName() != kapp->name()) setIcon(dlg, kapp->iconName()); else setIcon(dlg, info.icon()); dlg->setPlainCaption(i18n("Configure - %1").arg(caption)); // Needed for modules that use d'n'd (not really the right // solution for this though, I guess) dlg->setAcceptDrops(true); // run the dialog dlg->exec(); delete dlg; } // if we are going to be embedded, embed else { QWidget *dlg = new ProxyWidget(module, info.moduleName(), "kcmshell", false); // Needed for modules that use d'n'd (not really the right // solution for this though, I guess) dlg->setAcceptDrops(true); QXEmbed::embedClientIntoWindow(dlg, id); kapp->exec(); delete dlg; } } else { //Silent kapp->exec(); } KCModuleLoader::unloadModule(info); return 0; } KCModuleLoader::showLastLoaderError(0L); return 0; } // multiple control modules KService::List modules; for (int i = 0; i < args->count(); i++) { KService::Ptr service = locateModule(args->arg(i)); if (service) { modules.append(service); continue; } } if (modules.count() < 1) return -1; // create the dialog KCMultiDialog * dlg = new KCMultiDialog(0, 0, true); // Needed for modules that use d'n'd (not really the right // solution for this though, I guess) dlg->setAcceptDrops(true); // add modules for (KService::List::ConstIterator it = modules.begin(); it != modules.end(); ++it) dlg->addModule(KCModuleInfo(*it)); // if we are going to be embedded, embed QCString embed = args->getOption("embed"); if (!embed.isEmpty()) { bool ok; int id = embed.toInt(&ok); if (ok) { // NOTE: This has to be changed for QT 3.0. See above! QXEmbed::embedClientIntoWindow(dlg, id); delete dlg; return 0; } } if (kapp->iconName() != kapp->name()) setIcon(dlg, kapp->iconName()); dlg->setPlainCaption(i18n("Configure - %1").arg(kapp->caption())); // run the dialog dlg->exec(); delete dlg; return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/667752fa2ef761492a3fcaf1143f9307f71c59b8/kcmshell.cpp/buggy/kcontrol/kcontrol/kcmshell.cpp
only acquire */
only acquire the reader lock. */
do_broadcast (struct binding *list){ char *domain; bool_t out; enum clnt_stat status; /* Get readlock and create a local copy of the domainname. Else a SIGHUP could delete the data and we will dereference invalid data. */ pthread_rdwr_rlock_np (&domainlock); domain = strdupa (list->domain); pthread_rdwr_runlock_np (&domainlock); if (debug_flag) log_msg (LOG_DEBUG, _("do_broadcast() for domain '%s' is called"), domain); /* Get a writer lock for the domain list, since we modify one entry. */ pthread_rdwr_wlock_np (&domainlock); list->active = -1; pthread_rdwr_wunlock_np (&domainlock); /* Get a reader lock while we do the broadcast. Normally we would need the writer lock, since we modify the data. But in this case, the broadcast timeout is too long and we would block all queries. Since we don't change pointers and all data is always valid, we only acquire */ pthread_rdwr_rlock_np (&domainlock); in_use = list; /* global variable for eachresult */ status = clnt_broadcast (YPPROG, YPVERS, YPPROC_DOMAIN_NONACK, (xdrproc_t) ypbind_xdr_domainname, (void *)&domain, (xdrproc_t) xdr_bool, (void *)&out, (resultproc_t) eachresult); if (status != RPC_SUCCESS) { remove_bindingfile (domain); log_msg (LOG_ERR, "broadcast: %s.", clnt_sperrno (status)); } else update_bindingfile (list); pthread_rdwr_runlock_np (&domainlock); if (debug_flag) log_msg (LOG_DEBUG, _("leave do_broadcast() for domain '%s'"), domain);}
5799 /local/tlutelli/issta_data/temp/c/2005_temp/2005/5799/6d3bbd490a05925c42599a2d78389cd1bc89ad9d/serv_list.c/clean/src/serv_list.c
if (flags > KRdbExportColors)
/* Qt exports */ bool exportQtColors = flags & KRdbExportQtColors; bool exportQtSettings = flags & KRdbExportQtSettings; if ( exportQtColors || exportQtSettings )
void runRdb( uint flags ){ // Export colors to non-(KDE/Qt) apps (e.g. Motif, GTK+ apps) if (flags & KRdbExportColors) { KGlobal::dirs()->addResourceType("appdefaults", KStandardDirs::kde_default("data") + "kdisplay/app-defaults/"); QColorGroup cg = kapp->palette().active(); createGtkrc( true, cg ); QString preproc; addColorDef(preproc, "FOREGROUND" , cg.foreground()); QColor backCol = cg.background(); addColorDef(preproc, "BACKGROUND" , backCol); addColorDef(preproc, "HIGHLIGHT" , backCol.light(100+(2*KGlobalSettings::contrast()+4)*16/1)); addColorDef(preproc, "LOWLIGHT" , backCol.dark(100+(2*KGlobalSettings::contrast()+4)*10)); addColorDef(preproc, "SELECT_BACKGROUND" , cg.highlight()); addColorDef(preproc, "SELECT_FOREGROUND" , cg.highlightedText()); addColorDef(preproc, "WINDOW_BACKGROUND" , cg.base()); addColorDef(preproc, "WINDOW_FOREGROUND" , cg.foreground()); addColorDef(preproc, "INACTIVE_BACKGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "INACTIVE_FOREGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "ACTIVE_BACKGROUND" , KGlobalSettings::activeTitleColor()); addColorDef(preproc, "ACTIVE_FOREGROUND" , KGlobalSettings::activeTitleColor()); //--------------------------------------------------------------- QStringList list; QStringList adPaths = KGlobal::dirs()->findDirs("appdefaults", ""); for (QStringList::ConstIterator it = adPaths.begin(); it != adPaths.end(); it++) { QDir dSys( *it ); if ( dSys.exists() ) { dSys.setFilter( QDir::Files ); dSys.setSorting( QDir::Name ); dSys.setNameFilter("*.ad"); list += dSys.entryList(); } } QString propString; KTempFile tmpFile; if (tmpFile.status() != 0) { kdDebug() << "Couldn't open temp file" << endl; exit(0); } QFile &tmp = *(tmpFile.file()); tmp.writeBlock( preproc.latin1(), preproc.length() ); for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) copyFile(tmp, locate("appdefaults", *it ), true); // very primitive support for ~/.Xdefaults by appending it copyFile(tmp, QDir::homeDirPath() + "/.Xdefaults", true); tmpFile.close(); KProcess proc; proc << "xrdb" << tmpFile.name(); proc.start( KProcess::Block, KProcess::Stdin ); tmpFile.unlink(); applyGtkStyles(true); } else applyGtkStyles(false); if (flags > KRdbExportColors) { { /* extra braces for a qsettings.sync() in its destructor */ QSettings settings; KSimpleConfig kglobals("kdeglobals", true); /* open read-only */ if ( flags & KRdbExportQtColors ) applyQtColors( kglobals, settings ); // For kcmcolors if ( flags & KRdbExportQtSettings ) applyQtSettings( kglobals, settings ); // For kcmstyle } /* apply the settings to qt-only apps */ QApplication::setDesktopSettingsAware( true ); QApplication::x11_apply_settings(); QApplication::setDesktopSettingsAware( false ); }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/112e814c4f53df43ffdf5e3eac4245c25cabccf7/krdb.cpp/buggy/kcontrol/krdb/krdb.cpp
{ /* extra braces for a qsettings.sync() in its destructor */ QSettings settings; KSimpleConfig kglobals("kdeglobals", true); /* open read-only */
QSettings* settings = new QSettings; KSimpleConfig kglobals("kdeglobals", true); /* open read-only */
void runRdb( uint flags ){ // Export colors to non-(KDE/Qt) apps (e.g. Motif, GTK+ apps) if (flags & KRdbExportColors) { KGlobal::dirs()->addResourceType("appdefaults", KStandardDirs::kde_default("data") + "kdisplay/app-defaults/"); QColorGroup cg = kapp->palette().active(); createGtkrc( true, cg ); QString preproc; addColorDef(preproc, "FOREGROUND" , cg.foreground()); QColor backCol = cg.background(); addColorDef(preproc, "BACKGROUND" , backCol); addColorDef(preproc, "HIGHLIGHT" , backCol.light(100+(2*KGlobalSettings::contrast()+4)*16/1)); addColorDef(preproc, "LOWLIGHT" , backCol.dark(100+(2*KGlobalSettings::contrast()+4)*10)); addColorDef(preproc, "SELECT_BACKGROUND" , cg.highlight()); addColorDef(preproc, "SELECT_FOREGROUND" , cg.highlightedText()); addColorDef(preproc, "WINDOW_BACKGROUND" , cg.base()); addColorDef(preproc, "WINDOW_FOREGROUND" , cg.foreground()); addColorDef(preproc, "INACTIVE_BACKGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "INACTIVE_FOREGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "ACTIVE_BACKGROUND" , KGlobalSettings::activeTitleColor()); addColorDef(preproc, "ACTIVE_FOREGROUND" , KGlobalSettings::activeTitleColor()); //--------------------------------------------------------------- QStringList list; QStringList adPaths = KGlobal::dirs()->findDirs("appdefaults", ""); for (QStringList::ConstIterator it = adPaths.begin(); it != adPaths.end(); it++) { QDir dSys( *it ); if ( dSys.exists() ) { dSys.setFilter( QDir::Files ); dSys.setSorting( QDir::Name ); dSys.setNameFilter("*.ad"); list += dSys.entryList(); } } QString propString; KTempFile tmpFile; if (tmpFile.status() != 0) { kdDebug() << "Couldn't open temp file" << endl; exit(0); } QFile &tmp = *(tmpFile.file()); tmp.writeBlock( preproc.latin1(), preproc.length() ); for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) copyFile(tmp, locate("appdefaults", *it ), true); // very primitive support for ~/.Xdefaults by appending it copyFile(tmp, QDir::homeDirPath() + "/.Xdefaults", true); tmpFile.close(); KProcess proc; proc << "xrdb" << tmpFile.name(); proc.start( KProcess::Block, KProcess::Stdin ); tmpFile.unlink(); applyGtkStyles(true); } else applyGtkStyles(false); if (flags > KRdbExportColors) { { /* extra braces for a qsettings.sync() in its destructor */ QSettings settings; KSimpleConfig kglobals("kdeglobals", true); /* open read-only */ if ( flags & KRdbExportQtColors ) applyQtColors( kglobals, settings ); // For kcmcolors if ( flags & KRdbExportQtSettings ) applyQtSettings( kglobals, settings ); // For kcmstyle } /* apply the settings to qt-only apps */ QApplication::setDesktopSettingsAware( true ); QApplication::x11_apply_settings(); QApplication::setDesktopSettingsAware( false ); }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/112e814c4f53df43ffdf5e3eac4245c25cabccf7/krdb.cpp/buggy/kcontrol/krdb/krdb.cpp
if ( flags & KRdbExportQtColors ) applyQtColors( kglobals, settings );
if ( exportQtColors ) applyQtColors( kglobals, *settings );
void runRdb( uint flags ){ // Export colors to non-(KDE/Qt) apps (e.g. Motif, GTK+ apps) if (flags & KRdbExportColors) { KGlobal::dirs()->addResourceType("appdefaults", KStandardDirs::kde_default("data") + "kdisplay/app-defaults/"); QColorGroup cg = kapp->palette().active(); createGtkrc( true, cg ); QString preproc; addColorDef(preproc, "FOREGROUND" , cg.foreground()); QColor backCol = cg.background(); addColorDef(preproc, "BACKGROUND" , backCol); addColorDef(preproc, "HIGHLIGHT" , backCol.light(100+(2*KGlobalSettings::contrast()+4)*16/1)); addColorDef(preproc, "LOWLIGHT" , backCol.dark(100+(2*KGlobalSettings::contrast()+4)*10)); addColorDef(preproc, "SELECT_BACKGROUND" , cg.highlight()); addColorDef(preproc, "SELECT_FOREGROUND" , cg.highlightedText()); addColorDef(preproc, "WINDOW_BACKGROUND" , cg.base()); addColorDef(preproc, "WINDOW_FOREGROUND" , cg.foreground()); addColorDef(preproc, "INACTIVE_BACKGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "INACTIVE_FOREGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "ACTIVE_BACKGROUND" , KGlobalSettings::activeTitleColor()); addColorDef(preproc, "ACTIVE_FOREGROUND" , KGlobalSettings::activeTitleColor()); //--------------------------------------------------------------- QStringList list; QStringList adPaths = KGlobal::dirs()->findDirs("appdefaults", ""); for (QStringList::ConstIterator it = adPaths.begin(); it != adPaths.end(); it++) { QDir dSys( *it ); if ( dSys.exists() ) { dSys.setFilter( QDir::Files ); dSys.setSorting( QDir::Name ); dSys.setNameFilter("*.ad"); list += dSys.entryList(); } } QString propString; KTempFile tmpFile; if (tmpFile.status() != 0) { kdDebug() << "Couldn't open temp file" << endl; exit(0); } QFile &tmp = *(tmpFile.file()); tmp.writeBlock( preproc.latin1(), preproc.length() ); for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) copyFile(tmp, locate("appdefaults", *it ), true); // very primitive support for ~/.Xdefaults by appending it copyFile(tmp, QDir::homeDirPath() + "/.Xdefaults", true); tmpFile.close(); KProcess proc; proc << "xrdb" << tmpFile.name(); proc.start( KProcess::Block, KProcess::Stdin ); tmpFile.unlink(); applyGtkStyles(true); } else applyGtkStyles(false); if (flags > KRdbExportColors) { { /* extra braces for a qsettings.sync() in its destructor */ QSettings settings; KSimpleConfig kglobals("kdeglobals", true); /* open read-only */ if ( flags & KRdbExportQtColors ) applyQtColors( kglobals, settings ); // For kcmcolors if ( flags & KRdbExportQtSettings ) applyQtSettings( kglobals, settings ); // For kcmstyle } /* apply the settings to qt-only apps */ QApplication::setDesktopSettingsAware( true ); QApplication::x11_apply_settings(); QApplication::setDesktopSettingsAware( false ); }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/112e814c4f53df43ffdf5e3eac4245c25cabccf7/krdb.cpp/buggy/kcontrol/krdb/krdb.cpp
if ( flags & KRdbExportQtSettings ) applyQtSettings( kglobals, settings );
if ( exportQtSettings ) applyQtSettings( kglobals, *settings ); delete settings; QDateTime settingsstamp = QDateTime::currentDateTime(); static Atom qt_settings_timestamp = 0; if (!qt_settings_timestamp) { QString atomname("_QT_SETTINGS_TIMESTAMP_"); atomname += XDisplayName( 0 ); qt_settings_timestamp = XInternAtom( qt_xdisplay(), atomname.latin1(), False);
void runRdb( uint flags ){ // Export colors to non-(KDE/Qt) apps (e.g. Motif, GTK+ apps) if (flags & KRdbExportColors) { KGlobal::dirs()->addResourceType("appdefaults", KStandardDirs::kde_default("data") + "kdisplay/app-defaults/"); QColorGroup cg = kapp->palette().active(); createGtkrc( true, cg ); QString preproc; addColorDef(preproc, "FOREGROUND" , cg.foreground()); QColor backCol = cg.background(); addColorDef(preproc, "BACKGROUND" , backCol); addColorDef(preproc, "HIGHLIGHT" , backCol.light(100+(2*KGlobalSettings::contrast()+4)*16/1)); addColorDef(preproc, "LOWLIGHT" , backCol.dark(100+(2*KGlobalSettings::contrast()+4)*10)); addColorDef(preproc, "SELECT_BACKGROUND" , cg.highlight()); addColorDef(preproc, "SELECT_FOREGROUND" , cg.highlightedText()); addColorDef(preproc, "WINDOW_BACKGROUND" , cg.base()); addColorDef(preproc, "WINDOW_FOREGROUND" , cg.foreground()); addColorDef(preproc, "INACTIVE_BACKGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "INACTIVE_FOREGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "ACTIVE_BACKGROUND" , KGlobalSettings::activeTitleColor()); addColorDef(preproc, "ACTIVE_FOREGROUND" , KGlobalSettings::activeTitleColor()); //--------------------------------------------------------------- QStringList list; QStringList adPaths = KGlobal::dirs()->findDirs("appdefaults", ""); for (QStringList::ConstIterator it = adPaths.begin(); it != adPaths.end(); it++) { QDir dSys( *it ); if ( dSys.exists() ) { dSys.setFilter( QDir::Files ); dSys.setSorting( QDir::Name ); dSys.setNameFilter("*.ad"); list += dSys.entryList(); } } QString propString; KTempFile tmpFile; if (tmpFile.status() != 0) { kdDebug() << "Couldn't open temp file" << endl; exit(0); } QFile &tmp = *(tmpFile.file()); tmp.writeBlock( preproc.latin1(), preproc.length() ); for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) copyFile(tmp, locate("appdefaults", *it ), true); // very primitive support for ~/.Xdefaults by appending it copyFile(tmp, QDir::homeDirPath() + "/.Xdefaults", true); tmpFile.close(); KProcess proc; proc << "xrdb" << tmpFile.name(); proc.start( KProcess::Block, KProcess::Stdin ); tmpFile.unlink(); applyGtkStyles(true); } else applyGtkStyles(false); if (flags > KRdbExportColors) { { /* extra braces for a qsettings.sync() in its destructor */ QSettings settings; KSimpleConfig kglobals("kdeglobals", true); /* open read-only */ if ( flags & KRdbExportQtColors ) applyQtColors( kglobals, settings ); // For kcmcolors if ( flags & KRdbExportQtSettings ) applyQtSettings( kglobals, settings ); // For kcmstyle } /* apply the settings to qt-only apps */ QApplication::setDesktopSettingsAware( true ); QApplication::x11_apply_settings(); QApplication::setDesktopSettingsAware( false ); }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/112e814c4f53df43ffdf5e3eac4245c25cabccf7/krdb.cpp/buggy/kcontrol/krdb/krdb.cpp
/* apply the settings to qt-only apps */ QApplication::setDesktopSettingsAware( true ); QApplication::x11_apply_settings(); QApplication::setDesktopSettingsAware( false );
QBuffer stamp; QDataStream s(stamp.buffer(), IO_WriteOnly); s << settingsstamp; XChangeProperty( qt_xdisplay(), qt_xrootwin(), qt_settings_timestamp, qt_settings_timestamp, 8, PropModeReplace, (unsigned char*) stamp.buffer().data(), stamp.buffer().size() );
void runRdb( uint flags ){ // Export colors to non-(KDE/Qt) apps (e.g. Motif, GTK+ apps) if (flags & KRdbExportColors) { KGlobal::dirs()->addResourceType("appdefaults", KStandardDirs::kde_default("data") + "kdisplay/app-defaults/"); QColorGroup cg = kapp->palette().active(); createGtkrc( true, cg ); QString preproc; addColorDef(preproc, "FOREGROUND" , cg.foreground()); QColor backCol = cg.background(); addColorDef(preproc, "BACKGROUND" , backCol); addColorDef(preproc, "HIGHLIGHT" , backCol.light(100+(2*KGlobalSettings::contrast()+4)*16/1)); addColorDef(preproc, "LOWLIGHT" , backCol.dark(100+(2*KGlobalSettings::contrast()+4)*10)); addColorDef(preproc, "SELECT_BACKGROUND" , cg.highlight()); addColorDef(preproc, "SELECT_FOREGROUND" , cg.highlightedText()); addColorDef(preproc, "WINDOW_BACKGROUND" , cg.base()); addColorDef(preproc, "WINDOW_FOREGROUND" , cg.foreground()); addColorDef(preproc, "INACTIVE_BACKGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "INACTIVE_FOREGROUND", KGlobalSettings::inactiveTitleColor()); addColorDef(preproc, "ACTIVE_BACKGROUND" , KGlobalSettings::activeTitleColor()); addColorDef(preproc, "ACTIVE_FOREGROUND" , KGlobalSettings::activeTitleColor()); //--------------------------------------------------------------- QStringList list; QStringList adPaths = KGlobal::dirs()->findDirs("appdefaults", ""); for (QStringList::ConstIterator it = adPaths.begin(); it != adPaths.end(); it++) { QDir dSys( *it ); if ( dSys.exists() ) { dSys.setFilter( QDir::Files ); dSys.setSorting( QDir::Name ); dSys.setNameFilter("*.ad"); list += dSys.entryList(); } } QString propString; KTempFile tmpFile; if (tmpFile.status() != 0) { kdDebug() << "Couldn't open temp file" << endl; exit(0); } QFile &tmp = *(tmpFile.file()); tmp.writeBlock( preproc.latin1(), preproc.length() ); for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) copyFile(tmp, locate("appdefaults", *it ), true); // very primitive support for ~/.Xdefaults by appending it copyFile(tmp, QDir::homeDirPath() + "/.Xdefaults", true); tmpFile.close(); KProcess proc; proc << "xrdb" << tmpFile.name(); proc.start( KProcess::Block, KProcess::Stdin ); tmpFile.unlink(); applyGtkStyles(true); } else applyGtkStyles(false); if (flags > KRdbExportColors) { { /* extra braces for a qsettings.sync() in its destructor */ QSettings settings; KSimpleConfig kglobals("kdeglobals", true); /* open read-only */ if ( flags & KRdbExportQtColors ) applyQtColors( kglobals, settings ); // For kcmcolors if ( flags & KRdbExportQtSettings ) applyQtSettings( kglobals, settings ); // For kcmstyle } /* apply the settings to qt-only apps */ QApplication::setDesktopSettingsAware( true ); QApplication::x11_apply_settings(); QApplication::setDesktopSettingsAware( false ); }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/112e814c4f53df43ffdf5e3eac4245c25cabccf7/krdb.cpp/buggy/kcontrol/krdb/krdb.cpp
int main(int argc, char **argv)
int main(int , char **)
int main(int argc, char **argv){ signal(SIGCHLD, sigchld_handler); signal(SIGSEGV, sigsegv_handler); Connection parent( 0, 1 ); POP3Protocol pop3( &parent ); pop3.dispatchLoop();}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/fd884f5ccde26ca363e9ebd3da6b8cbb9217cd51/pop3.cc/buggy/kioslave/pop3/pop3.cc
I18N_NOOP( "Helper program to handle the KDE trash can" ),
I18N_NOOP( "Helper program to handle the KDE trash can\n" "Note: to move files to the trash, don't use ktrash, but \"kfmclient move 'url' trash:/\"" ),
int main(int argc, char *argv[]){ KApplication::disableAutoDcopRegistration(); KCmdLineArgs::init( argc, argv, "ktrash", I18N_NOOP( "ktrash" ), I18N_NOOP( "Helper program to handle the KDE trash can" ), KDE_VERSION_STRING ); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); if ( args->isSet( "empty" ) ) { // We use a kio job instead of linking to TrashImpl, for a smaller binary // (and the possibility of a central service at some point) QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)1; KIO::Job* job = KIO::special( "trash:/", packedArgs ); (void)KIO::NetAccess::synchronousRun( job, 0 ); // Update konq windows opened on trash:/ KDirNotify_stub allDirNotify("*", "KDirNotify*"); allDirNotify.FilesAdded( "trash:/" ); // yeah, files were removed, but we don't know which ones... return 0; }#if 0 // This is only for testing. KDesktop handles it automatically. if ( args->isSet( "migrate" ) ) { QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)2; KIO::Job* job = KIO::special( "trash:/", packedArgs ); (void)KIO::NetAccess::synchronousRun( job, 0 ); return 0; }#endif QCString restoreArg = args->getOption( "restore" ); if ( !restoreArg.isEmpty() ) { KURL trashURL( restoreArg ); if ( !trashURL.isValid() || trashURL.protocol() != "trash" ) { kdError() << "Invalid URL for restoring a trashed file:" << trashURL << endl; return 1; } QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)3 << trashURL; KIO::Job* job = KIO::special( trashURL, packedArgs ); bool ok = KIO::NetAccess::synchronousRun( job, 0 ); if ( !ok ) kdError() << KIO::NetAccess::lastErrorString() << endl; return 0; } return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/4a40447efe548279c50bdad5094159c99c9acc4d/ktrash.cpp/clean/kioslave/trash/ktrash.cpp
while (1) {
while (1) {
void sigchld_handler(int){ int status; pid_t pid; while (1) { pid = waitpid((pid_t) -1, &status, WNOHANG); if (pid <= 0) break; kDebugInfo("kdesud: PID %d exited", (int) pid); }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/78882f23290ccd305ca671ecb8ee7946692d879a/kdesud.cpp/buggy/kdesu/kdesud/kdesud.cpp
kDebugInfo("kdesud: PID %d exited", (int) pid);
kdDebug(1205) << "PID " << (int) pid << "exited\n";
void sigchld_handler(int){ int status; pid_t pid; while (1) { pid = waitpid((pid_t) -1, &status, WNOHANG); if (pid <= 0) break; kDebugInfo("kdesud: PID %d exited", (int) pid); }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/78882f23290ccd305ca671ecb8ee7946692d879a/kdesud.cpp/buggy/kdesu/kdesud/kdesud.cpp
ThumbCreator *new_creator()
KDE_EXPORT ThumbCreator *new_creator()
ThumbCreator *new_creator() { return new CursorCreator; }
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/e1e7cf009e0e126565e643210583d75c2758d527/cursorcreator.cpp/buggy/kioslave/thumbnail/cursorcreator.cpp
ref--; if (ref == 0) lru_unpin();
if (ref == 1) lru_unpin(); return --ref;
int put() { assert(ref > 0); ref--; if (ref == 0) lru_unpin(); }
2690 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2690/8c7283a709cbd1031e4adc5c129a44d81b7a0f8d/Buffercache.h/clean/ceph/client/Buffercache.h
slave = new POP3Protocol(argv[2], argv[3], true);
slave = new POP3Protocol(argv[2], argv[3], true);
int kdemain( int argc, char **argv ){ KInstance instance( "kio_pop3" ); if (argc != 4) { kdDebug() << "Usage: kio_pop3 protocol domain-socket1 domain-socket2" << endl; exit(-1); } POP3Protocol *slave; // Are we looking to use SSL? if (strcasecmp(argv[1], "pop3s") == 0) slave = new POP3Protocol(argv[2], argv[3], true); else slave = new POP3Protocol(argv[2], argv[3], false); slave->dispatchLoop(); delete slave; return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/39a40b82a2fc55ed7e977945ed4c332480807109/pop3.cc/clean/kioslave/pop3/pop3.cc
slave = new POP3Protocol(argv[2], argv[3], false);
slave = new POP3Protocol(argv[2], argv[3], false);
int kdemain( int argc, char **argv ){ KInstance instance( "kio_pop3" ); if (argc != 4) { kdDebug() << "Usage: kio_pop3 protocol domain-socket1 domain-socket2" << endl; exit(-1); } POP3Protocol *slave; // Are we looking to use SSL? if (strcasecmp(argv[1], "pop3s") == 0) slave = new POP3Protocol(argv[2], argv[3], true); else slave = new POP3Protocol(argv[2], argv[3], false); slave->dispatchLoop(); delete slave; return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/39a40b82a2fc55ed7e977945ed4c332480807109/pop3.cc/clean/kioslave/pop3/pop3.cc
CheesySerializer *serializer = new CheesySerializer( new FakeMessenger(MSG_ADDR_CLIENT(0)) ); client[i] = new Client(mdc, i, serializer);
client[i] = new Client(mdc, i, new FakeMessenger(MSG_ADDR_CLIENT(0)));
int main(int oargc, char **oargv) { cerr << "fakefuse starting" << endl; int argc; char **argv; parse_config_options(oargc, oargv, argc, argv); MDCluster *mdc = new MDCluster(NUMMDS, NUMOSD); // start messenger thread fakemessenger_startthread(); //g_timer.add_event_after(5.0, new C_Test2); //g_timer.add_event_after(10.0, new C_Test); int mkfs = 0; for (int i=1; i<argc; i++) { if (strcmp(argv[i], "--fastmkfs") == 0) { mkfs = MDS_MKFS_FAST; argv[i] = 0; argc--; break; } if (strcmp(argv[i], "--fullmkfs") == 0) { mkfs = MDS_MKFS_FULL; argv[i] = 0; argc--; break; } } // create osd OSD *osd[NUMOSD]; for (int i=0; i<NUMOSD; i++) { osd[i] = new OSD(i, new FakeMessenger(MSG_ADDR_OSD(i))); osd[i]->init(); } // create mds MDS *mds[NUMMDS]; for (int i=0; i<NUMMDS; i++) { mds[i] = new MDS(mdc, i, new FakeMessenger(MSG_ADDR_MDS(i))); mds[i]->init(); } // create client Client *client[NUMCLIENT]; for (int i=0; i<NUMCLIENT; i++) { // build a serialized fakemessenger... CheesySerializer *serializer = new CheesySerializer( new FakeMessenger(MSG_ADDR_CLIENT(0)) ); client[i] = new Client(mdc, i, serializer); client[i]->init(); // start up fuse // use my argc, argv (make sure you pass a mount point!) cout << "starting fuse on pid " << getpid() << endl; client[i]->mount(mkfs); ceph_fuse_main(client[i], argc, argv); client[i]->unmount(); cout << "fuse finished on pid " << getpid() << endl; client[i]->shutdown(); } // wait for it to finish cout << "DONE -----" << endl; fakemessenger_stopthread(); // blocks until messenger stops // cleanup for (int i=0; i<NUMMDS; i++) { delete mds[i]; } for (int i=0; i<NUMOSD; i++) { delete osd[i]; } for (int i=0; i<NUMCLIENT; i++) { delete client[i]; } delete mdc; return 0;}
2690 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2690/d3ef7c44debfa7997367cff009dac1b770aa56a4/fakefuse.cc/clean/ceph/fakefuse.cc
JNIEnv *env;
JNIEnv *env = NULL;
SWT_PTR callback(int index, ...){ if (!callbackEnabled) return 0; { jobject callback = callbackData[index].callin; jmethodID mid = callbackData[index].methodID; JNIEnv *env; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", counter++);#endif#ifdef JNI_VERSION_1_2 if (IS_JNI_1_2) { (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2); } else#endif { (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL); } /* Either we are disconnected from the VM or an exception has occurred. */ if (env == 0 ||(*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback, objectID); isStatic = ((*env)->GetBooleanField(env,callback, isStaticID)) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback, isArrayBasedID)) != 0; callbackEntryCount++; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env, callback, argCountID); SWT_PTRArray javaArray = (*env)->NewSWT_PTRArray(env, argCount); SWT_PTR *elements = (*env)->GetSWT_PTRArrayElements(env, javaArray, NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, SWT_PTR); } (*env)->ReleaseSWT_PTRArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticSWT_PTRMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallSWT_PTRMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticSWT_PTRMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallSWT_PTRMethodV(env, javaObject, mid, vl); } } va_end(vl); callbackEntryCount--; /* * This function 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", --counter);#endif return result; }}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/7dcc5c618c116b2683455b3c9fc8aa0afc5bee22/callback.c/buggy/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.c
if (env == 0 ||(*env)->ExceptionOccurred(env)) {
if ((*env)->ExceptionOccurred(env)) {
SWT_PTR callback(int index, ...){ if (!callbackEnabled) return 0; { jobject callback = callbackData[index].callin; jmethodID mid = callbackData[index].methodID; JNIEnv *env; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", counter++);#endif#ifdef JNI_VERSION_1_2 if (IS_JNI_1_2) { (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2); } else#endif { (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL); } /* Either we are disconnected from the VM or an exception has occurred. */ if (env == 0 ||(*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback, objectID); isStatic = ((*env)->GetBooleanField(env,callback, isStaticID)) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback, isArrayBasedID)) != 0; callbackEntryCount++; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env, callback, argCountID); SWT_PTRArray javaArray = (*env)->NewSWT_PTRArray(env, argCount); SWT_PTR *elements = (*env)->GetSWT_PTRArrayElements(env, javaArray, NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, SWT_PTR); } (*env)->ReleaseSWT_PTRArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticSWT_PTRMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallSWT_PTRMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticSWT_PTRMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallSWT_PTRMethodV(env, javaObject, mid, vl); } } va_end(vl); callbackEntryCount--; /* * This function 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", --counter);#endif return result; }}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/7dcc5c618c116b2683455b3c9fc8aa0afc5bee22/callback.c/buggy/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.c
(*env)->ExceptionDescribe(env);
SWT_PTR callback(int index, ...){ if (!callbackEnabled) return 0; { jobject callback = callbackData[index].callin; jmethodID mid = callbackData[index].methodID; JNIEnv *env; jobject javaObject; jboolean isStatic, isArrayBased; int result = 0; va_list vl;#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", counter++);#endif#ifdef JNI_VERSION_1_2 if (IS_JNI_1_2) { (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2); } else#endif { (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL); } /* Either we are disconnected from the VM or an exception has occurred. */ if (env == 0 ||(*env)->ExceptionOccurred(env)) {#ifdef DEBUG_CALL_PRINTS fprintf(stderr, "************ java exception occurred\n");#endif return 0; } javaObject = (*env)->GetObjectField(env,callback, objectID); isStatic = ((*env)->GetBooleanField(env,callback, isStaticID)) != 0; isArrayBased = ((*env)->GetBooleanField(env,callback, isArrayBasedID)) != 0; callbackEntryCount++; va_start(vl, index); if (isArrayBased) { int i; jint argCount = (*env)->GetIntField(env, callback, argCountID); SWT_PTRArray javaArray = (*env)->NewSWT_PTRArray(env, argCount); SWT_PTR *elements = (*env)->GetSWT_PTRArrayElements(env, javaArray, NULL); for (i=0; i<argCount; i++) { elements[i] = va_arg(vl, SWT_PTR); } (*env)->ReleaseSWT_PTRArrayElements(env, javaArray, elements, 0); if (isStatic) { result = (*env)->CallStaticSWT_PTRMethod(env, javaObject, mid, javaArray); } else { result = (*env)->CallSWT_PTRMethod(env, javaObject, mid, javaArray); } (*env)->DeleteLocalRef(env, javaArray); } else { if (isStatic) { result = (*env)->CallStaticSWT_PTRMethodV(env, javaObject, mid, vl); } else { result = (*env)->CallSWT_PTRMethodV(env, javaObject, mid, vl); } } va_end(vl); callbackEntryCount--; /* * This function 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", --counter);#endif return result; }}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/7dcc5c618c116b2683455b3c9fc8aa0afc5bee22/callback.c/buggy/bundles/org.eclipse.swt/Eclipse SWT/common/library/callback.c
if ( !serv || serv->library().isEmpty() ||
if ( !serv || serv->library().isEmpty() ||
int main(int argc, char *argv[]){ KLocale::setMainCatalogue("kcontrol"); KAboutData aboutData( "kcminit", I18N_NOOP("KCMInit"), "$Id$", I18N_NOOP("KCMInit - runs startups initialisation for Control Modules.")); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KApplication app; KLocale::setMainCatalogue(0); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); QCString arg; if (args->count() == 1) { arg = args->arg(0); } // get the library loader instance KLibLoader *loader = KLibLoader::self(); KService::List list; if (!arg.isEmpty()) { QString path = KCGlobal::baseGroup(); path += arg; path += ".desktop"; KService::Ptr serv = KService::serviceByDesktopPath( path ); if (!serv) { // Path didn't work. Trying as a name serv = KService::serviceByDesktopName( arg ); } if ( !serv || serv->library().isEmpty() || serv->init().isEmpty()) { cerr << i18n("Module %1 not found!").arg(arg).local8Bit() << endl; return -1; } else list.append(serv); } else { // locate the desktop files list = KService::allInitServices(); } // look for X-KDE-Init=... entries for(KService::List::Iterator it = list.begin(); it != list.end(); ++it) { KService::Ptr service = (*it); if (service->library().isEmpty() || service->init().isEmpty()) continue; // Skip // try to load the library QString libName = QString("libkcm_%1").arg(service->library()); KLibrary *lib = loader->library(QFile::encodeName(libName)); if (lib) { // get the init_ function QString factory = QString("init_%1").arg(service->init()); void *init = lib->symbol(factory.utf8()); if (init) { // initialize the module kdDebug() << "Initializing " << libName << ": " << factory << endl; void (*func)() = (void(*)())init; func(); } loader->unloadLibrary(QFile::encodeName(libName)); } } if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); kapp->dcopClient()->send( "ksplash", "", "upAndRunning(QString)", QString("kcminit")); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/2d5af787364c03f4492f36846c5bb4bbfa590189/kcminit.cpp/buggy/kcontrol/kcontrol/kcminit.cpp
cerr << i18n("Module %1 not found!").arg(arg).local8Bit() << endl;
kdError(1208) << i18n("Module %1 not found!").arg(arg) << endl;
int main(int argc, char *argv[]){ KLocale::setMainCatalogue("kcontrol"); KAboutData aboutData( "kcminit", I18N_NOOP("KCMInit"), "$Id$", I18N_NOOP("KCMInit - runs startups initialisation for Control Modules.")); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KApplication app; KLocale::setMainCatalogue(0); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); QCString arg; if (args->count() == 1) { arg = args->arg(0); } // get the library loader instance KLibLoader *loader = KLibLoader::self(); KService::List list; if (!arg.isEmpty()) { QString path = KCGlobal::baseGroup(); path += arg; path += ".desktop"; KService::Ptr serv = KService::serviceByDesktopPath( path ); if (!serv) { // Path didn't work. Trying as a name serv = KService::serviceByDesktopName( arg ); } if ( !serv || serv->library().isEmpty() || serv->init().isEmpty()) { cerr << i18n("Module %1 not found!").arg(arg).local8Bit() << endl; return -1; } else list.append(serv); } else { // locate the desktop files list = KService::allInitServices(); } // look for X-KDE-Init=... entries for(KService::List::Iterator it = list.begin(); it != list.end(); ++it) { KService::Ptr service = (*it); if (service->library().isEmpty() || service->init().isEmpty()) continue; // Skip // try to load the library QString libName = QString("libkcm_%1").arg(service->library()); KLibrary *lib = loader->library(QFile::encodeName(libName)); if (lib) { // get the init_ function QString factory = QString("init_%1").arg(service->init()); void *init = lib->symbol(factory.utf8()); if (init) { // initialize the module kdDebug() << "Initializing " << libName << ": " << factory << endl; void (*func)() = (void(*)())init; func(); } loader->unloadLibrary(QFile::encodeName(libName)); } } if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); kapp->dcopClient()->send( "ksplash", "", "upAndRunning(QString)", QString("kcminit")); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/2d5af787364c03f4492f36846c5bb4bbfa590189/kcminit.cpp/buggy/kcontrol/kcontrol/kcminit.cpp
int main(int argc, char *argv[]){ KLocale::setMainCatalogue("kcontrol"); KAboutData aboutData( "kcminit", I18N_NOOP("KCMInit"), "$Id$", I18N_NOOP("KCMInit - runs startups initialisation for Control Modules.")); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KApplication app; KLocale::setMainCatalogue(0); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); QCString arg; if (args->count() == 1) { arg = args->arg(0); } // get the library loader instance KLibLoader *loader = KLibLoader::self(); KService::List list; if (!arg.isEmpty()) { QString path = KCGlobal::baseGroup(); path += arg; path += ".desktop"; KService::Ptr serv = KService::serviceByDesktopPath( path ); if (!serv) { // Path didn't work. Trying as a name serv = KService::serviceByDesktopName( arg ); } if ( !serv || serv->library().isEmpty() || serv->init().isEmpty()) { cerr << i18n("Module %1 not found!").arg(arg).local8Bit() << endl; return -1; } else list.append(serv); } else { // locate the desktop files list = KService::allInitServices(); } // look for X-KDE-Init=... entries for(KService::List::Iterator it = list.begin(); it != list.end(); ++it) { KService::Ptr service = (*it); if (service->library().isEmpty() || service->init().isEmpty()) continue; // Skip // try to load the library QString libName = QString("libkcm_%1").arg(service->library()); KLibrary *lib = loader->library(QFile::encodeName(libName)); if (lib) { // get the init_ function QString factory = QString("init_%1").arg(service->init()); void *init = lib->symbol(factory.utf8()); if (init) { // initialize the module kdDebug() << "Initializing " << libName << ": " << factory << endl; void (*func)() = (void(*)())init; func(); } loader->unloadLibrary(QFile::encodeName(libName)); } } if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); kapp->dcopClient()->send( "ksplash", "", "upAndRunning(QString)", QString("kcminit")); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/2d5af787364c03f4492f36846c5bb4bbfa590189/kcminit.cpp/buggy/kcontrol/kcontrol/kcminit.cpp
int main(int argc, char *argv[]){ KLocale::setMainCatalogue("kcontrol"); KAboutData aboutData( "kcminit", I18N_NOOP("KCMInit"), "$Id$", I18N_NOOP("KCMInit - runs startups initialisation for Control Modules.")); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KApplication app; KLocale::setMainCatalogue(0); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); QCString arg; if (args->count() == 1) { arg = args->arg(0); } // get the library loader instance KLibLoader *loader = KLibLoader::self(); KService::List list; if (!arg.isEmpty()) { QString path = KCGlobal::baseGroup(); path += arg; path += ".desktop"; KService::Ptr serv = KService::serviceByDesktopPath( path ); if (!serv) { // Path didn't work. Trying as a name serv = KService::serviceByDesktopName( arg ); } if ( !serv || serv->library().isEmpty() || serv->init().isEmpty()) { cerr << i18n("Module %1 not found!").arg(arg).local8Bit() << endl; return -1; } else list.append(serv); } else { // locate the desktop files list = KService::allInitServices(); } // look for X-KDE-Init=... entries for(KService::List::Iterator it = list.begin(); it != list.end(); ++it) { KService::Ptr service = (*it); if (service->library().isEmpty() || service->init().isEmpty()) continue; // Skip // try to load the library QString libName = QString("libkcm_%1").arg(service->library()); KLibrary *lib = loader->library(QFile::encodeName(libName)); if (lib) { // get the init_ function QString factory = QString("init_%1").arg(service->init()); void *init = lib->symbol(factory.utf8()); if (init) { // initialize the module kdDebug() << "Initializing " << libName << ": " << factory << endl; void (*func)() = (void(*)())init; func(); } loader->unloadLibrary(QFile::encodeName(libName)); } } if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); kapp->dcopClient()->send( "ksplash", "", "upAndRunning(QString)", QString("kcminit")); return 0;}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/2d5af787364c03f4492f36846c5bb4bbfa590189/kcminit.cpp/buggy/kcontrol/kcontrol/kcminit.cpp
fprintf(stderr, "URI %s %s %s\n", obj->stringval, base, URI);
xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs){ xsltDocumentPtr doc; xmlXPathObjectPtr obj, obj2=NULL; xmlChar *base, *URI; if ((nargs < 1) || (nargs > 2)) { xsltGenericError(xsltGenericErrorContext, "document() : invalid number of args %d\n", nargs); ctxt->error = XPATH_INVALID_ARITY; return; } if (ctxt->value == NULL) { xsltGenericError(xsltGenericErrorContext, "document() : invalid arg value\n"); ctxt->error = XPATH_INVALID_TYPE; return; } if (nargs == 2) { if (ctxt->value->type != XPATH_NODESET) { xsltGenericError(xsltGenericErrorContext, "document() : invalid arg expecting a nodeset\n"); ctxt->error = XPATH_INVALID_TYPE; return; } obj2 = valuePop(ctxt); } if (ctxt->value->type == XPATH_NODESET) { int i; xmlXPathObjectPtr newobj, ret; obj = valuePop(ctxt); ret = xmlXPathNewNodeSet(NULL); for (i = 0; i < obj->nodesetval->nodeNr; i++) { valuePush(ctxt, xmlXPathNewNodeSet(obj->nodesetval->nodeTab[i])); xmlXPathStringFunction(ctxt, 1); if (nargs == 2) { valuePush(ctxt, xmlXPathObjectCopy(obj2)); } else { valuePush(ctxt, xmlXPathNewNodeSet(obj->nodesetval->nodeTab[i])); } xsltDocumentFunction(ctxt, 2); newobj = valuePop(ctxt); ret->nodesetval = xmlXPathNodeSetMerge(ret->nodesetval, newobj->nodesetval); xmlXPathFreeObject(newobj); } xmlXPathFreeObject(obj); if (obj2 != NULL) xmlXPathFreeObject(obj2); valuePush(ctxt, ret); return; } /* * Make sure it's converted to a string */ xmlXPathStringFunction(ctxt, 1); if (ctxt->value->type != XPATH_STRING) { xsltGenericError(xsltGenericErrorContext, "document() : invalid arg expecting a string\n"); ctxt->error = XPATH_INVALID_TYPE; if (obj2 != NULL) xmlXPathFreeObject(obj2); return; } obj = valuePop(ctxt); if (obj->stringval == NULL) { valuePush(ctxt, xmlXPathNewNodeSet(NULL)); } else { if (obj2 != NULL) { /* obj2 should be ordered in document order !!!!! */ base = xmlNodeGetBase(obj2->nodesetval->nodeTab[0]->doc, obj->nodesetval->nodeTab[0]); } else { base = xmlNodeGetBase(ctxt->context->doc, ctxt->context->node); } URI = xmlBuildURI(obj->stringval, base); if (base != NULL) xmlFree(base); if (URI == NULL) { valuePush(ctxt, xmlXPathNewNodeSet(NULL)); } else { xsltTransformContextPtr tctxt; tctxt = (xsltTransformContextPtr) ctxt->context->extra; if (tctxt == NULL) { xsltGenericError(xsltGenericErrorContext, "document() : internal error tctxt == NULL\n"); valuePush(ctxt, xmlXPathNewNodeSet(NULL)); } else { doc = xsltLoadDocument(tctxt, URI); if (doc == NULL) valuePush(ctxt, xmlXPathNewNodeSet(NULL)); else { /* TODO: use XPointer of HTML location for fragment ID */ /* pbm #xxx can lead to location sets, not nodesets :-) */ valuePush(ctxt, xmlXPathNewNodeSet((xmlNodePtr) doc->doc)); } } xmlFree(URI); } } xmlXPathFreeObject(obj); if (obj2 != NULL) xmlXPathFreeObject(obj2);}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/72ae5c9ef7e40826f1eff984297a44b966180e03/functions.c/clean/kioslave/help/libxslt/functions.c
int k;
int k, ti, tj;
gtp_dragon_data(char *s, int id){ int i = -1; int j = -1; int m, n; if (sscanf(s, " %*c") >= 0 && !gtp_decode_coord(s, &i, &j)) return gtp_failure(id, "invalid coordinate"); examine_position(EMPTY, EXAMINE_DRAGONS); gtp_printid(id, GTP_SUCCESS); if (ON_BOARD2(i, j) && BOARD(i, j) == EMPTY) gtp_mprintf("%m empty\n", i, j); else { for (m = 0; m < board_size; m++) for (n = 0; n < board_size; n++) if ((m == i && n == j) || (i == -1 && BOARD(m, n) != EMPTY && dragon[m][n].origin == POS(m, n))) { int k; struct dragon_data *d = &dragon[m][n]; struct dragon_data2 *d2 = &(dragon2[d->id]); gtp_print_vertex(m, n); gtp_printf(":\n"); gtp_printf("color %s\n", color_to_string(d->color)); gtp_mprintf("origin %m\n", I(d->origin), J(d->origin)); gtp_printf("size %d\n", d->size); gtp_printf("effective_size %.2f\n", d->effective_size); gtp_printf("heyes %d\n", d2->heyes); gtp_mprintf("heye %m\n", I(d2->heye), J(d2->heye)); gtp_printf("genus %d\n", d2->genus); gtp_printf("escape_route %d\n", d2->escape_route); /* We would like to use the %1m format used in gprintf * but this is not implemented in gtp_mprintf. Moreover adding this * format would entail including liberty.h in gtp.c, which we * don't want to do in order to maintain independence of the * GNU Go internals. Therefore we use the I and J macros here. */ gtp_mprintf("lunch %m\n", I(d2->lunch), J(d2->lunch)); gtp_printf("status %s\n", status_to_string(d->status)); gtp_printf("owl_status %s\n", status_to_string(d->owl_status)); gtp_printf("matcher_status %s\n", status_to_string(d->matcher_status)); gtp_printf("owl_threat_status %s\n", status_to_string(d->owl_threat_status)); gtp_mprintf("owl_attack %m\n", I(d->owl_attack_point), J(d->owl_attack_point)); gtp_printf("owl_attack_certain: %s\n", (d->owl_attack_certain) ? "YES" : "NO"); gtp_mprintf("owl_2nd_attack %m\n", I(d->owl_second_attack_point), J(d->owl_second_attack_point)); gtp_mprintf("owl_defend %m\n", I(d->owl_defense_point), J(d->owl_defense_point)); gtp_printf("owl_defend_certain: %s\n", (d->owl_defend_certain) ? "YES" : "NO"); gtp_mprintf("owl_2nd_defend %m\n", I(d->owl_second_defense_point), J(d->owl_second_defense_point)); gtp_printf("semeai %d\n", d2->semeai); gtp_printf("semeai_margin_of_safety %d\n", d2->semeai_margin_of_safety); gtp_printf("neighbors: "); for (k = 0; k < DRAGON2(m, n).neighbors; k++) gtp_mprintf("%m ", I(DRAGON(DRAGON2(m, n).adjacent[k]).origin), J(DRAGON(DRAGON2(m, n).adjacent[k]).origin)); gtp_printf("\n"); gtp_printf("moyo: %d\n", DRAGON2(m, n).moyo); gtp_printf("safety: %s\n", safety_to_string(DRAGON2(m, n).safety)); } } gtp_printf("\n"); return GTP_OK;}
6496 /local/tlutelli/issta_data/temp/c/2005_temp/2005/6496/20ad17ffd7ce28ad05da58d7d94158fc9d8441c2/play_gtp.c/buggy/interface/play_gtp.c
gtp_printf("strings: "); for (ti = 0; ti < board_size; ti++) for (tj = 0; tj < board_size; tj++) if (worm[ti][tj].origin == POS(ti, tj) && dragon[ti][tj].origin == dragon[m][n].origin) gtp_mprintf("%m ", ti, tj); gtp_printf("\n");
gtp_dragon_data(char *s, int id){ int i = -1; int j = -1; int m, n; if (sscanf(s, " %*c") >= 0 && !gtp_decode_coord(s, &i, &j)) return gtp_failure(id, "invalid coordinate"); examine_position(EMPTY, EXAMINE_DRAGONS); gtp_printid(id, GTP_SUCCESS); if (ON_BOARD2(i, j) && BOARD(i, j) == EMPTY) gtp_mprintf("%m empty\n", i, j); else { for (m = 0; m < board_size; m++) for (n = 0; n < board_size; n++) if ((m == i && n == j) || (i == -1 && BOARD(m, n) != EMPTY && dragon[m][n].origin == POS(m, n))) { int k; struct dragon_data *d = &dragon[m][n]; struct dragon_data2 *d2 = &(dragon2[d->id]); gtp_print_vertex(m, n); gtp_printf(":\n"); gtp_printf("color %s\n", color_to_string(d->color)); gtp_mprintf("origin %m\n", I(d->origin), J(d->origin)); gtp_printf("size %d\n", d->size); gtp_printf("effective_size %.2f\n", d->effective_size); gtp_printf("heyes %d\n", d2->heyes); gtp_mprintf("heye %m\n", I(d2->heye), J(d2->heye)); gtp_printf("genus %d\n", d2->genus); gtp_printf("escape_route %d\n", d2->escape_route); /* We would like to use the %1m format used in gprintf * but this is not implemented in gtp_mprintf. Moreover adding this * format would entail including liberty.h in gtp.c, which we * don't want to do in order to maintain independence of the * GNU Go internals. Therefore we use the I and J macros here. */ gtp_mprintf("lunch %m\n", I(d2->lunch), J(d2->lunch)); gtp_printf("status %s\n", status_to_string(d->status)); gtp_printf("owl_status %s\n", status_to_string(d->owl_status)); gtp_printf("matcher_status %s\n", status_to_string(d->matcher_status)); gtp_printf("owl_threat_status %s\n", status_to_string(d->owl_threat_status)); gtp_mprintf("owl_attack %m\n", I(d->owl_attack_point), J(d->owl_attack_point)); gtp_printf("owl_attack_certain: %s\n", (d->owl_attack_certain) ? "YES" : "NO"); gtp_mprintf("owl_2nd_attack %m\n", I(d->owl_second_attack_point), J(d->owl_second_attack_point)); gtp_mprintf("owl_defend %m\n", I(d->owl_defense_point), J(d->owl_defense_point)); gtp_printf("owl_defend_certain: %s\n", (d->owl_defend_certain) ? "YES" : "NO"); gtp_mprintf("owl_2nd_defend %m\n", I(d->owl_second_defense_point), J(d->owl_second_defense_point)); gtp_printf("semeai %d\n", d2->semeai); gtp_printf("semeai_margin_of_safety %d\n", d2->semeai_margin_of_safety); gtp_printf("neighbors: "); for (k = 0; k < DRAGON2(m, n).neighbors; k++) gtp_mprintf("%m ", I(DRAGON(DRAGON2(m, n).adjacent[k]).origin), J(DRAGON(DRAGON2(m, n).adjacent[k]).origin)); gtp_printf("\n"); gtp_printf("moyo: %d\n", DRAGON2(m, n).moyo); gtp_printf("safety: %s\n", safety_to_string(DRAGON2(m, n).safety)); } } gtp_printf("\n"); return GTP_OK;}
6496 /local/tlutelli/issta_data/temp/c/2005_temp/2005/6496/20ad17ffd7ce28ad05da58d7d94158fc9d8441c2/play_gtp.c/buggy/interface/play_gtp.c
int kdemain( int argc, char **argv )
int KDE_EXPORT kdemain( int argc, char **argv )
int kdemain( int argc, char **argv ) { // KApplication is necessary to use other ioslaves putenv(strdup("SESSION_MANAGER=")); KCmdLineArgs::init(argc, argv, "kio_media", 0, 0, 0, 0); KCmdLineArgs::addCmdLineOptions( options ); KApplication app( false, false ); // We want to be anonymous even if we use DCOP app.dcopClient()->attach(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); MediaProtocol slave( args->arg(0), args->arg(1), args->arg(2) ); slave.dispatchLoop(); return 0; }
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/4c48a8b228be22e564be142f2d5b1f60eee1222e/kio_media.cpp/clean/kioslave/media/kio_media.cpp
fprintf(stderr, klocale->translate("usage: kcmlocale [-init | language])\n"));
fprintf(stderr, klocale->translate("usage: kcmlocale [-init | language]\n"));
KLocaleApplication::KLocaleApplication(int &argc, char **argv, const char *name) : KControlApplication(argc, argv, name){ locale = 0; if (runGUI()) { if (!pages || pages->contains("language")) addPage(locale = new KLocaleConfig(dialog, "locale"), klocale->translate("&Locale"), "locale.html"); if (locale) dialog->show(); else { fprintf(stderr, klocale->translate("usage: kcmlocale [-init | language])\n")); justInit = TRUE; } }}
3322 /local/tlutelli/issta_data/temp/c/2005_temp/2005/3322/6ad33f0ec34b7c14cf715d623bb2acf0d9dcb6f5/main.cpp/clean/kcontrol/locale/main.cpp
if (arg1) setPhPoint_tFields(env, arg1, lparg1);
JNIEXPORT jobject JNICALL OS_NATIVE(PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III) (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2, jint arg3, jint arg4){ PhRect_t _arg0, *lparg0=NULL; PhPoint_t _arg1, *lparg1=NULL; jobject rc; NATIVE_ENTER(env, that, "PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III\n") if (arg0) lparg0 = getPhRect_tFields(env, arg0, &_arg0); if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); rc = (jobject)PfExtentText(lparg0, lparg1, (const char *)arg2, (const char *)arg3, arg4); if (arg0) setPhRect_tFields(env, arg0, lparg0); if (arg1) setPhPoint_tFields(env, arg1, lparg1); NATIVE_EXIT(env, that, "PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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(PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI) (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jbyteArray arg2, jbyteArray arg3, jint arg4){ PhRect_t _arg0, *lparg0=NULL; PhPoint_t _arg1, *lparg1=NULL; jbyte *lparg2=NULL; jbyte *lparg3=NULL; jobject rc; NATIVE_ENTER(env, that, "PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI\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)PfExtentText(lparg0, lparg1, (const char *)lparg2, (const char *)lparg3, arg4); 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, "PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg1) setPhPoint_tFields(env, arg1, lparg1); if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); if (arg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0);
JNIEXPORT jobject JNICALL OS_NATIVE(PfExtentWideText) (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jbyteArray arg2, jcharArray arg3, jint arg4){ PhRect_t _arg0, *lparg0=NULL; PhPoint_t _arg1, *lparg1=NULL; jbyte *lparg2=NULL; jchar *lparg3=NULL; jobject rc; NATIVE_ENTER(env, that, "PfExtentWideText\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)->GetCharArrayElements(env, arg3, NULL); rc = (jobject)PfExtentWideText(lparg0, lparg1, (const char *)lparg2, (const uint16_t *)lparg3, arg4); 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)->ReleaseCharArrayElements(env, arg3, lparg3, 0); NATIVE_EXIT(env, that, "PfExtentWideText\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg1) setFontQueryInfoFields(env, arg1, lparg1);
JNIEXPORT jint JNICALL OS_NATIVE(PfQueryFontInfo) (JNIEnv *env, jclass that, jbyteArray arg0, jobject arg1){ jbyte *lparg0=NULL; FontQueryInfo _arg1, *lparg1=NULL; jint rc; NATIVE_ENTER(env, that, "PfQueryFontInfo\n") if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL); if (arg1) lparg1 = getFontQueryInfoFields(env, arg1, &_arg1); rc = (jint)PfQueryFontInfo((const char *)lparg0, (FontQueryInfo *)lparg1); if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); if (arg1) setFontQueryInfoFields(env, arg1, lparg1); NATIVE_EXIT(env, that, "PfQueryFontInfo\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg1) setPhPoint_tFields(env, arg1, lparg1);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawArc) (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2, jint arg3, jint arg4){ PhPoint_t _arg0, *lparg0=NULL; PhPoint_t _arg1, *lparg1=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawArc\n") if (arg0) lparg0 = getPhPoint_tFields(env, arg0, &_arg0); if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); rc = (jint)PgDrawArc(lparg0, lparg1, arg2, arg3, arg4); if (arg0) setPhPoint_tFields(env, arg0, lparg0); if (arg1) setPhPoint_tFields(env, arg1, lparg1); NATIVE_EXIT(env, that, "PgDrawArc\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg3) setPhDim_tFields(env, arg3, lparg3);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawBitmap) (JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2, jobject arg3, jint arg4, jint arg5){ PhPoint_t _arg2, *lparg2=NULL; PhDim_t _arg3, *lparg3=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawBitmap\n") if (arg2) lparg2 = getPhPoint_tFields(env, arg2, &_arg2); if (arg3) lparg3 = getPhDim_tFields(env, arg3, &_arg3); rc = (jint)PgDrawBitmap((void const *)arg0, (int)arg1, (PhPoint_t *)lparg2, (PhPoint_t *)lparg3, (int)arg4, (long)arg5); if (arg2) setPhPoint_tFields(env, arg2, lparg2); if (arg3) setPhDim_tFields(env, arg3, lparg3); NATIVE_EXIT(env, that, "PgDrawBitmap\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg1) setPhPoint_tFields(env, arg1, lparg1);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawEllipse) (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2){ PhPoint_t _arg0, *lparg0=NULL; PhPoint_t _arg1, *lparg1=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawEllipse\n") if (arg0) lparg0 = getPhPoint_tFields(env, arg0, &_arg0); if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); rc = (jint)PgDrawEllipse(lparg0, lparg1, arg2); if (arg0) setPhPoint_tFields(env, arg0, lparg0); if (arg1) setPhPoint_tFields(env, arg1, lparg1); NATIVE_EXIT(env, that, "PgDrawEllipse\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg1) setPhPoint_tFields(env, arg1, lparg1); if (arg10) (*env)->ReleaseByteArrayElements(env, arg10, lparg10, 0);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawGradient) (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jbyteArray arg10){ PhPoint_t _arg0, *lparg0=NULL; PhPoint_t _arg1, *lparg1=NULL; jbyte *lparg10=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawGradient\n") if (arg0) lparg0 = getPhPoint_tFields(env, arg0, &_arg0); if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); if (arg10) lparg10 = (*env)->GetByteArrayElements(env, arg10, NULL); rc = (jint)PgDrawGradient(lparg0, lparg1, arg2, arg3, arg4, (PgColor_t)arg5, (PgColor_t)arg6, (PgColor_t)arg7, (PgColor_t)arg8, arg9, (unsigned char *)lparg10); if (arg0) setPhPoint_tFields(env, arg0, lparg0); if (arg1) setPhPoint_tFields(env, arg1, lparg1); if (arg10) (*env)->ReleaseByteArrayElements(env, arg10, lparg10, 0); NATIVE_EXIT(env, that, "PgDrawGradient\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg3) setPhDim_tFields(env, arg3, lparg3);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawImage) (JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2, jobject arg3, jint arg4, jint arg5){ PhPoint_t _arg2, *lparg2=NULL; PhDim_t _arg3, *lparg3=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawImage\n") if (arg2) lparg2 = getPhPoint_tFields(env, arg2, &_arg2); if (arg3) lparg3 = getPhDim_tFields(env, arg3, &_arg3); rc = (jint)PgDrawImage((void const *)arg0, arg1, lparg2, lparg3, arg4, arg5); if (arg2) setPhPoint_tFields(env, arg2, lparg2); if (arg3) setPhDim_tFields(env, arg3, lparg3); NATIVE_EXIT(env, that, "PgDrawImage\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg2) setPhRect_tFields(env, arg2, lparg2);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawMultiTextArea) (JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jobject arg2, jint arg3, jint arg4, jint arg5){ jbyte *lparg0=NULL; PhRect_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawMultiTextArea\n") if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL); if (arg2) lparg2 = getPhRect_tFields(env, arg2, &_arg2); rc = (jint)PgDrawMultiTextArea((char *)lparg0, arg1, lparg2, arg3, arg4, arg5); if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); if (arg2) setPhRect_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PgDrawMultiTextArea\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg2) setPhRect_tFields(env, arg2, lparg2);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawPhImageRectmx) (JNIEnv *env, jclass that, jobject arg0, jint arg1, jobject arg2, jint arg3){ PhPoint_t _arg0, *lparg0=NULL; PhRect_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawPhImageRectmx\n") if (arg0) lparg0 = getPhPoint_tFields(env, arg0, &_arg0); if (arg2) lparg2 = getPhRect_tFields(env, arg2, &_arg2); rc = (jint)PgDrawPhImageRectmx(lparg0, (PhImage_t const *)arg1, lparg2, arg3); if (arg0) setPhPoint_tFields(env, arg0, lparg0); if (arg2) setPhRect_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PgDrawPhImageRectmx\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg2) setPhPoint_tFields(env, arg2, lparg2);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawPolygon) (JNIEnv *env, jclass that, jshortArray arg0, jint arg1, jobject arg2, jint arg3){ jshort *lparg0=NULL; PhPoint_t _arg2, *lparg2=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawPolygon\n") if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL); if (arg2) lparg2 = getPhPoint_tFields(env, arg2, &_arg2); rc = (jint)PgDrawPolygon((PhPoint_t const *)lparg0, arg1, (PhPoint_t const *)lparg2, arg3); if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0); if (arg2) setPhPoint_tFields(env, arg2, lparg2); NATIVE_EXIT(env, that, "PgDrawPolygon\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
if (arg1) setPhPoint_tFields(env, arg1, lparg1);
JNIEXPORT jint JNICALL OS_NATIVE(PgDrawRoundRect) (JNIEnv *env, jclass that, jobject arg0, jobject arg1, jint arg2){ PhRect_t _arg0, *lparg0=NULL; PhPoint_t _arg1, *lparg1=NULL; jint rc; NATIVE_ENTER(env, that, "PgDrawRoundRect\n") if (arg0) lparg0 = getPhRect_tFields(env, arg0, &_arg0); if (arg1) lparg1 = getPhPoint_tFields(env, arg1, &_arg1); rc = (jint)PgDrawRoundRect((PhRect_t const *)lparg0, (PhPoint_t const *)lparg1, arg2); if (arg0) setPhRect_tFields(env, arg0, lparg0); if (arg1) setPhPoint_tFields(env, arg1, lparg1); NATIVE_EXIT(env, that, "PgDrawRoundRect\n") return rc;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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")}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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")}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c
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;}
11867 /local/tlutelli/issta_data/temp/c/2005_temp/2005/11867/c461181fe5d2c7ea43c33d3bef1c9f477c24d3df/os.c/buggy/bundles/org.eclipse.swt/Eclipse SWT PI/photon/library/os.c